@pixelated-tech/components 3.10.0 → 3.11.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.
- package/dist/components/admin/site-health/site-health-cloudwatch.js +1 -1
- package/dist/components/admin/site-health/site-health-google-analytics.js +1 -1
- package/dist/components/admin/site-health/site-health-google-search-console.js +1 -1
- package/dist/components/general/proxy-handler.js +3 -3
- package/dist/components/general/smartimage.js +5 -0
- package/dist/components/general/table.js +33 -4
- package/dist/components/shoppingcart/ebay.components.js +3 -3
- package/dist/components/shoppingcart/shipping.to.json +8 -9
- package/dist/components/shoppingcart/shoppingcart.components.js +5 -1
- package/dist/components/shoppingcart/shoppingcart.css +5 -0
- package/dist/components/shoppingcart/shoppingcart.functions.js +46 -14
- package/dist/components/sitebuilder/form/formcomponents.js +7 -3
- package/dist/config/pixelated.config.json.enc +1 -1
- package/dist/index.adminserver.js +0 -1
- package/dist/types/components/general/smartimage.d.ts.map +1 -1
- package/dist/types/components/general/table.d.ts.map +1 -1
- package/dist/types/components/shoppingcart/shoppingcart.components.d.ts.map +1 -1
- package/dist/types/components/shoppingcart/shoppingcart.functions.d.ts +2 -2
- package/dist/types/components/shoppingcart/shoppingcart.functions.d.ts.map +1 -1
- package/dist/types/components/sitebuilder/form/formcomponents.d.ts.map +1 -1
- package/dist/types/tests/shoppingcart.contract.test.d.ts +2 -0
- package/dist/types/tests/shoppingcart.contract.test.d.ts.map +1 -0
- package/dist/types/tests/shoppingcart.integration.test.d.ts +2 -0
- package/dist/types/tests/shoppingcart.integration.test.d.ts.map +1 -0
- package/dist/types/tests/shoppingcart.migration.test.d.ts +2 -0
- package/dist/types/tests/shoppingcart.migration.test.d.ts.map +1 -0
- package/package.json +6 -6
|
@@ -40,7 +40,7 @@ export function SiteHealthCloudwatch({ siteName, startDate, endDate }) {
|
|
|
40
40
|
return (_jsx("div", { children: _jsx("div", { style: { width: '100%', height: '400px', border: '1px solid #ddd' }, children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", children: _jsxs(ComposedChart, { data: validData, margin: { top: 40, right: 30, left: 20, bottom: 5 }, children: [_jsx("text", { x: "50%", y: 20, textAnchor: "middle", fontSize: "16", fontWeight: "bold", fill: "#374151", children: "CloudWatch Health Check Availability Over Time" }), _jsx(CartesianGrid, { strokeDasharray: "3 3" }), _jsx(XAxis, { dataKey: "date", tick: { fontSize: 12 }, angle: -45, textAnchor: "end", height: 60 }), _jsx(YAxis, { tick: { fontSize: 12 }, label: { value: 'Check Count', angle: -90, position: 'insideLeft' } }), _jsx(Tooltip, { formatter: (value, name) => [
|
|
41
41
|
value?.toLocaleString() || '0',
|
|
42
42
|
name || 'Unknown'
|
|
43
|
-
], labelFormatter: (label) => `Date: ${label}` }), _jsx(Legend, { wrapperStyle: {
|
|
43
|
+
], labelFormatter: (label) => `Date: ${String(label)}` }), _jsx(Legend, { wrapperStyle: {
|
|
44
44
|
fontSize: '12px',
|
|
45
45
|
paddingTop: '10px'
|
|
46
46
|
} }), _jsx(Bar, { dataKey: "successCount", stackId: "checks", fill: "#10b981", name: "Successful Checks", radius: [2, 2, 0, 0] }), _jsx(Bar, { dataKey: "failureCount", stackId: "checks", fill: "#ef4444", name: "Failed Checks", radius: [2, 2, 0, 0] })] }, `cloudwatch-chart-${validData.length}`) }) }) }));
|
|
@@ -33,7 +33,7 @@ export function SiteHealthGoogleAnalytics({ siteName, startDate, endDate }) {
|
|
|
33
33
|
return (_jsx("div", { children: _jsx("div", { style: { width: '100%', height: '400px', border: '1px solid #ddd' }, children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", children: _jsxs(ComposedChart, { data: validData, margin: { top: 40, right: 30, left: 20, bottom: 5 }, children: [_jsx("text", { x: "50%", y: 20, textAnchor: "middle", fontSize: "16", fontWeight: "bold", fill: "#374151", children: "Page Views (Current vs Previous Period)" }), _jsx(CartesianGrid, { strokeDasharray: "3 3" }), _jsx(XAxis, { dataKey: "date", tick: { fontSize: 12 }, angle: -45, textAnchor: "end", height: 60 }), _jsx(YAxis, { tick: { fontSize: 12 } }), _jsx(Tooltip, { formatter: (value, name) => [
|
|
34
34
|
value?.toLocaleString() || '0',
|
|
35
35
|
name || 'Unknown'
|
|
36
|
-
], labelFormatter: (label) => `Date: ${label}` }), _jsx(Legend, { wrapperStyle: {
|
|
36
|
+
], labelFormatter: (label) => `Date: ${String(label)}` }), _jsx(Legend, { wrapperStyle: {
|
|
37
37
|
fontSize: '12px',
|
|
38
38
|
paddingTop: '10px'
|
|
39
39
|
} }), _jsx(Bar, { dataKey: "currentPageViews", fill: "#3b82f6", name: "Current Period", radius: [2, 2, 0, 0] }), _jsx(Line, { type: "monotone", dataKey: "previousPageViews", stroke: "#ef4444", strokeWidth: 2, strokeDasharray: "5 5", dot: { fill: '#ef4444', strokeWidth: 2, r: 3 }, activeDot: { r: 5, stroke: '#ef4444', strokeWidth: 2 }, name: "Previous Period" })] }, `chart-${validData.length}`) }) }) }));
|
|
@@ -35,7 +35,7 @@ export function SiteHealthGoogleSearchConsole({ siteName, startDate, endDate })
|
|
|
35
35
|
return (_jsx("div", { children: _jsx("div", { style: { width: '100%', height: '400px', border: '1px solid #ddd' }, children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", children: _jsxs(ComposedChart, { data: validData, margin: { top: 40, right: 30, left: 20, bottom: 5 }, children: [_jsx("text", { x: "50%", y: 20, textAnchor: "middle", fontSize: "16", fontWeight: "bold", fill: "#374151", children: "Impressions vs Clicks (Current vs Previous Period)" }), _jsx(CartesianGrid, { strokeDasharray: "3 3" }), _jsx(XAxis, { dataKey: "date", tick: { fontSize: 12 }, angle: -45, textAnchor: "end", height: 60 }), _jsx(YAxis, { tick: { fontSize: 12 } }), _jsx(Tooltip, { formatter: (value, name) => [
|
|
36
36
|
value?.toLocaleString() || '0',
|
|
37
37
|
name || 'Unknown'
|
|
38
|
-
], labelFormatter: (label) => `Date: ${label}` }), _jsx(Legend, { wrapperStyle: {
|
|
38
|
+
], labelFormatter: (label) => `Date: ${String(label)}` }), _jsx(Legend, { wrapperStyle: {
|
|
39
39
|
fontSize: '12px',
|
|
40
40
|
paddingTop: '10px'
|
|
41
41
|
} }), _jsx(Bar, { dataKey: "currentImpressions", fill: "#3b82f6", name: "Current Impressions", radius: [2, 2, 0, 0] }), _jsx(Bar, { dataKey: "currentClicks", fill: "#10b981", name: "Current Clicks", radius: [2, 2, 0, 0] }), _jsx(Line, { type: "monotone", dataKey: "previousImpressions", stroke: "#ef4444", strokeWidth: 2, strokeDasharray: "5 5", dot: { fill: '#ef4444', strokeWidth: 2, r: 3 }, activeDot: { r: 5, stroke: '#ef4444', strokeWidth: 2 }, name: "Previous Impressions" }), _jsx(Line, { type: "monotone", dataKey: "previousClicks", stroke: "#f59e0b", strokeWidth: 2, strokeDasharray: "5 5", dot: { fill: '#f59e0b', strokeWidth: 2, r: 3 }, activeDot: { r: 5, stroke: '#f59e0b', strokeWidth: 2 }, name: "Previous Clicks" })] }) }) }) }));
|
|
@@ -41,16 +41,16 @@ export function handlePixelatedProxy(req) {
|
|
|
41
41
|
response.headers.set("Permissions-Policy", "camera=(), microphone=(), geolocation=(), interest-cohort=()");
|
|
42
42
|
// Content Security Policy (CSP)
|
|
43
43
|
// Includes all discovered domains in the workspace: HubSpot, Gravatar, Flickr, Contentful, Cloudinary, eBay, and Google Analytics + Search.
|
|
44
|
-
const scriptSrc = "'self' 'unsafe-inline' 'unsafe-eval' https://va.vercel-scripts.com https://*.googletagmanager.com https://*.hs-scripts.com https://*.hs-analytics.net https://*.hsforms.net https://*.hscollectedforms.net https://*.hs-banner.com https://*.google.com https://*.doubleclick.net https://*.googleadservices.com https://*.adtrafficquality.google https://*.hsappstatic.net https://assets.calendly.com https://cdn.jsdelivr.net";
|
|
44
|
+
const scriptSrc = "'self' 'unsafe-inline' 'unsafe-eval' https://va.vercel-scripts.com https://*.googletagmanager.com https://*.hs-scripts.com https://*.hs-analytics.net https://*.hsforms.net https://*.hscollectedforms.net https://*.hs-banner.com https://*.google.com https://*.doubleclick.net https://*.googleadservices.com https://*.adtrafficquality.google https://*.hsappstatic.net https://assets.calendly.com https://cdn.jsdelivr.net https://www.paypal.com https://www.paypalobjects.com";
|
|
45
45
|
const csp = [
|
|
46
46
|
"default-src 'self'",
|
|
47
47
|
`script-src ${scriptSrc}`,
|
|
48
48
|
`script-src-elem ${scriptSrc}`,
|
|
49
49
|
"connect-src 'self' https: https://*.hubspot.com https://proxy.pixelated.tech https://sendmail.pixelated.tech https://*.google-analytics.com https://*.analytics.google.com https://cdn.jsdelivr.net",
|
|
50
50
|
"img-src 'self' data: https: https://*.gravatar.com https://*.staticflickr.com https://*.ctfassets.net https://res.cloudinary.com https://*.ebayimg.com",
|
|
51
|
-
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://*.google.com",
|
|
51
|
+
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://*.google.com https://www.paypalobjects.com",
|
|
52
52
|
"font-src 'self' data: https://fonts.gstatic.com",
|
|
53
|
-
"frame-src 'self' https://*.hubspot.com https://*.googletagmanager.com https://*.adtrafficquality.google https://*.google.com https://calendly.com https://*.calendly.com https://*.hsforms.net",
|
|
53
|
+
"frame-src 'self' https://*.hubspot.com https://*.googletagmanager.com https://*.adtrafficquality.google https://*.google.com https://calendly.com https://*.calendly.com https://*.hsforms.net https://www.paypal.com https://www.paypalobjects.com",
|
|
54
54
|
"frame-ancestors 'none'",
|
|
55
55
|
"object-src 'none'",
|
|
56
56
|
].join("; ");
|
|
@@ -109,6 +109,11 @@ export function SmartImage(props) {
|
|
|
109
109
|
newProps.name = newProps.name || newProps.id || sanitizeString(newProps.title) || sanitizeString(newProps.alt) || sanitizeString(imageName);
|
|
110
110
|
newProps.title = newProps.title || newProps.alt || sanitizeString(imageName);
|
|
111
111
|
newProps.src = String(newProps.src);
|
|
112
|
+
// Normalize protocol-relative URLs ("//domain/...") to absolute https:// URLs so Next.js Image can accept them.
|
|
113
|
+
// Keep other forms (relative paths, data URIs, http/https) unchanged.
|
|
114
|
+
if (/^\/\//.test(newProps.src)) {
|
|
115
|
+
newProps.src = `https:${newProps.src}`;
|
|
116
|
+
}
|
|
112
117
|
/* ===== CLOUDINARY VARIANT ===== */
|
|
113
118
|
if (variant === 'cloudinary' && newProps.cloudinaryEnv) {
|
|
114
119
|
newProps.src = buildCloudinaryUrl({
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { SmartImage } from './smartimage';
|
|
5
5
|
import './table.css';
|
|
6
|
+
const debug = false;
|
|
6
7
|
function isImageURL(url) {
|
|
7
8
|
const isImage = /\.(jpeg|jpg|gif|png|webp|svg|bmp)$/i.test(url);
|
|
8
9
|
const isURL = () => { try {
|
|
@@ -37,9 +38,37 @@ export function Table(props) {
|
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
40
|
function getCells(obj) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
// Use entries so we have access to the column key when rendering nested tables
|
|
42
|
+
return Object.entries(obj).map(([key, value], i) => {
|
|
43
|
+
// Defensive rendering: handle React nodes, images, arrays, and objects gracefully
|
|
44
|
+
const myValue = (() => {
|
|
45
|
+
// If it's already a React element, render it directly
|
|
46
|
+
if (React.isValidElement(value))
|
|
47
|
+
return value;
|
|
48
|
+
if (isImageURL(value))
|
|
49
|
+
return _jsx(SmartImage, { src: value, title: String(value), alt: String(value) });
|
|
50
|
+
if (value === null || value === undefined)
|
|
51
|
+
return '';
|
|
52
|
+
if (Array.isArray(value))
|
|
53
|
+
return value.join(', ');
|
|
54
|
+
if (typeof value === 'object') {
|
|
55
|
+
// Render nested table for object cells (no sortable or altRowColor props)
|
|
56
|
+
try {
|
|
57
|
+
// Convert the object to an array of name-value objects
|
|
58
|
+
const nameValueArray = Object.entries(value).map(([key, value]) => {
|
|
59
|
+
return { name: key, value: value };
|
|
60
|
+
});
|
|
61
|
+
// return <Table data={[nameValueArray]} id={key} />;
|
|
62
|
+
return JSON.stringify(value, null, 2);
|
|
63
|
+
}
|
|
64
|
+
catch (err) {
|
|
65
|
+
// Fallback: stringify if something goes wrong
|
|
66
|
+
return JSON.stringify(value, null, 2);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return value;
|
|
70
|
+
})();
|
|
71
|
+
return _jsx("td", { "data-testid": `cell-${i}`, children: myValue }, i);
|
|
43
72
|
});
|
|
44
73
|
}
|
|
45
74
|
/* ========== SORT FUNCTIONS ========== */
|
|
@@ -8,7 +8,7 @@ import { getEbayItems, getEbayItem, getShoppingCartItem, getEbayRateLimits, getE
|
|
|
8
8
|
import { addToShoppingCart } from "./shoppingcart.functions";
|
|
9
9
|
import { AddToCartButton, /* GoToCartButton */ ViewItemDetails } from "./shoppingcart.components";
|
|
10
10
|
import { getCloudinaryRemoteFetchURL as getImg } from "../integrations/cloudinary";
|
|
11
|
-
import { ToggleLoading } from "../general/loading";
|
|
11
|
+
import { Loading, ToggleLoading } from "../general/loading";
|
|
12
12
|
import { usePixelatedConfig } from "../config/config.client";
|
|
13
13
|
import "../../css/pixelated.grid.scss";
|
|
14
14
|
import "./ebay.css";
|
|
@@ -74,10 +74,10 @@ export function EbayItems(props) {
|
|
|
74
74
|
ToggleLoading(false);
|
|
75
75
|
}, []);
|
|
76
76
|
if (items && items.length > 0) {
|
|
77
|
-
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "ebayItemsHeader", children: _jsx(EbayItemHeader, { title: `${items.length} Store Items` }) }), _jsx("div", { className: "ebayItemsHeader", children: _jsx(EbayListFilter, { aspects: aspects, callback: fetchItems }) }), _jsx("div", { id: "ebayItems", className: "ebayItems", children: paintItems({ items: items, cloudinaryProductEnv: props.cloudinaryProductEnv }) })] }));
|
|
77
|
+
return (_jsxs(_Fragment, { children: [_jsx(Loading, {}), _jsx("div", { className: "ebayItemsHeader", children: _jsx(EbayItemHeader, { title: `${items.length} Store Items` }) }), _jsx("div", { className: "ebayItemsHeader", children: _jsx(EbayListFilter, { aspects: aspects, callback: fetchItems }) }), _jsx("div", { id: "ebayItems", className: "ebayItems", children: paintItems({ items: items, cloudinaryProductEnv: props.cloudinaryProductEnv }) })] }));
|
|
78
78
|
}
|
|
79
79
|
else {
|
|
80
|
-
return (_jsx("div", { className: "section-container", children: _jsx("div", { id: "ebayItems", className: "ebayItems" }) }));
|
|
80
|
+
return (_jsx("div", { className: "section-container", children: _jsx("div", { id: "ebayItems", className: "ebayItems", children: _jsx(Loading, {}) }) }));
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
EbayListFilter.propTypes = {
|
|
@@ -397,17 +397,16 @@
|
|
|
397
397
|
"name" : "shippingMethod",
|
|
398
398
|
"label" : "Shipping Method : ",
|
|
399
399
|
"display" : "vertical",
|
|
400
|
-
"required": true,
|
|
401
|
-
"validate" : "isOneRadioSelected",
|
|
402
400
|
"tooltip" : "Please select your Shipping Method",
|
|
403
401
|
"options" : [
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
{ "value" : "USPS-PM-I", "text" : "USPS Priority Mail International ( 6 - 10 days ) $39.99"
|
|
409
|
-
{ "value" : "USPS-PMX-I", "text" : "USPS Priority Mail Express International ( 3 - 5 days ) $69.99"
|
|
410
|
-
]
|
|
402
|
+
{ "value" : "USPS-GA", "text" : "USPS Ground Advantage ( 2 - 5 days ) $9.99" },
|
|
403
|
+
{ "value" : "USPS-PM", "text" : "USPS Priority Mail ( 2 - 3 days ) $14.99" },
|
|
404
|
+
{ "value" : "USPS-PMX", "text" : "USPS Priority Mail Express ( 1 - 3 days ) $39.99" },
|
|
405
|
+
{ "value" : "USPS-FCP-I", "text" : "USPS First Class Package International ( Varies ) $24.99" },
|
|
406
|
+
{ "value" : "USPS-PM-I", "text" : "USPS Priority Mail International ( 6 - 10 days ) $39.99" },
|
|
407
|
+
{ "value" : "USPS-PMX-I", "text" : "USPS Priority Mail Express International ( 3 - 5 days ) $69.99" }
|
|
408
|
+
],
|
|
409
|
+
"checked": "USPS-GA"
|
|
411
410
|
}
|
|
412
411
|
},
|
|
413
412
|
{
|
|
@@ -207,11 +207,15 @@ CheckoutItems.propTypes = {
|
|
|
207
207
|
};
|
|
208
208
|
export function CheckoutItems(props) {
|
|
209
209
|
const { items, shippingTo, subtotal_discount, subtotal, shippingCost, handlingFee, salesTax, total } = props;
|
|
210
|
+
const cartItems = (_jsx("ul", { children: items.map((item) => {
|
|
211
|
+
const itm = item;
|
|
212
|
+
return _jsxs("li", { children: [itm.itemQuantity, " X - ", itm.itemTitle, " ( ", formatAsUSD(itm.itemCost), " )"] }, itm.itemID);
|
|
213
|
+
}) }));
|
|
210
214
|
const to = shippingTo;
|
|
211
215
|
const addr = _jsxs(_Fragment, { children: [_jsx("div", { children: to.name }), _jsx("div", { children: to.street1 }), _jsxs("div", { children: [to.city, ", ", to.state, " ", to.zip] })] });
|
|
212
216
|
let checkoutTableData = [{
|
|
213
217
|
"Name": "Shopping Cart Items : ",
|
|
214
|
-
"Value":
|
|
218
|
+
"Value": cartItems,
|
|
215
219
|
}, {
|
|
216
220
|
"Name": "Subtotal Discount : ",
|
|
217
221
|
"Value": formatAsUSD(subtotal_discount),
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { getContentfulDiscountCodes } from "../integrations/contentful.delivery";
|
|
2
|
+
import { CacheManager } from "../general/cache-manager";
|
|
3
|
+
// Migration-time verbose tracing per user request — remove after verification
|
|
2
4
|
const debug = false;
|
|
5
|
+
// Use CacheManager but preserve existing localStorage keys by using empty prefix
|
|
6
|
+
const cartCache = new CacheManager({ mode: 'local', prefix: '' });
|
|
3
7
|
/* ========== LOCALSTORAGE KEYS ========== */
|
|
4
8
|
export const shoppingCartKey = "pixelvividCart";
|
|
5
9
|
export const shippingInfoKey = "pixelvividCartShipping";
|
|
@@ -72,11 +76,21 @@ export function formatAsHundredths(num) {
|
|
|
72
76
|
return Math.trunc(num * 100) / 100;
|
|
73
77
|
}
|
|
74
78
|
export function getCart() {
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
if (debug)
|
|
80
|
+
console.debug('ShoppingCart:getCart -> using CacheManager.get', shoppingCartKey);
|
|
81
|
+
// Use CacheManager as the single source-of-truth. Legacy raw-localStorage fallbacks
|
|
82
|
+
// were removed after migration completed — callers should use CacheManager APIs.
|
|
83
|
+
const cached = cartCache.get(shoppingCartKey);
|
|
84
|
+
if (cached)
|
|
85
|
+
return cached;
|
|
86
|
+
// No cart found -> empty
|
|
87
|
+
return [];
|
|
77
88
|
}
|
|
78
89
|
export function setCart(shoppingCartJSON) {
|
|
79
|
-
|
|
90
|
+
if (debug)
|
|
91
|
+
console.debug('ShoppingCart:setCart -> using CacheManager.set', shoppingCartKey, shoppingCartJSON);
|
|
92
|
+
cartCache.set(shoppingCartKey, shoppingCartJSON);
|
|
93
|
+
// preserve observable contract (storage event) for listeners
|
|
80
94
|
window.dispatchEvent(new Event('storage'));
|
|
81
95
|
}
|
|
82
96
|
export function alreadyInCart(cart, itemID) {
|
|
@@ -150,7 +164,9 @@ export function addToShoppingCart(thisItem) {
|
|
|
150
164
|
cartItem.itemQuantity = 1;
|
|
151
165
|
cart.push(cartItem);
|
|
152
166
|
}
|
|
153
|
-
|
|
167
|
+
if (debug)
|
|
168
|
+
console.debug('ShoppingCart:persisting cart -> CacheManager.set', shoppingCartKey, cart);
|
|
169
|
+
cartCache.set(shoppingCartKey, cart);
|
|
154
170
|
window.dispatchEvent(new Event('storage'));
|
|
155
171
|
}
|
|
156
172
|
export function removeFromShoppingCart(thisItem) {
|
|
@@ -158,21 +174,32 @@ export function removeFromShoppingCart(thisItem) {
|
|
|
158
174
|
if (alreadyInCart(cart, thisItem.itemID)) {
|
|
159
175
|
cart.splice(getIndexInCart(cart, thisItem.itemID), 1);
|
|
160
176
|
}
|
|
161
|
-
|
|
177
|
+
if (debug)
|
|
178
|
+
console.debug('ShoppingCart:removeFromShoppingCart -> persisting cart via CacheManager', shoppingCartKey, cart);
|
|
179
|
+
cartCache.set(shoppingCartKey, cart);
|
|
162
180
|
window.dispatchEvent(new Event('storage'));
|
|
163
181
|
}
|
|
164
182
|
export function clearShoppingCart() {
|
|
165
|
-
|
|
166
|
-
|
|
183
|
+
if (debug)
|
|
184
|
+
console.debug('ShoppingCart:clearShoppingCart -> removing keys via CacheManager');
|
|
185
|
+
cartCache.remove(shoppingCartKey);
|
|
186
|
+
cartCache.remove(shippingInfoKey);
|
|
167
187
|
window.dispatchEvent(new Event('storage'));
|
|
168
188
|
}
|
|
169
189
|
/* ========== SHIPPING INFO FUNCTIONS ========== */
|
|
170
190
|
export function getShippingInfo() {
|
|
171
|
-
|
|
172
|
-
|
|
191
|
+
if (debug)
|
|
192
|
+
console.debug('ShoppingCart:getShippingInfo -> using CacheManager.get', shippingInfoKey);
|
|
193
|
+
const cached = cartCache.get(shippingInfoKey);
|
|
194
|
+
if (cached)
|
|
195
|
+
return cached;
|
|
196
|
+
// Migration complete — don't read raw localStorage directly. Return empty when no data.
|
|
197
|
+
return [];
|
|
173
198
|
}
|
|
174
199
|
export function setShippingInfo(shippingFormData) {
|
|
175
|
-
|
|
200
|
+
if (debug)
|
|
201
|
+
console.debug('ShoppingCart:setShippingInfo -> using CacheManager.set', shippingInfoKey, shippingFormData);
|
|
202
|
+
cartCache.set(shippingInfoKey, shippingFormData);
|
|
176
203
|
window.dispatchEvent(new Event('storage'));
|
|
177
204
|
}
|
|
178
205
|
export function getShippingCost() {
|
|
@@ -231,13 +258,18 @@ export async function getRemoteDiscountCodes() {
|
|
|
231
258
|
;
|
|
232
259
|
}
|
|
233
260
|
export function getLocalDiscountCodes() {
|
|
234
|
-
|
|
235
|
-
|
|
261
|
+
if (debug)
|
|
262
|
+
console.debug('ShoppingCart:getLocalDiscountCodes -> using CacheManager.get', discountCodesKey);
|
|
263
|
+
const cached = cartCache.get(discountCodesKey);
|
|
264
|
+
if (cached)
|
|
265
|
+
return cached;
|
|
266
|
+
// Do not read raw localStorage directly after migration — return empty when absent.
|
|
267
|
+
return [];
|
|
236
268
|
}
|
|
237
269
|
export function setDiscountCodes(discountCodesJSON) {
|
|
238
270
|
if (debug)
|
|
239
|
-
console.
|
|
240
|
-
|
|
271
|
+
console.debug("ShoppingCart:setDiscountCodes -> using CacheManager.set", discountCodesKey, discountCodesJSON);
|
|
272
|
+
cartCache.set(discountCodesKey, discountCodesJSON);
|
|
241
273
|
window.dispatchEvent(new Event('storage'));
|
|
242
274
|
}
|
|
243
275
|
export function getDiscountCode(codeString) {
|
|
@@ -292,13 +292,17 @@ FormRadioOption.propTypes = {
|
|
|
292
292
|
};
|
|
293
293
|
function FormRadioOption(props) {
|
|
294
294
|
const inputProps = setupInputProps(props);
|
|
295
|
-
|
|
295
|
+
// Determine whether parent supplied a controlled contract (value + updater)
|
|
296
|
+
const parentHasOnChange = Boolean(props.parent && typeof props.parent.onChange === 'function');
|
|
297
|
+
const isChecked = props.parent && props.parent.checked === props.value;
|
|
296
298
|
const handleChange = (e) => {
|
|
297
|
-
if (props.parent.onChange) {
|
|
299
|
+
if (props.parent && typeof props.parent.onChange === 'function') {
|
|
298
300
|
props.parent.onChange(props.value);
|
|
299
301
|
}
|
|
300
302
|
};
|
|
301
|
-
|
|
303
|
+
// If there is no parent onChange (no updater), render uncontrolled via defaultChecked
|
|
304
|
+
const controlProps = parentHasOnChange ? { checked: isChecked } : { defaultChecked: isChecked };
|
|
305
|
+
return (_jsxs("span", { className: props.parent && props.parent.display == "vertical" ? "displayVertical" : "", children: [_jsx("input", { type: "radio", id: `${props.parent?.name}-${props.value}`, name: props.parent?.name, value: props.value, ...controlProps, onChange: handleChange, required: !!(props.parent && props.parent.required), ...inputProps }), _jsx("label", { htmlFor: `${props.parent?.name}-${props.value}`, children: props.text })] }));
|
|
302
306
|
}
|
|
303
307
|
FormCheckbox.propTypes = {
|
|
304
308
|
id: PropTypes.string.isRequired,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
pxl:v1:
|
|
1
|
+
pxl:v1:3f481a2cd7f5ad57638e8bee:855f0159f90b4111272402268a590c55:0bb71ae7ab631b7113b6af9bc361b176295904022f96cd6976d6d733472eef8c82e55e0b974e4baa74e82b93c695add88152fda55bf6273532b41acda35af8d326b2962ad5180a25d42486a2581597d85b2d530cf1248e43df471ba83f9d924ab279856d3db1060cc5e5d7b6b678f3f390d815fe3f3ab9ef90f57e1989d0986d4fd3a45bd44b24ced99f19f1a1c33a5e57446b94d991a65d498c2d9dc3e7f24ceb86ca890d24e951d74ff709460f4a9891568f2673e348653d6f4ed3d695456e25f19b2c86851b2b63d0b8e816a36cf0b72707352fd074a020fd0d38be126372980bc9bd3dba99bc69fb0bc7fd0ed8bb16f54cbbfcda01a424e7141d44874e372b826142e44a430f6ae63ad2d1898777a76ab249df5eb1f1f2b75a0980977d7b6e203d2957a654a56d73f3048a0c3335efee7406ac3957a14afc5da6880226a762c075b5d9bf022ad4dc76764259c562e3ec7f46ab1d30318e6798899390f0ae0c7c971af758360d38e07fdb431319a282fb6ac9db7bd5d61f794b667e25284324ce2f38ea6b6758f686883d7d357403dff548190206af30d042e43881e5db3e8922edf7f3404dc52113a752dc14b10c31bcf0830d22388c3a6348f15922dd78ef356c0719bcd0ace9feda62f4b903c7cdd03a6ac96f296bf2f29881696ea125cfe2da984aca88020f0a3c96f1b5d641fc32b0d7c3850657762eb2dd151d0a7f4e774e0e228cbd86f4691c44e3d205af4f659b66da5f63dc9593f7887b8606eb5438e1436124101304cedc19fdb8deb56a8da925ff89f43acb2a7fc1c01c14427048aee2e7e01a6722ccc0dc49c0b77feb5c7ed9f55df85118902caafa981bac1397b931a7e9ce1150a5c8278f9d1217297a08eda88fdc95c69f62f7f0ed5d54e944b924d88c2c9488f06b715a9f07f7cc673dc704b90c353c26afcf3728f8f4707d47b8ef883a00feface769fdba93988ac2a57579b5b26160f2d8a51437365554560c351d6d1620d5334b099761c3d7acf463016b765faa45ca19bd384de2612608a41969e5ad2384a22defae9c876111fd700b832682cdc12a57218f11057c6f87c226a1de74f9f163305a8fecf6d2f5a958727620a4bbee2738ae4fc4c975a3162d19e9afdfe2a3cf4d1922959a3f7006e123b212ef7f00cc71c73c44bffb8609f72351aee8e37ca67214408762983c4cc03e5c5ec958208f695c46199db6f10a4b96f5837eec22ca9ae2a68ce2b04c991b8ff91c9cf553a65d30030ffc795e24ead8982488abafa11b23ade4d2fcf72ffea2995f1e4634584ddefe6a7056f13312915d454f4a1a5580398cf1330346debe07c0770069b257e4ad42930fd9c0af406bd4e3a001f8a08cbc6bee058b0688d620f4dce2d2d26626f3c872965b6dece263a27a3407d701c0174c3577dcb914af8fbecdb8c7c6895d920df15f49b3f8d7494674912393e26c3842e5caec83a3c2537390a5f27db328af1c0f84c6fcd689c87ee1d415cc4abf9b778c2a74a41c2218fc983aa1b8ed73538ed5efe8fae9535776b4d0943a33a8a942ecb66b7b2beb9db037d1b0f25489316077718d38d3fa27666c25314f04763d5993efbf7112fd70f4ecdc254c6dc368a8bbef4724014edb3ee74f0cbc9f7ed2907cb8334ff9bebca990df0522b3af52d931b034adda04b333b8ef484b951b0796c2904852b8f90e74e9163179ef2c69727edb07ffa87e82176a12ed7a5e54cb88104e7fb0cd9abd9ad36ff505a43d649b2912d565c55d8c50a720c83a3c15871b7a20974416cdeb5fa66c233fba989c4892e6af28a678418340e4c056958ab23eac62b8cbeb02a54a557555bc6333df228fd65d19141e1d84c0838b050ee77ccc5c7ae7e20b8cf2797444051882d26a106491c5d617a9a4391aac36a8cd317cf8be339f91785441df7d5b39005ce862c5d8958199aec9fa8e483945b4eef9edc795ed5bb76c58d0767cadf35dc99b910a6b29783c610eeb13d23ba33cd2df2a435b41fceb2bb9d8fe181b7efdb219d94a6b8f5d62b1258200d82bec1dcc64ec10af2ca7598646e82cbf4297c98fdcba0e729db3ccd547d734696691b6d36c41894784d0309402e52cde4261029821a09ed0d084478faaa10bf4354c29289cd857b13576fbfeb8b1dd934c8d20eff3fa43b95174bf2e2b14e7b8429907e595d90cf9e7a770273d95cc0debe84471e2d4d84136186c9382c8d4ee637d0f251fe62364806c315983e2c6502d268a2e6a75f37150b3d851dc50ca02dfb0117154633a38a51f9247d5eea4163186b21fa19926a89f63755aeaf62f98ab840c15afde3b011e5ba08e7931afa38d4a48b932723de97e5c8ce8e19087dc818797aa01fa542de7e5edbd2bec792e59b29ff81377ac305a9b8182e70af480b49a45050f79db912297cfc94b94d78b520fd72ecdcac4cc24a79f902d71cccc7d69b9e97ca3db8e430f94b40deacff153230ecece173c25249d673ab1fb45e3b96c7610f51bf456007ff1762eacb0c3ddb9822a6bc322709a963230ac7a836e27dc9bd39bc77482dfb2f1816fab10f99edb0d8c2828e23ebc5eb63946c8af65d41ec66ff80f062b97ae98dd5500f36aeaeb04c3e920907b0004aa30a719c7e4c5958f971a1a21ad77a775cb34ecd31a0f6a42a17c66f4717cda306777aa60d3414e2121807aa3d1167c7bd37839fb5cc32a293b86f4fa49ce751d926cd93bcacf829dee86ebfc83f1d0f7482728446b01e61abbe6169c6132cb9aa0494286e8713f82e26de0f909abeab2b06c0c8ba9acc466b078f9e18ee99779ebcfa7bb3426eed70b8d1d1118bd71d5dbd65034ccb7eed28bbd3963b5e478a4e13abd5b652b324d44178968d2da2dade17656deff8c22e456368ab1b737a01de3393e9523fa59fbec9cde95a594a69940ff91f63cd657ae0855d07e364ce7036801a3c5646ea2e380096cda97045f2e7f180b428fdcb2bbf59dbee200a2711f6c26c3c4776fdafd90e3d29aedaee47552daac8e0abca599757b38579a787eef6deee54d6eb51b567b23dbb59e959dd016b1c9b2a505472d30f7d262273933ffb8494f8c05369cf09806c5682eea402f627b399a899c48e563b50e87da9af357cabfb3b08d6a594bb2d7961c4d0c3a39094af2048b813999ebe006c11f61afe95cea05b046191079325570245c6055351030f4168c2b26ad06fa9476272eec40621d4511ac615c83a704113d976dc7cf9752251f87628ae8a3d2b7eaea92fe492ac3f80ad5db06487514e89b3335b81799e4a8937c88ebef5901a2959b1f72ddeaa3bf350cdf1cd29715d0aa9fadd874f505070bb9eb3e3ecc42147ba51e7bd6f45c20ac5aafd1088115907a674c267208d08268c991677b365dab96235134e866e9ea8bcfc2a48b130b78fc2b39c412479b24bf91b7c3525f447e9d3cea3902fdfaacac45500d03971a7f7a056e976c1a101d6c0011f99dc23e0c1a215ecfd3cd146b2d4cbe49ba950dd1a5c2675a1ab4ef6f6191e12e3819a725fac94018a44e24c50e747ed198f112e291f4d3bc61f06655abbf1e533878cee855bcf9cb44c5ec18c384ad81026282345eec371aab5808f2063faea69d0971006455f3d7b10e14d808c7168534b0302efd787ae1ee073b6ce35c578b8c67835b733a6096f01190cb043cd6a3241923eeb36568163e7a53f75800077b2be6ba5dc2d7f79a38a2614b19a612443bfb48fde9fbe3b464b49a0f95dd27c73800f06e952e04defa86b76c4e26c9251832c0b4ce8e281f85f6d0fb702ec2fa4a8e919cc7cd81881f3e12c076fcc5b540f30f600e2a1f06f0a9e21841fdc8f4a53062239c8ad83a9c27802d8710d0e1e5156fdc05d4f0de08f5900cd58a51de26c0f3b887ba5011c9cc3faa244b971d573d3c220768425576b98cc637c823084fd72dade3ec8708d350e822bb738edf9c24ac8992ab2b61f41758ff64c6eba52a6bc6b46e9b112adf808d8f4f35e0c83298ff7100d832e574700ca0a4838a671ddf9b13f544781aa2106b116912df6c5975ab71593269597ac8d52bfc3259b6c00f4247f8468bc579990886ca867a2019687dbf33f3a323b3d2e55b795d6d8d4ec7e96c35c94534fac4ebfbbccada5187d21b4c192e86f999e8cc4dad4fceb9b35a07104e7433e1e9deb891533a57b0a97ec630ed8c0028ea511917fa5f49c71eb330cb9e7cb134e81ec09d30994dd87b4be8aa2b37933267a84ac2ae8b3a1ac45de61dec9c52061d7ebc8be55d9c59c47f883ca4d1176aa33be527c57eef7925850dfa55373c37a085c8b36564fbab9ead5b71e17a6c84e1e7671fbc78ec37333684a6a32f8ff212346178fa7d40cca347bf59aeb5342f373a05b8228efcdb7c4e155ce6f11793f33edab5c91f17072a4c8887c45669ffff60289710e544c95e7f7a9faabff8d2a80a3edbf238bc326384880cb0792f276fb065c9e906332d7fea0fff599f93b1ecba729ad25088d69a2c598bdf393ccba9c57fe975dc39eec2300d94fcdf4625ffeb025c5abf5d92c41022ec6baa2a856444fb5b652fc3828d886781275aab5fa67da55a4c4a07c84b3b07fe066f2f74f9407c51a4dcc0ac1b62e33dd478dc342efd89b3da289662e33392ec157d054666b1f8ea3ceb304e0d0fbfab2d25759ad1ee93cf85d0296a0884d4274f4ab318123fe694c1915f8fbd0a1953e5c09b4ea1da5503eff6628ed7b053d788766ddc02850fa5b00333e26a7fc221269e1b28fb1c65092a700369a681a61937b0016c6e65fa26c3991dcf68f899ae669fadef453f6a54168ab03e8918a88f208a8f45491bb7acd1ea38132f2dbdcd2f612bd1d6540d67c7c0b9bc391708c4344bb6a225136b2e60b00b71f53c9966fcf3e6434c998a8ecb565f47a28099b9e2291e66dfe53ee2f0f6ef6e3e214892bba0d0e8c8490391e29efdd10a93b36ed18f43c744553e82d89cf7e3bb1fa041aef7f76f4f1f1f3d695dca352dbd1b6814c0fa6023dced8caa314261869933b5241532425357787c4113a2c06c0715d7130fde3ec4b2dea5c818b563ef6c8ed82e2ff531239d81b175a366bc7787804734bb65a98e18128310ea7c7d5b08e67a157ad4eb56eaf65fa32b9ed2ecd04474b270f691f1dec4b3700ed771b59cf68a01ad1bc1fbd44d25290b2789fcbc904
|
|
@@ -9,7 +9,6 @@ export * from './components/admin/site-health/site-health-cloudwatch.integration
|
|
|
9
9
|
export * from './components/admin/site-health/site-health-core-web-vitals.integration';
|
|
10
10
|
export * from './components/admin/site-health/site-health-github.integration';
|
|
11
11
|
export * from './components/admin/site-health/site-health-google-analytics.integration';
|
|
12
|
-
// Re-export CacheManager for server/admin consumers (migration: RouteCache → CacheManager)
|
|
13
12
|
export * from './components/general/cache-manager';
|
|
14
13
|
export * from './components/admin/site-health/site-health-google-search-console.integration';
|
|
15
14
|
export * from './components/admin/site-health/site-health-indicators';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smartimage.d.ts","sourceRoot":"","sources":["../../../../src/components/general/smartimage.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AA4EnD,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;AACjH,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"smartimage.d.ts","sourceRoot":"","sources":["../../../../src/components/general/smartimage.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AA4EnD,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;AACjH,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,2CA2I/C;yBA3Ie,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../src/components/general/table.tsx"],"names":[],"mappings":"AACA,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../src/components/general/table.tsx"],"names":[],"mappings":"AACA,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,aAAa,CAAC;AAgBrB,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,SAAS,CAAC,CAAC;AAC3D,wBAAgB,KAAK,CAAE,KAAK,EAAE,SAAS,2CA6HtC;yBA7He,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shoppingcart.components.d.ts","sourceRoot":"","sources":["../../../../src/components/shoppingcart/shoppingcart.components.tsx"],"names":[],"mappings":"AAIA,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAMnD,OAAO,8BAA8B,CAAC;AAStC,OAAO,oBAAoB,CAAC;AAa5B,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;AACzE,wBAAgB,YAAY,CAAE,KAAK,EAAE,gBAAgB,2CA2LpD;yBA3Le,YAAY;;;;;AAwM5B,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,SAAS,CAAC,CAAC;AACjF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,oBAAoB,2CAmD3D;yBAnDe,gBAAgB;;;;;;;;;;;;AA8EhC,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,SAAS,CAAC,CAAC;AAC3E,wBAAgB,aAAa,CAAC,KAAK,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"shoppingcart.components.d.ts","sourceRoot":"","sources":["../../../../src/components/shoppingcart/shoppingcart.components.tsx"],"names":[],"mappings":"AAIA,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAMnD,OAAO,8BAA8B,CAAC;AAStC,OAAO,oBAAoB,CAAC;AAa5B,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;AACzE,wBAAgB,YAAY,CAAE,KAAK,EAAE,gBAAgB,2CA2LpD;yBA3Le,YAAY;;;;;AAwM5B,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,SAAS,CAAC,CAAC;AACjF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,oBAAoB,2CAmD3D;yBAnDe,gBAAgB;;;;;;;;;;;;AA8EhC,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,SAAS,CAAC,CAAC;AAC3E,wBAAgB,aAAa,CAAC,KAAK,EAAE,iBAAiB,2CAoDrD;yBApDe,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;AA0D7B,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC;AACrE,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,2CAiC/C;yBAjCe,UAAU;;;;;AAwC1B,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,CAAC;AAC/E,wBAAgB,eAAe,CAAC,KAAK,EAAE,mBAAmB,2CAQzD;yBARe,eAAe;;;;;;AAgB/B,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,CAAC;AAC/E,wBAAgB,eAAe,CAAC,KAAK,EAAE,mBAAmB,2CAkBzD;yBAlBe,eAAe;;;;;;;AAyB/B,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,SAAS,CAAC,CAAC;AAC7E,wBAAgB,cAAc,CAAC,KAAK,EAAE,kBAAkB,2CAQvD;yBARe,cAAc"}
|
|
@@ -42,7 +42,7 @@ export type CheckoutType = {
|
|
|
42
42
|
};
|
|
43
43
|
export declare function formatAsUSD(cost: number): string;
|
|
44
44
|
export declare function formatAsHundredths(num: number): number;
|
|
45
|
-
export declare function getCart():
|
|
45
|
+
export declare function getCart(): ShoppingCartType[];
|
|
46
46
|
export declare function setCart(shoppingCartJSON: ShoppingCartType[]): void;
|
|
47
47
|
export declare function alreadyInCart(cart: ShoppingCartType[], itemID: string): boolean;
|
|
48
48
|
export declare function increaseQuantityCart(cart: ShoppingCartType[], itemID: string): void;
|
|
@@ -59,7 +59,7 @@ export declare function validateDiscountCode(field: {
|
|
|
59
59
|
value: string;
|
|
60
60
|
}): Promise<boolean | undefined>;
|
|
61
61
|
export declare function getRemoteDiscountCodes(): Promise<any>;
|
|
62
|
-
export declare function getLocalDiscountCodes():
|
|
62
|
+
export declare function getLocalDiscountCodes(): DiscountCodeType[];
|
|
63
63
|
export declare function setDiscountCodes(discountCodesJSON: DiscountCodeType[]): void;
|
|
64
64
|
export declare function getDiscountCode(codeString: string): DiscountCodeType | undefined;
|
|
65
65
|
export declare function getCartSubtotalDiscount(cart: ShoppingCartType[]): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shoppingcart.functions.d.ts","sourceRoot":"","sources":["../../../../src/components/shoppingcart/shoppingcart.functions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shoppingcart.functions.d.ts","sourceRoot":"","sources":["../../../../src/components/shoppingcart/shoppingcart.functions.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,eAAe,mBAAmB,CAAC;AAChD,eAAO,MAAM,eAAe,2BAA2B,CAAC;AACxD,eAAO,MAAM,gBAAgB,4BAA4B,CAAC;AAC1D,eAAO,MAAM,eAAe,2BAA2B,CAAC;AAqBxD,MAAM,MAAM,gBAAgB,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAG,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAA;AAoBD,MAAM,MAAM,WAAW,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,E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CAAC,KAAK,EAAE,gBAAgB,2CAInD;yBAJe,YAAY;;;AAO5B,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shoppingcart.contract.test.d.ts","sourceRoot":"","sources":["../../../src/tests/shoppingcart.contract.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shoppingcart.integration.test.d.ts","sourceRoot":"","sources":["../../../src/tests/shoppingcart.integration.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shoppingcart.migration.test.d.ts","sourceRoot":"","sources":["../../../src/tests/shoppingcart.migration.test.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixelated-tech/components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.11.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Pixelated Technologies",
|
|
@@ -74,10 +74,10 @@
|
|
|
74
74
|
"copy2all": "npm run copy2brianwhaley && npm run copy2informationfocus && npm run copy2jzhomeimprovement && npm run copy2oaktreelandscaping && npm run copy2palmettoepoxy && npm run copy2pixelated && npm run copy2pixelvivid && npm run copy2template && npm run copy2pixelatedadmin",
|
|
75
75
|
"storybook": "rm -rf node_modules/.cache && storybook dev -p 6006",
|
|
76
76
|
"buildStorybook": "rm -rf node_modules/.cache && NODE_OPTIONS=\"--max-old-space-size=4096\" storybook build",
|
|
77
|
-
"test": "vitest",
|
|
77
|
+
"test": "vitest run --silent",
|
|
78
78
|
"test:ui": "vitest --ui",
|
|
79
79
|
"test:coverage": "vitest run --coverage",
|
|
80
|
-
"test:
|
|
80
|
+
"test:watch": "vitest",
|
|
81
81
|
"lint": "eslint --fix",
|
|
82
82
|
"release": "./src/scripts/release.sh",
|
|
83
83
|
"vault": "npx tsx src/scripts/config-vault.ts",
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"@testing-library/react": "^16.3.2",
|
|
126
126
|
"@testing-library/user-event": "^14.6.1",
|
|
127
127
|
"@types/md5": "^2.3.6",
|
|
128
|
-
"@types/node": "^25.0.
|
|
128
|
+
"@types/node": "^25.0.10",
|
|
129
129
|
"@types/prop-types": "^15.7.15",
|
|
130
130
|
"@types/react": "^19.2.9",
|
|
131
131
|
"@types/react-dom": "^19.2.3",
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
"react-redux": "^9.2.0",
|
|
162
162
|
"react-test-renderer": "^19.2.3",
|
|
163
163
|
"redux": "^5.0.1",
|
|
164
|
-
"sass": "^1.97.
|
|
164
|
+
"sass": "^1.97.3",
|
|
165
165
|
"sass-loader": "^16.0.6",
|
|
166
166
|
"storybook": "^10.2.0",
|
|
167
167
|
"style-loader": "^4.0.0",
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
"md5": "^2.3.0",
|
|
187
187
|
"puppeteer": "^24.35.0",
|
|
188
188
|
"react-redux": "*",
|
|
189
|
-
"recharts": "^3.
|
|
189
|
+
"recharts": "^3.7.0",
|
|
190
190
|
"redux": "*"
|
|
191
191
|
},
|
|
192
192
|
"type": "module"
|