@pixelated-tech/components 3.9.18 → 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/google.api.integration.js +13 -3
- package/dist/components/admin/site-health/seo-metrics.config.json +0 -10
- package/dist/components/admin/site-health/site-health-cloudwatch.integration.js +10 -3
- 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/admin/site-health/site-health-uptime.integration.js +1 -1
- package/dist/components/general/proxy-handler.js +3 -3
- package/dist/components/general/resume.css +4 -0
- package/dist/components/general/smartimage.js +5 -0
- package/dist/components/general/table.js +33 -4
- package/dist/components/general/utilities.js +6 -0
- 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.adminclient.js +0 -1
- package/dist/index.adminserver.js +1 -1
- package/dist/types/components/admin/site-health/google.api.integration.d.ts.map +1 -1
- package/dist/types/components/admin/site-health/site-health-cloudwatch.integration.d.ts.map +1 -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/general/utilities.d.ts +2 -0
- package/dist/types/components/general/utilities.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/index.adminclient.d.ts +0 -1
- package/dist/types/index.adminserver.d.ts +1 -1
- package/dist/types/test/test-data.d.ts +1282 -0
- package/dist/types/test/test-data.d.ts.map +1 -0
- package/dist/types/tests/routecache.analytics.consumer.integration.test.d.ts +2 -0
- package/dist/types/tests/routecache.analytics.consumer.integration.test.d.ts.map +1 -0
- package/dist/types/tests/routecache.consumer.integration.test.d.ts +2 -0
- package/dist/types/tests/routecache.consumer.integration.test.d.ts.map +1 -0
- package/dist/types/tests/routes-json-smoke.test.d.ts +2 -0
- package/dist/types/tests/routes-json-smoke.test.d.ts.map +1 -0
- 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/dist/types/tests/site-health-cache.unit.test.2.d.ts +2 -0
- package/dist/types/tests/site-health-cache.unit.test.2.d.ts.map +1 -0
- package/dist/types/tests/site-health-cache.unit.test.d.ts +2 -0
- package/dist/types/tests/site-health-cache.unit.test.d.ts.map +1 -0
- package/package.json +16 -16
- package/dist/components/admin/site-health/site-health-cache.js +0 -23
- package/dist/components/config/config.example.js +0 -77
- package/dist/types/components/admin/site-health/site-health-cache.d.ts +0 -12
- package/dist/types/components/admin/site-health/site-health-cache.d.ts.map +0 -1
- package/dist/types/components/config/config.example.d.ts +0 -4
- package/dist/types/components/config/config.example.d.ts.map +0 -1
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
"use server";
|
|
7
7
|
import { google } from 'googleapis';
|
|
8
|
-
import {
|
|
8
|
+
import { CacheManager } from '../../general/cache-manager';
|
|
9
9
|
import { calculateDateRanges, formatChartDate, getCachedData, setCachedData } from './google.api.utils';
|
|
10
|
+
// Migration-time debug flag (owner requested): verbose cache traces during migration
|
|
11
|
+
const debug = false; // keep as literal during migration for traceability
|
|
10
12
|
/**
|
|
11
13
|
* Create authenticated Google API client for a specific service
|
|
12
14
|
*/
|
|
@@ -71,7 +73,7 @@ export async function createSearchConsoleClient(config) {
|
|
|
71
73
|
};
|
|
72
74
|
}
|
|
73
75
|
// Cache for analytics data (1 hour)
|
|
74
|
-
const analyticsCache = new
|
|
76
|
+
const analyticsCache = new CacheManager({ prefix: 'sitehealth-analytics-', ttl: 60 * 60 * 1000 });
|
|
75
77
|
/**
|
|
76
78
|
* Get Google Analytics data for a site with current/previous period comparison
|
|
77
79
|
*/
|
|
@@ -81,8 +83,12 @@ export async function getGoogleAnalyticsData(config, siteName, startDate, endDat
|
|
|
81
83
|
const cacheKey = `analytics-${siteName}-${startDate || 'default'}-${endDate || 'default'}`;
|
|
82
84
|
const cached = getCachedData(analyticsCache, cacheKey);
|
|
83
85
|
if (cached) {
|
|
86
|
+
if (debug)
|
|
87
|
+
console.debug('[site-health][analytics] cache HIT', cacheKey);
|
|
84
88
|
return { success: true, data: cached };
|
|
85
89
|
}
|
|
90
|
+
if (debug)
|
|
91
|
+
console.debug('[site-health][analytics] cache MISS', cacheKey);
|
|
86
92
|
if (!config.ga4PropertyId || config.ga4PropertyId === 'GA4_PROPERTY_ID_HERE') {
|
|
87
93
|
return {
|
|
88
94
|
success: false,
|
|
@@ -149,6 +155,8 @@ export async function getGoogleAnalyticsData(config, siteName, startDate, endDat
|
|
|
149
155
|
});
|
|
150
156
|
}
|
|
151
157
|
// Cache the result
|
|
158
|
+
if (debug)
|
|
159
|
+
console.debug('[site-health][analytics] caching', cacheKey, 'rows=', chartData.length);
|
|
152
160
|
setCachedData(analyticsCache, cacheKey, chartData);
|
|
153
161
|
return { success: true, data: chartData };
|
|
154
162
|
}
|
|
@@ -161,7 +169,7 @@ export async function getGoogleAnalyticsData(config, siteName, startDate, endDat
|
|
|
161
169
|
}
|
|
162
170
|
}
|
|
163
171
|
// Cache for search console data (1 hour)
|
|
164
|
-
const searchConsoleCache = new
|
|
172
|
+
const searchConsoleCache = new CacheManager({ prefix: 'sitehealth-searchconsole-', ttl: 60 * 60 * 1000 });
|
|
165
173
|
/**
|
|
166
174
|
* Get Google Search Console data for a site with current/previous period comparison
|
|
167
175
|
*/
|
|
@@ -245,6 +253,8 @@ export async function getSearchConsoleData(config, siteName, startDate, endDate)
|
|
|
245
253
|
});
|
|
246
254
|
}
|
|
247
255
|
// Cache the result
|
|
256
|
+
if (debug)
|
|
257
|
+
console.debug('[site-health][searchconsole] caching', cacheKey, 'rows=', chartData.length);
|
|
248
258
|
setCachedData(searchConsoleCache, cacheKey, chartData);
|
|
249
259
|
return { success: true, data: chartData };
|
|
250
260
|
}
|
|
@@ -188,16 +188,6 @@
|
|
|
188
188
|
"scoreLogic": "present",
|
|
189
189
|
"displayTemplate": "{{count}} robots meta tag(s) found"
|
|
190
190
|
},
|
|
191
|
-
"hreflang-tags": {
|
|
192
|
-
"id": "hreflang-tags",
|
|
193
|
-
"title": "Hreflang Tags",
|
|
194
|
-
"description": "Checks for hreflang link tags for international SEO",
|
|
195
|
-
"scoreDisplayMode": "binary",
|
|
196
|
-
"pattern": "<link[^>]*rel=[\"']alternate[\"'][^>]*hreflang=[\"'][^\"']*[\"'][^>]*>",
|
|
197
|
-
"countLogic": "count",
|
|
198
|
-
"scoreLogic": "present",
|
|
199
|
-
"displayTemplate": "{{count}} hreflang link(s) found"
|
|
200
|
-
},
|
|
201
191
|
"indexability-status": {
|
|
202
192
|
"id": "indexability-status",
|
|
203
193
|
"title": "Indexability Status",
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
"use server";
|
|
6
6
|
import { CloudWatchClient, GetMetricDataCommand } from '@aws-sdk/client-cloudwatch';
|
|
7
|
-
import {
|
|
7
|
+
import { CacheManager } from '../../general/cache-manager';
|
|
8
8
|
import { getFullPixelatedConfig } from '../../config/config';
|
|
9
|
+
const debug = false; // migration-time verbose logging
|
|
9
10
|
// Cache for health check data (15 minutes)
|
|
10
|
-
const healthCheckCache = new
|
|
11
|
+
const healthCheckCache = new CacheManager({ prefix: 'sitehealth-cloudwatch-', ttl: 15 * 60 * 1000 });
|
|
11
12
|
/**
|
|
12
13
|
* Get health check data for a site using CloudWatch metrics
|
|
13
14
|
*/
|
|
@@ -17,7 +18,11 @@ export async function getCloudwatchHealthCheckData(config, siteName, startDate,
|
|
|
17
18
|
const cacheKey = `cloudwatch-${siteName}-${config.healthCheckId}-${startDate || 'default'}-${endDate || 'default'}`;
|
|
18
19
|
const cached = healthCheckCache.get(cacheKey);
|
|
19
20
|
if (cached) {
|
|
20
|
-
|
|
21
|
+
if (Array.isArray(cached)) {
|
|
22
|
+
return { success: true, data: cached };
|
|
23
|
+
}
|
|
24
|
+
// defensive: cached value present but not an array — coerce to empty array
|
|
25
|
+
return { success: true, data: [] };
|
|
21
26
|
}
|
|
22
27
|
// Use CloudWatch to get historical health check data
|
|
23
28
|
// Prefer credentials from unified config (pixelated.config.json) when present (avoids env vars)
|
|
@@ -133,6 +138,8 @@ export async function getCloudwatchHealthCheckData(config, siteName, startDate,
|
|
|
133
138
|
filledData = data;
|
|
134
139
|
}
|
|
135
140
|
// Cache the result
|
|
141
|
+
if (debug)
|
|
142
|
+
console.debug('[site-health][cloudwatch] caching', cacheKey, 'rows=', filledData.length);
|
|
136
143
|
healthCheckCache.set(cacheKey, filledData);
|
|
137
144
|
return { success: true, data: filledData };
|
|
138
145
|
}
|
|
@@ -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" })] }) }) }) }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Route53Client, GetHealthCheckStatusCommand } from '@aws-sdk/client-route-53';
|
|
2
2
|
import { getFullPixelatedConfig } from '../../config/config';
|
|
3
|
-
const debug =
|
|
3
|
+
const debug = false;
|
|
4
4
|
export async function checkUptimeHealth(healthCheckId) {
|
|
5
5
|
try {
|
|
6
6
|
// Simple Route 53 call (global service). Prefer credentials from pixelated.config.json when present
|
|
@@ -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 ========== */
|
|
@@ -53,6 +53,12 @@ export function generateUUID() {
|
|
|
53
53
|
export function capitalize(str) {
|
|
54
54
|
return str[0].toUpperCase() + str.toLowerCase().slice(1);
|
|
55
55
|
}
|
|
56
|
+
/** Capitalize the first letter of each word in `input`. */
|
|
57
|
+
export function capitalizeWords(input) {
|
|
58
|
+
if (!input)
|
|
59
|
+
return input;
|
|
60
|
+
return input.replace(/\p{L}[\p{L}'’-]*/gu, (word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase());
|
|
61
|
+
}
|
|
56
62
|
/*
|
|
57
63
|
Array.prototype.contains = function(obj) {
|
|
58
64
|
return this.indexOf(obj) > -1;
|
|
@@ -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
|
|
@@ -21,7 +21,6 @@ export * from './components/admin/site-health/site-health-mock-context';
|
|
|
21
21
|
// Client-safe admin components (can run on both client and server)
|
|
22
22
|
export * from './components/admin/site-health/google.api.utils';
|
|
23
23
|
export * from './components/admin/site-health/seo-constants';
|
|
24
|
-
export * from './components/admin/site-health/site-health-cache';
|
|
25
24
|
export * from './components/admin/site-health/site-health-indicators';
|
|
26
25
|
export * from './components/admin/site-health/site-health-on-site-seo.integration';
|
|
27
26
|
export * from './components/admin/site-health/site-health-performance';
|
|
@@ -5,11 +5,11 @@ export * from './components/admin/site-health/google.api.integration';
|
|
|
5
5
|
export * from './components/admin/site-health/google.api.utils';
|
|
6
6
|
export * from './components/admin/site-health/seo-constants';
|
|
7
7
|
export * from './components/admin/site-health/site-health-axe-core.integration';
|
|
8
|
-
export * from './components/admin/site-health/site-health-cache';
|
|
9
8
|
export * from './components/admin/site-health/site-health-cloudwatch.integration';
|
|
10
9
|
export * from './components/admin/site-health/site-health-core-web-vitals.integration';
|
|
11
10
|
export * from './components/admin/site-health/site-health-github.integration';
|
|
12
11
|
export * from './components/admin/site-health/site-health-google-analytics.integration';
|
|
12
|
+
export * from './components/general/cache-manager';
|
|
13
13
|
export * from './components/admin/site-health/site-health-google-search-console.integration';
|
|
14
14
|
export * from './components/admin/site-health/site-health-indicators';
|
|
15
15
|
export * from './components/admin/site-health/site-health-on-site-seo.integration';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google.api.integration.d.ts","sourceRoot":"","sources":["../../../../../src/components/admin/site-health/google.api.integration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"google.api.integration.d.ts","sourceRoot":"","sources":["../../../../../src/components/admin/site-health/google.api.integration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,GAAG,CAAC;IACV,MAAM,EAAE,GAAG,CAAC;CACb;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC3C,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,MAAM,EAAE,GACd,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,GAAG,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAmC3D;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAS/F;AAED;;GAEG;AACH,wBAAsB,yBAAyB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CASnG;AAKD,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,uBAAuB;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,cAAc,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAKD;;GAEG;AACH,wBAAsB,sBAAsB,CAC3C,MAAM,EAAE,qBAAqB,EAC7B,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,uBAAuB,CAAC,CAsGlC;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,2BAA2B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,2BAA2B,EAAE,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAKD;;GAEG;AACH,wBAAsB,oBAAoB,CACzC,MAAM,EAAE,mBAAmB,EAC3B,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,qBAAqB,CAAC,CAqHhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site-health-cloudwatch.integration.d.ts","sourceRoot":"","sources":["../../../../../src/components/admin/site-health/site-health-cloudwatch.integration.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"site-health-cloudwatch.integration.d.ts","sourceRoot":"","sources":["../../../../../src/components/admin/site-health/site-health-cloudwatch.integration.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,MAAM,WAAW,2BAA2B;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,6BAA6B;IAC7C,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAKD;;GAEG;AACH,wBAAsB,4BAA4B,CACjD,MAAM,EAAE,2BAA2B,EACnC,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,6BAA6B,CAAC,CAsJxC"}
|
|
@@ -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"}
|
|
@@ -6,6 +6,8 @@ export declare function randomBetween(min: number, max: number): number;
|
|
|
6
6
|
export declare function generateKey(): string;
|
|
7
7
|
export declare function generateUUID(): string;
|
|
8
8
|
export declare function capitalize(str: string): string;
|
|
9
|
+
/** Capitalize the first letter of each word in `input`. */
|
|
10
|
+
export declare function capitalizeWords(input: string): string;
|
|
9
11
|
export declare function attributeMap(oldAttribute: string): string;
|
|
10
12
|
/**
|
|
11
13
|
* Adds a single 'change' event listener to the document and uses event delegation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../../../src/components/general/utilities.ts"],"names":[],"mappings":"AAGA,wBAAgB,QAAQ,CAAE,GAAG,EAAE,MAAM,oBAUpC;AAGD,wBAAgB,SAAS,CAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG;;EAmBxC;AAED,wBAAgB,aAAa,CAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,UAOtD;AAED,wBAAgB,WAAW,WAc1B;AAED,wBAAgB,YAAY,WAK3B;AAED,wBAAgB,UAAU,CAAE,GAAG,EAAE,MAAM,UAEtC;AAQD,wBAAgB,YAAY,CAAE,YAAY,EAAE,MAAM,UAgCjD;AAID;;;;OAII;AACJ,wBAAgB,YAAY,SAoB3B;AAOD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,UA0BhC,CAAC;AAGF;;GAEG;AACH,eAAO,MAAM,uBAAuB,UAQnC,CAAC;AAEF,eAAO,MAAM,wBAAwB,UAOpC,CAAC;AAGF;;GAEG;AACH,eAAO,MAAM,oBAAoB,UAoBhC,CAAC"}
|
|
1
|
+
{"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../../../src/components/general/utilities.ts"],"names":[],"mappings":"AAGA,wBAAgB,QAAQ,CAAE,GAAG,EAAE,MAAM,oBAUpC;AAGD,wBAAgB,SAAS,CAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG;;EAmBxC;AAED,wBAAgB,aAAa,CAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,UAOtD;AAED,wBAAgB,WAAW,WAc1B;AAED,wBAAgB,YAAY,WAK3B;AAED,wBAAgB,UAAU,CAAE,GAAG,EAAE,MAAM,UAEtC;AAGD,2DAA2D;AAC3D,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKrD;AAQD,wBAAgB,YAAY,CAAE,YAAY,EAAE,MAAM,UAgCjD;AAID;;;;OAII;AACJ,wBAAgB,YAAY,SAoB3B;AAOD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,UA0BhC,CAAC;AAGF;;GAEG;AACH,eAAO,MAAM,uBAAuB,UAQnC,CAAC;AAEF,eAAO,MAAM,wBAAwB,UAOpC,CAAC;AAGF;;GAEG;AACH,eAAO,MAAM,oBAAoB,UAoBhC,CAAC"}
|
|
@@ -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"}
|