@standhigher/besttrack-page-extension 0.5.11 → 0.5.12
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/index.d.ts +125 -105
- package/dist/index.js +910 -762
- package/dist/validation.js +6 -3
- package/package.json +2 -2
- package/dist/{chunk-KEW42Y26.js → chunk-KD7KFFFK.js} +28 -28
package/dist/index.js
CHANGED
|
@@ -11,11 +11,10 @@ import {
|
|
|
11
11
|
isValidTrackingNumber,
|
|
12
12
|
resolveShopifyResources,
|
|
13
13
|
safeTrackingPageUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KD7KFFFK.js";
|
|
15
15
|
|
|
16
|
-
// src/
|
|
17
|
-
import { createContext, useCallback
|
|
18
|
-
import { parseProductReferences } from "@standhigher/puck-page-builder/runtime";
|
|
16
|
+
// src/tracking-runtime.tsx
|
|
17
|
+
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
19
18
|
|
|
20
19
|
// src/shopify-track-page/i18n/locales.ts
|
|
21
20
|
var SUPPORTED_LOCALES = [
|
|
@@ -592,6 +591,19 @@ var sanitizeMilestone = (milestone) => ({
|
|
|
592
591
|
estimated_delivery: sanitizeEstimatedDelivery(milestone?.estimated_delivery)
|
|
593
592
|
});
|
|
594
593
|
var sanitizeMilestones = (milestones) => Array.isArray(milestones) ? milestones.map(sanitizeMilestone) : [];
|
|
594
|
+
function mergeDisplayValues(previous, next) {
|
|
595
|
+
const normalizedNext = next.filter(Boolean);
|
|
596
|
+
if (normalizedNext.length === 0) {
|
|
597
|
+
return previous;
|
|
598
|
+
}
|
|
599
|
+
const merged = [...normalizedNext];
|
|
600
|
+
previous.forEach((value) => {
|
|
601
|
+
if (!normalizedNext.includes(value)) {
|
|
602
|
+
merged.push(value);
|
|
603
|
+
}
|
|
604
|
+
});
|
|
605
|
+
return merged.slice(0, 3);
|
|
606
|
+
}
|
|
595
607
|
function normalizeOrderValue(value) {
|
|
596
608
|
return value.trim();
|
|
597
609
|
}
|
|
@@ -890,6 +902,7 @@ function mapShopifyTrackQueryResponse(response, request, locale = "EN") {
|
|
|
890
902
|
events: primary.events,
|
|
891
903
|
orderItems: primary.orderItems,
|
|
892
904
|
ad,
|
|
905
|
+
// 旧接口广告是本次响应共用配置,因此复制到各包裹,切换后仍能读取同一广告。
|
|
893
906
|
shipments: shipments.map((shipment) => ({ ...shipment, ad }))
|
|
894
907
|
};
|
|
895
908
|
}
|
|
@@ -973,11 +986,342 @@ function createShopifyRecommendationsQuery(post) {
|
|
|
973
986
|
};
|
|
974
987
|
}
|
|
975
988
|
|
|
989
|
+
// src/tracking-block-model.ts
|
|
990
|
+
import { parseProductReferences } from "@standhigher/puck-page-builder/runtime";
|
|
991
|
+
function defaultProgress(status) {
|
|
992
|
+
const steps = [
|
|
993
|
+
{ id: "ordered", label: "Ordered", icon: "check" },
|
|
994
|
+
{ id: "ready", label: "Order Ready", icon: "bag" },
|
|
995
|
+
{ id: "transit", label: "In Transit", icon: "truck" },
|
|
996
|
+
{ id: "out", label: "Out for Delivery", icon: "box" },
|
|
997
|
+
{ id: "delivered", label: "Delivered", icon: "check" }
|
|
998
|
+
];
|
|
999
|
+
const normalized = status.toLowerCase();
|
|
1000
|
+
const current = normalized.includes("deliver") ? normalized.includes("out for") ? 3 : 4 : normalized.includes("transit") ? 2 : normalized.includes("ready") ? 1 : 0;
|
|
1001
|
+
return steps.map((step, index) => ({
|
|
1002
|
+
...step,
|
|
1003
|
+
state: index < current ? "complete" : index === current ? "current" : "upcoming"
|
|
1004
|
+
}));
|
|
1005
|
+
}
|
|
1006
|
+
function previewTrackingPageResult(trackingNumber = "BT-2048-DEMO") {
|
|
1007
|
+
return {
|
|
1008
|
+
trackingNumber,
|
|
1009
|
+
status: "In transit",
|
|
1010
|
+
carrier: "BestTrack demo carrier",
|
|
1011
|
+
latestEvent: "Shipment accepted at the regional hub",
|
|
1012
|
+
updatedAt: "Sep 17, 10:00 AM",
|
|
1013
|
+
destination: "Shanghai",
|
|
1014
|
+
estimatedDelivery: "Sep 22 - Sep 24",
|
|
1015
|
+
progress: defaultProgress("In transit"),
|
|
1016
|
+
events: [
|
|
1017
|
+
{ id: "hub", title: "Shipment accepted at the regional hub", at: "Sep 17, 10:00 AM", state: "current" },
|
|
1018
|
+
{ id: "info", title: "The order has been placed and confirmed.", at: "Sep 16, 3:31 PM", state: "complete" }
|
|
1019
|
+
],
|
|
1020
|
+
orderItems: [{ id: "demo-order-item", title: "Demo shipment item", quantity: 1, description: "Product details are available in your order." }],
|
|
1021
|
+
// 演示结果保留该字段供画布取样;正式 Web 推荐仍通过 recommendationItems 读取独立来源。
|
|
1022
|
+
recommendations: [
|
|
1023
|
+
{ id: "shipping-protection", title: "Shipping protection", description: "Extra assurance for your next delivery.", price: { amount: 900, currencyCode: "USD" } },
|
|
1024
|
+
{ id: "delivery-alerts", title: "Delivery alerts", description: "Receive an update at every milestone.", price: { amount: 400, currencyCode: "USD" } }
|
|
1025
|
+
]
|
|
1026
|
+
};
|
|
1027
|
+
}
|
|
1028
|
+
function configuredRecommendations(products) {
|
|
1029
|
+
return parseProductReferences(products).map((product) => ({
|
|
1030
|
+
id: product.id,
|
|
1031
|
+
title: product.title || product.id,
|
|
1032
|
+
description: "",
|
|
1033
|
+
imageUrl: product.imageUrl,
|
|
1034
|
+
// 商品引用快照保存 handle;先生成店铺商品地址,渲染卡片时仍需经过 URL 安全检查。
|
|
1035
|
+
href: resolveShopifyRecommendHref(void 0, product.handle),
|
|
1036
|
+
...product.price ? { price: product.price } : {}
|
|
1037
|
+
}));
|
|
1038
|
+
}
|
|
1039
|
+
function trackingEvents(result) {
|
|
1040
|
+
if (result?.events?.length) return result.events;
|
|
1041
|
+
if (result?.latestEvent) return [{ id: "latest", title: result.latestEvent, at: result.updatedAt, state: "current" }];
|
|
1042
|
+
return [];
|
|
1043
|
+
}
|
|
1044
|
+
function formatRecommendationPrice(price) {
|
|
1045
|
+
if (!price || !Number.isInteger(price.amount)) return "";
|
|
1046
|
+
return `$ ${(price.amount / 100).toFixed(2)}`;
|
|
1047
|
+
}
|
|
1048
|
+
function trackingSteps(result) {
|
|
1049
|
+
return result.progress?.length ? result.progress : defaultProgress(result.status);
|
|
1050
|
+
}
|
|
1051
|
+
function recommendationItems(products, runtime) {
|
|
1052
|
+
const configured = configuredRecommendations(products);
|
|
1053
|
+
return configured.length ? configured : runtime.recommendations.phase === "success" ? runtime.recommendations.items : [];
|
|
1054
|
+
}
|
|
1055
|
+
function trackingSelection(result, recentQueries) {
|
|
1056
|
+
const identity = recentQueries.length > 0 ? { mode: recentQueries[0].mode, values: recentQueries.map((item) => item.value).slice(0, 3) } : { mode: "tracking", values: result.trackingNumber ? [result.trackingNumber] : [] };
|
|
1057
|
+
const shipmentValues = (result.shipments ?? []).map((shipment, index) => shipment.trackingNumber || shipment.label || `shipment #${index + 1}`);
|
|
1058
|
+
return { identity, shipmentValues };
|
|
1059
|
+
}
|
|
1060
|
+
function trackingBlockState({ phase, autoQueryDemo = false }) {
|
|
1061
|
+
return {
|
|
1062
|
+
showResult: phase === "success",
|
|
1063
|
+
showNotFound: phase === "empty",
|
|
1064
|
+
showUnavailable: phase === "error",
|
|
1065
|
+
showProgress: phase === "success" || phase === "empty" || phase === "error",
|
|
1066
|
+
showDelivery: phase === "success" || phase === "error",
|
|
1067
|
+
showEstimatedDelivery: !autoQueryDemo
|
|
1068
|
+
};
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
// src/tracking-runtime.tsx
|
|
1072
|
+
import { jsx } from "react/jsx-runtime";
|
|
1073
|
+
function recentQueryFromRequest(request, result) {
|
|
1074
|
+
if (request.mode === "order") {
|
|
1075
|
+
const value2 = request.orderNumber.trim() || result.orderNumber?.trim() || "";
|
|
1076
|
+
if (!value2) return null;
|
|
1077
|
+
return { mode: "order", value: value2, email: request.email.trim() || void 0, result };
|
|
1078
|
+
}
|
|
1079
|
+
const value = request.trackingNumber.trim() || result.trackingNumber.trim();
|
|
1080
|
+
if (!value) return null;
|
|
1081
|
+
return { mode: "tracking", value, result };
|
|
1082
|
+
}
|
|
1083
|
+
function mergeRecentQueries(previous, next) {
|
|
1084
|
+
if (previous[0] && (previous[0].mode !== next.mode || next.mode === "order" && previous[0].email !== next.email)) return [next];
|
|
1085
|
+
const values = mergeDisplayValues(previous.map((item) => item.value), [next.value]);
|
|
1086
|
+
const byValue = new Map(previous.map((item) => [item.value, item]));
|
|
1087
|
+
byValue.set(next.value, next);
|
|
1088
|
+
return values.flatMap((value) => {
|
|
1089
|
+
const item = byValue.get(value);
|
|
1090
|
+
return item ? [item] : [];
|
|
1091
|
+
});
|
|
1092
|
+
}
|
|
1093
|
+
function resultWithShipment(result, index) {
|
|
1094
|
+
const shipment = result.shipments?.[index];
|
|
1095
|
+
if (!shipment) return result;
|
|
1096
|
+
return {
|
|
1097
|
+
...result,
|
|
1098
|
+
trackingNumber: shipment.trackingNumber || result.trackingNumber,
|
|
1099
|
+
status: shipment.status || result.status,
|
|
1100
|
+
carrier: shipment.carrier,
|
|
1101
|
+
latestEvent: shipment.latestEvent,
|
|
1102
|
+
updatedAt: shipment.updatedAt,
|
|
1103
|
+
destination: shipment.destination,
|
|
1104
|
+
estimatedDelivery: shipment.estimatedDelivery,
|
|
1105
|
+
progress: shipment.progress ?? result.progress,
|
|
1106
|
+
events: shipment.events ?? result.events,
|
|
1107
|
+
orderItems: shipment.orderItems ?? result.orderItems,
|
|
1108
|
+
ad: shipment.ad ?? result.ad
|
|
1109
|
+
};
|
|
1110
|
+
}
|
|
1111
|
+
var initialRuntime = {
|
|
1112
|
+
phase: "idle",
|
|
1113
|
+
recentQueries: [],
|
|
1114
|
+
selectedRecentIndex: 0,
|
|
1115
|
+
selectionRevision: 0,
|
|
1116
|
+
selectedShipmentIndex: 0,
|
|
1117
|
+
selectRecentQuery() {
|
|
1118
|
+
return void 0;
|
|
1119
|
+
},
|
|
1120
|
+
selectShipment() {
|
|
1121
|
+
return void 0;
|
|
1122
|
+
},
|
|
1123
|
+
recommendations: { phase: "idle", items: [] },
|
|
1124
|
+
autoQueryFromUrl: false,
|
|
1125
|
+
autoQueryDemo: false,
|
|
1126
|
+
reset() {
|
|
1127
|
+
return void 0;
|
|
1128
|
+
},
|
|
1129
|
+
async query() {
|
|
1130
|
+
return void 0;
|
|
1131
|
+
}
|
|
1132
|
+
};
|
|
1133
|
+
var TrackingRuntimeContext = createContext(initialRuntime);
|
|
1134
|
+
async function queryMockTracking(request) {
|
|
1135
|
+
return previewTrackingPageResult(request.mode === "tracking" ? request.trackingNumber : request.orderNumber);
|
|
1136
|
+
}
|
|
1137
|
+
function TrackingRuntimeProvider({ children, query: injectedQuery, queryRecommendations, transport, autoQueryFromUrl, autoQueryDemo = false, watermark, adPreview, resourceResolution }) {
|
|
1138
|
+
const [state, setState] = useState({ phase: "idle" });
|
|
1139
|
+
const [recentQueries, setRecentQueries] = useState([]);
|
|
1140
|
+
const [selectedRecentIndex, setSelectedRecentIndex] = useState(0);
|
|
1141
|
+
const [selectionRevision, setSelectionRevision] = useState(0);
|
|
1142
|
+
const [selectedShipmentIndex, setSelectedShipmentIndex] = useState(0);
|
|
1143
|
+
const requestId = useRef(0);
|
|
1144
|
+
const resolvedQuery = useMemo(() => {
|
|
1145
|
+
if (injectedQuery) return injectedQuery;
|
|
1146
|
+
if (transport) return createShopifyTrackQuery(transport);
|
|
1147
|
+
return void 0;
|
|
1148
|
+
}, [injectedQuery, transport]);
|
|
1149
|
+
const resolvedRecommendations = useMemo(() => {
|
|
1150
|
+
if (queryRecommendations) return queryRecommendations;
|
|
1151
|
+
if (transport) return createShopifyRecommendationsQuery(transport.post);
|
|
1152
|
+
return void 0;
|
|
1153
|
+
}, [queryRecommendations, transport]);
|
|
1154
|
+
const live = Boolean(resolvedQuery);
|
|
1155
|
+
const [recommendationLoad, setRecommendationLoad] = useState(() => ({ source: resolvedRecommendations, state: { phase: resolvedRecommendations ? "loading" : "idle", items: [] } }));
|
|
1156
|
+
const recommendations = useMemo(() => recommendationLoad.source === resolvedRecommendations ? recommendationLoad.state : { phase: resolvedRecommendations ? "loading" : "idle", items: [] }, [recommendationLoad, resolvedRecommendations]);
|
|
1157
|
+
if (recommendationLoad.source !== resolvedRecommendations) {
|
|
1158
|
+
setRecommendationLoad({ source: resolvedRecommendations, state: recommendations });
|
|
1159
|
+
}
|
|
1160
|
+
useEffect(() => {
|
|
1161
|
+
if (!resolvedRecommendations) return;
|
|
1162
|
+
let active = true;
|
|
1163
|
+
void Promise.resolve().then(resolvedRecommendations).then((items) => {
|
|
1164
|
+
if (!active) return;
|
|
1165
|
+
setRecommendationLoad({ source: resolvedRecommendations, state: { phase: items.length ? "success" : "empty", items } });
|
|
1166
|
+
}).catch(() => {
|
|
1167
|
+
if (!active) return;
|
|
1168
|
+
setRecommendationLoad({ source: resolvedRecommendations, state: { phase: "error", items: [] } });
|
|
1169
|
+
});
|
|
1170
|
+
return () => {
|
|
1171
|
+
active = false;
|
|
1172
|
+
};
|
|
1173
|
+
}, [resolvedRecommendations]);
|
|
1174
|
+
const query = useCallback(async (request) => {
|
|
1175
|
+
const currentRequestId = ++requestId.current;
|
|
1176
|
+
setState({ phase: "loading" });
|
|
1177
|
+
try {
|
|
1178
|
+
const result = live ? await resolvedQuery(request) : await queryMockTracking(request);
|
|
1179
|
+
if (currentRequestId !== requestId.current) return;
|
|
1180
|
+
if (isEmptyTrackingPageResult(result)) {
|
|
1181
|
+
setState({ phase: "empty", result });
|
|
1182
|
+
return;
|
|
1183
|
+
}
|
|
1184
|
+
const recent = recentQueryFromRequest(request, result);
|
|
1185
|
+
if (recent) {
|
|
1186
|
+
setRecentQueries((previous) => mergeRecentQueries(previous, recent));
|
|
1187
|
+
setSelectedRecentIndex(0);
|
|
1188
|
+
setSelectedShipmentIndex(0);
|
|
1189
|
+
}
|
|
1190
|
+
setState({ phase: "success", result: resultWithShipment(result, 0) });
|
|
1191
|
+
} catch {
|
|
1192
|
+
if (currentRequestId !== requestId.current) return;
|
|
1193
|
+
setState({ phase: "error", error: "We couldn\u2019t retrieve this order right now. Please try again later." });
|
|
1194
|
+
}
|
|
1195
|
+
}, [live, resolvedQuery]);
|
|
1196
|
+
const selectRecentQuery = useCallback((index) => {
|
|
1197
|
+
const item = recentQueries[index];
|
|
1198
|
+
if (!item) return;
|
|
1199
|
+
requestId.current += 1;
|
|
1200
|
+
setSelectionRevision((revision) => revision + 1);
|
|
1201
|
+
setSelectedRecentIndex(index);
|
|
1202
|
+
setSelectedShipmentIndex(0);
|
|
1203
|
+
setState({ phase: "success", result: resultWithShipment(item.result, 0) });
|
|
1204
|
+
}, [recentQueries]);
|
|
1205
|
+
const selectShipment = useCallback((index) => {
|
|
1206
|
+
const full = recentQueries[selectedRecentIndex]?.result ?? state.result;
|
|
1207
|
+
if (!full?.shipments?.[index]) return;
|
|
1208
|
+
requestId.current += 1;
|
|
1209
|
+
setSelectedShipmentIndex(index);
|
|
1210
|
+
setState({ phase: "success", result: resultWithShipment(full, index) });
|
|
1211
|
+
}, [recentQueries, selectedRecentIndex, state.result]);
|
|
1212
|
+
const reset = useCallback(() => {
|
|
1213
|
+
requestId.current += 1;
|
|
1214
|
+
setState({ phase: "idle" });
|
|
1215
|
+
setRecentQueries([]);
|
|
1216
|
+
setSelectedRecentIndex(0);
|
|
1217
|
+
setSelectedShipmentIndex(0);
|
|
1218
|
+
}, []);
|
|
1219
|
+
const resolveAutoQuery = autoQueryFromUrl ?? Boolean(transport && !injectedQuery);
|
|
1220
|
+
const resolvedWatermark = useMemo(
|
|
1221
|
+
() => watermark ?? { visible: !shouldHidePoweredBy() },
|
|
1222
|
+
[watermark]
|
|
1223
|
+
);
|
|
1224
|
+
const value = useMemo(() => ({
|
|
1225
|
+
...state,
|
|
1226
|
+
adPreview,
|
|
1227
|
+
resourceResolution,
|
|
1228
|
+
reset,
|
|
1229
|
+
query,
|
|
1230
|
+
recentQueries,
|
|
1231
|
+
selectedRecentIndex,
|
|
1232
|
+
selectionRevision,
|
|
1233
|
+
selectedShipmentIndex,
|
|
1234
|
+
selectRecentQuery,
|
|
1235
|
+
selectShipment,
|
|
1236
|
+
recommendations,
|
|
1237
|
+
autoQueryFromUrl: resolveAutoQuery,
|
|
1238
|
+
autoQueryDemo,
|
|
1239
|
+
watermark: resolvedWatermark
|
|
1240
|
+
}), [adPreview, resourceResolution, reset, autoQueryDemo, query, recentQueries, recommendations, resolveAutoQuery, resolvedWatermark, selectRecentQuery, selectShipment, selectedRecentIndex, selectionRevision, selectedShipmentIndex, state]);
|
|
1241
|
+
return /* @__PURE__ */ jsx(TrackingRuntimeContext.Provider, { value, children });
|
|
1242
|
+
}
|
|
1243
|
+
function useTrackingRuntime() {
|
|
1244
|
+
return useContext(TrackingRuntimeContext);
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
// src/tracking-query-form.ts
|
|
1248
|
+
import { useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "react";
|
|
1249
|
+
function useTrackingQueryForm({ initialTrackingNumber, initialOrderNumber = "", initialMode = "tracking", onComplete, onQuery, phase }) {
|
|
1250
|
+
const runtime = useTrackingRuntime();
|
|
1251
|
+
const query = onQuery ?? runtime.query;
|
|
1252
|
+
const loading = (phase ?? runtime.phase) === "loading";
|
|
1253
|
+
const [locationState] = useState2(() => runtime.autoQueryFromUrl ? readTrackingQueryLocationState() : void 0);
|
|
1254
|
+
const [mode, updateMode] = useState2(locationState?.tab ?? initialMode);
|
|
1255
|
+
const [trackingNumber, setTrackingNumber] = useState2(locationState?.trackingNumber || initialTrackingNumber);
|
|
1256
|
+
const [orderNumber, setOrderNumber] = useState2(locationState?.orderNumber || initialOrderNumber);
|
|
1257
|
+
const [email, setEmail] = useState2(locationState?.email ?? "");
|
|
1258
|
+
const [localError, setLocalError] = useState2("");
|
|
1259
|
+
const [firstInvalidField, setFirstInvalidField] = useState2();
|
|
1260
|
+
const autoQueryStarted = useRef2(false);
|
|
1261
|
+
const previewDemoTrackingNumber = useRef2(trackingNumber);
|
|
1262
|
+
const selected = runtime.recentQueries[runtime.selectedRecentIndex];
|
|
1263
|
+
const [lastSelectionRevision, setLastSelectionRevision] = useState2(runtime.selectionRevision);
|
|
1264
|
+
if (lastSelectionRevision !== runtime.selectionRevision) {
|
|
1265
|
+
setLastSelectionRevision(runtime.selectionRevision);
|
|
1266
|
+
if (selected) {
|
|
1267
|
+
updateMode(selected.mode);
|
|
1268
|
+
setLocalError("");
|
|
1269
|
+
setFirstInvalidField(void 0);
|
|
1270
|
+
if (selected.mode === "tracking") setTrackingNumber(selected.value);
|
|
1271
|
+
else {
|
|
1272
|
+
setOrderNumber(selected.value);
|
|
1273
|
+
setEmail(selected.email ?? "");
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
useEffect2(() => {
|
|
1278
|
+
if (autoQueryStarted.current) return;
|
|
1279
|
+
if (locationState?.canAutoQuery) {
|
|
1280
|
+
autoQueryStarted.current = true;
|
|
1281
|
+
void query(locationState.tab === "tracking" ? { mode: "tracking", trackingNumber: locationState.trackingNumber } : { mode: "order", orderNumber: locationState.orderNumber, email: locationState.email }).finally(onComplete);
|
|
1282
|
+
return;
|
|
1283
|
+
}
|
|
1284
|
+
const demoTrackingNumber = previewDemoTrackingNumber.current.trim();
|
|
1285
|
+
if (!runtime.autoQueryDemo || !demoTrackingNumber) return;
|
|
1286
|
+
autoQueryStarted.current = true;
|
|
1287
|
+
void query({ mode: "tracking", trackingNumber: demoTrackingNumber });
|
|
1288
|
+
}, [locationState, onComplete, query, runtime.autoQueryDemo]);
|
|
1289
|
+
const setMode = (next) => {
|
|
1290
|
+
updateMode(next);
|
|
1291
|
+
setLocalError("");
|
|
1292
|
+
setFirstInvalidField(void 0);
|
|
1293
|
+
};
|
|
1294
|
+
const submit = (event) => {
|
|
1295
|
+
event.preventDefault();
|
|
1296
|
+
if (loading) return;
|
|
1297
|
+
setLocalError("");
|
|
1298
|
+
setFirstInvalidField(void 0);
|
|
1299
|
+
if (mode === "order") {
|
|
1300
|
+
if (!orderNumber.trim() || !email.trim()) {
|
|
1301
|
+
setLocalError("Please enter your order number and email address");
|
|
1302
|
+
setFirstInvalidField(!orderNumber.trim() ? "order" : "email");
|
|
1303
|
+
return;
|
|
1304
|
+
}
|
|
1305
|
+
syncTrackingQueryToUrl("order", orderNumber.trim(), email.trim());
|
|
1306
|
+
void query({ mode: "order", orderNumber: orderNumber.trim(), email: email.trim() }).finally(onComplete);
|
|
1307
|
+
return;
|
|
1308
|
+
}
|
|
1309
|
+
if (!trackingNumber.trim()) {
|
|
1310
|
+
setLocalError("Please enter your tracking number");
|
|
1311
|
+
setFirstInvalidField("tracking");
|
|
1312
|
+
return;
|
|
1313
|
+
}
|
|
1314
|
+
syncTrackingQueryToUrl("tracking", trackingNumber.trim());
|
|
1315
|
+
void query({ mode: "tracking", trackingNumber: trackingNumber.trim() }).finally(onComplete);
|
|
1316
|
+
};
|
|
1317
|
+
return { mode, setMode, trackingNumber, setTrackingNumber, orderNumber, setOrderNumber, email, setEmail, localError, firstInvalidField, loading, submit };
|
|
1318
|
+
}
|
|
1319
|
+
|
|
976
1320
|
// src/track-page-display.tsx
|
|
977
|
-
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
1321
|
+
import { useCallback as useCallback2, useEffect as useEffect3, useMemo as useMemo2, useState as useState3 } from "react";
|
|
978
1322
|
import Autoplay from "embla-carousel-autoplay";
|
|
979
1323
|
import useEmblaCarousel from "embla-carousel-react";
|
|
980
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
1324
|
+
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
981
1325
|
var pageFont = { fontFamily: "var(--pb-font-family, Inter, system-ui, sans-serif)" };
|
|
982
1326
|
var contentWidth = {
|
|
983
1327
|
width: "min(1248px, 100%)",
|
|
@@ -1010,46 +1354,31 @@ function safeHref(value) {
|
|
|
1010
1354
|
function safeImageUrl(value) {
|
|
1011
1355
|
return safeTrackingPageUrl(value);
|
|
1012
1356
|
}
|
|
1013
|
-
function defaultProgress(status) {
|
|
1014
|
-
const steps = [
|
|
1015
|
-
{ id: "ordered", label: "Ordered", icon: "check" },
|
|
1016
|
-
{ id: "ready", label: "Order Ready", icon: "bag" },
|
|
1017
|
-
{ id: "transit", label: "In Transit", icon: "truck" },
|
|
1018
|
-
{ id: "out", label: "Out for Delivery", icon: "box" },
|
|
1019
|
-
{ id: "delivered", label: "Delivered", icon: "check" }
|
|
1020
|
-
];
|
|
1021
|
-
const normalized = status.toLowerCase();
|
|
1022
|
-
const current = normalized.includes("deliver") ? normalized.includes("out for") ? 3 : 4 : normalized.includes("transit") ? 2 : normalized.includes("ready") ? 1 : 0;
|
|
1023
|
-
return steps.map((step, index) => ({
|
|
1024
|
-
...step,
|
|
1025
|
-
state: index < current ? "complete" : index === current ? "current" : "upcoming"
|
|
1026
|
-
}));
|
|
1027
|
-
}
|
|
1028
1357
|
function StepIcon({ name, done }) {
|
|
1029
1358
|
const fill = done ? "#ffffff" : "currentColor";
|
|
1030
1359
|
const common = { width: 24, height: 24, viewBox: "0 0 24 24", "aria-hidden": true, style: { width: 24, height: 24, display: "block" } };
|
|
1031
1360
|
if (name === "bag") {
|
|
1032
1361
|
return /* @__PURE__ */ jsxs("svg", { ...common, children: [
|
|
1033
|
-
/* @__PURE__ */
|
|
1034
|
-
/* @__PURE__ */
|
|
1362
|
+
/* @__PURE__ */ jsx2("path", { fill, d: "M9.9 12.9c0-.239.095-.468.264-.636A.9.9 0 0 1 10.8 12h2.4a.9.9 0 1 1 0 1.8h-2.4a.9.9 0 0 1-.9-.9Z" }),
|
|
1363
|
+
/* @__PURE__ */ jsx2("path", { fill, fillRule: "evenodd", d: "M6.3 4.2a2.1 2.1 0 0 0-2.1 2.1v2.4c0 .714.357 1.344.9 1.723V16.5a3.3 3.3 0 0 0 3.3 3.3h7.2a3.3 3.3 0 0 0 3.3-3.3v-6.077c.543-.379.9-1.009.9-1.723V6.3a2.1 2.1 0 0 0-2.1-2.1H6.3Zm10.8 6.6H6.9V16.5a1.5 1.5 0 0 0 1.5 1.5h7.2a1.5 1.5 0 0 0 1.5-1.5V10.8ZM6 6.3c0-.08.032-.156.088-.212A.3.3 0 0 1 6.3 6h11.4a.3.3 0 0 1 .3.3v2.4a.3.3 0 0 1-.3.3H6.3a.3.3 0 0 1-.3-.3V6.3Z" })
|
|
1035
1364
|
] });
|
|
1036
1365
|
}
|
|
1037
1366
|
if (name === "truck") {
|
|
1038
1367
|
return /* @__PURE__ */ jsxs("svg", { ...common, children: [
|
|
1039
|
-
/* @__PURE__ */
|
|
1040
|
-
/* @__PURE__ */
|
|
1368
|
+
/* @__PURE__ */ jsx2("path", { fill, fillRule: "evenodd", d: "M4.8 6.3c0-.239.095-.468.264-.636A.9.9 0 0 1 5.7 5.4h8.389a3.3 3.3 0 0 1 3.174 2.394l.512 1.793a.6.6 0 0 0 .216.207l2.017.505A2.7 2.7 0 0 1 21.6 12.337V13.8a2.1 2.1 0 0 1-1.238 1.916 3.6 3.6 0 0 1-3.012 3.474 3.6 3.6 0 0 1-4.564-2.29H10.8a3.6 3.6 0 0 1-6.75-.903A3.6 3.6 0 0 1 5.05 15H4.5a.9.9 0 0 1 0-1.8h3a2.7 2.7 0 0 1 2.442 1.5h7.758A3.58 3.58 0 0 1 19.54 14.1a.45.45 0 0 0 .26-.198V12.336a.3.3 0 0 0-.228-.29l-2.018-.504a2.7 2.7 0 0 1-1.56-1.46l-.512-1.793A1.5 1.5 0 0 0 14.09 7.2H5.7a.9.9 0 0 1-.9-.9Zm3 11.1a1.2 1.2 0 1 0 0-2.4 1.2 1.2 0 0 0 0 2.4Zm9.6 0a1.2 1.2 0 1 0 0-2.4 1.2 1.2 0 0 0 0 2.4Z" }),
|
|
1369
|
+
/* @__PURE__ */ jsx2("path", { fill, d: "M3.9 9.6a.9.9 0 0 0 0 1.8h6a.9.9 0 0 0 0-1.8h-6Z" })
|
|
1041
1370
|
] });
|
|
1042
1371
|
}
|
|
1043
1372
|
if (name === "box") {
|
|
1044
1373
|
return /* @__PURE__ */ jsxs("svg", { ...common, children: [
|
|
1045
|
-
/* @__PURE__ */
|
|
1046
|
-
/* @__PURE__ */
|
|
1374
|
+
/* @__PURE__ */ jsx2("path", { fill, d: "M15.995 5.672a1.05 1.05 0 1 0-1.39-1.578l-3.43 4.164-1.126-1.691a1.05 1.05 0 1 0-1.726 1.2l1.576 2.364a1.35 1.35 0 0 0 2.175.096l3.943-4.555Z" }),
|
|
1375
|
+
/* @__PURE__ */ jsx2("path", { fill, fillRule: "evenodd", d: "M5.832 8.26a1.05 1.05 0 0 1 1.221 1.353L6.187 12H9.168a1.65 1.65 0 0 1 1.422 1.026l.191.569a.3.3 0 0 0 .284.205h1.87a.3.3 0 0 0 .284-.204l.191-.57A1.65 1.65 0 0 1 14.832 12H17.813l-.403-2.718a1.05 1.05 0 0 1 1.78-.837 1.05 1.05 0 0 1 .355 1.152L19.686 12.37c.076.51.114 1.023.114 1.538V15.9a3.9 3.9 0 0 1-3.9 3.9H8.1a3.9 3.9 0 0 1-3.9-3.9v-1.992c0-.516.038-1.029.113-1.54l.497-3.35a1.05 1.05 0 0 1 1.022-.828ZM6 13.908V13.8h2.952l.12.364a2.1 2.1 0 0 0 1.992 1.436h1.872a2.1 2.1 0 0 0 1.992-1.436l.12-.364H18v2.1a1.8 1.8 0 0 1-1.8 1.8H8.1A1.8 1.8 0 0 1 6 15.9v-1.992Z" })
|
|
1047
1376
|
] });
|
|
1048
1377
|
}
|
|
1049
|
-
return /* @__PURE__ */
|
|
1378
|
+
return /* @__PURE__ */ jsx2("svg", { ...common, children: /* @__PURE__ */ jsx2("path", { fill, fillRule: "evenodd", d: "M18.852 6.187a1.05 1.05 0 0 1 .154 1.264l-8.161 10.63a1.35 1.35 0 0 1-2.177.081L4.99 13.444a1.05 1.05 0 0 1 1.431-1.534l3.188 4.176 7.98-10.187a1.05 1.05 0 0 1 1.263-.712Z" }) });
|
|
1050
1379
|
}
|
|
1051
1380
|
function ProductImage({ src, alt, size = 60 }) {
|
|
1052
|
-
const [failed, setFailed] =
|
|
1381
|
+
const [failed, setFailed] = useState3(false);
|
|
1053
1382
|
const safeSrc = safeImageUrl(src);
|
|
1054
1383
|
const box = {
|
|
1055
1384
|
width: size,
|
|
@@ -1060,9 +1389,9 @@ function ProductImage({ src, alt, size = 60 }) {
|
|
|
1060
1389
|
background: "#f1f5f9"
|
|
1061
1390
|
};
|
|
1062
1391
|
if (!safeSrc || failed) {
|
|
1063
|
-
return /* @__PURE__ */
|
|
1392
|
+
return /* @__PURE__ */ jsx2("span", { "aria-label": alt + " image unavailable", style: { ...box, display: "grid", placeItems: "center", color: "#94a3b8", fontSize: 12 }, children: alt.slice(0, 1).toUpperCase() });
|
|
1064
1393
|
}
|
|
1065
|
-
return /* @__PURE__ */
|
|
1394
|
+
return /* @__PURE__ */ jsx2("img", { src: safeSrc, alt, onError: () => setFailed(true), style: box });
|
|
1066
1395
|
}
|
|
1067
1396
|
var hexColor = /^#(?:[\da-f]{3}|[\da-f]{4}|[\da-f]{6}|[\da-f]{8})$/i;
|
|
1068
1397
|
var defaultProgressColor = "#0f172a";
|
|
@@ -1073,20 +1402,20 @@ function TrackingProgress({ steps, color }) {
|
|
|
1073
1402
|
const active = progressColor(color);
|
|
1074
1403
|
const cells = Math.max(steps.length, 1);
|
|
1075
1404
|
return /* @__PURE__ */ jsxs("div", { className: "bt-progress", role: "region", "aria-label": "Delivery progress", style: { marginTop: 32, width: "100%", maxWidth: 1200, marginLeft: "auto", marginRight: "auto", overflow: "visible" }, children: [
|
|
1076
|
-
/* @__PURE__ */
|
|
1405
|
+
/* @__PURE__ */ jsx2("style", { children: trackingProgressStyles }),
|
|
1077
1406
|
/* @__PURE__ */ jsxs("div", { style: { position: "relative", display: "grid", gridTemplateColumns: `repeat(${cells}, minmax(0, 1fr))`, columnGap: 4, width: "100%", alignItems: "start" }, children: [
|
|
1078
|
-
cells > 1 ? /* @__PURE__ */
|
|
1407
|
+
cells > 1 ? /* @__PURE__ */ jsx2("div", { className: "bt-progress__line", "aria-hidden": "true", style: { position: "absolute", left: `calc(50% / ${cells})`, right: `calc(50% / ${cells})`, height: 6, display: "flex", zIndex: 0, pointerEvents: "none" }, children: steps.slice(0, -1).map((step, index) => {
|
|
1079
1408
|
const done = step.state === "complete" || step.state === "current";
|
|
1080
1409
|
const nextDone = steps[index + 1]?.state === "complete" || steps[index + 1]?.state === "current";
|
|
1081
|
-
return /* @__PURE__ */
|
|
1410
|
+
return /* @__PURE__ */ jsx2("span", { style: { flex: 1, height: 6, borderRadius: 999, background: done && nextDone ? active : `color-mix(in srgb, ${active} 25%, transparent)` } }, step.id + "-line");
|
|
1082
1411
|
}) }) : null,
|
|
1083
1412
|
steps.map((step, index) => {
|
|
1084
1413
|
const done = step.state === "complete" || step.state === "current";
|
|
1085
1414
|
return /* @__PURE__ */ jsxs("div", { style: { minWidth: 0, display: "flex", flexDirection: "column", alignItems: "center", position: "relative", zIndex: 1 }, children: [
|
|
1086
|
-
/* @__PURE__ */
|
|
1415
|
+
/* @__PURE__ */ jsx2("span", { className: "bt-progress__icon", "aria-label": step.label + " " + step.state, style: { display: "flex", flexShrink: 0, alignItems: "center", justifyContent: "center", borderRadius: 9999, border: `1px solid ${active}`, background: done ? active : "#fff", color: active }, children: /* @__PURE__ */ jsx2(StepIcon, { name: step.icon ?? (index === 0 || index === steps.length - 1 ? "check" : index === 1 ? "bag" : index === 2 ? "truck" : "box"), done }) }),
|
|
1087
1416
|
/* @__PURE__ */ jsxs("div", { className: "bt-progress__copy", style: { width: "100%", maxWidth: "100%", boxSizing: "border-box", textAlign: "center", padding: "0 2px" }, children: [
|
|
1088
|
-
/* @__PURE__ */
|
|
1089
|
-
step.date ? /* @__PURE__ */
|
|
1417
|
+
/* @__PURE__ */ jsx2("p", { className: "bt-progress__label", style: { margin: 0, fontWeight: 500, color: "#334155", overflowWrap: "anywhere", wordBreak: "break-word" }, children: step.label }),
|
|
1418
|
+
step.date ? /* @__PURE__ */ jsx2("p", { style: { margin: "6px 0 0", fontSize: 12, lineHeight: "16px", color: "#94a3b8", overflowWrap: "anywhere" }, children: step.date }) : null
|
|
1090
1419
|
] })
|
|
1091
1420
|
] }, step.id);
|
|
1092
1421
|
})
|
|
@@ -1095,57 +1424,53 @@ function TrackingProgress({ steps, color }) {
|
|
|
1095
1424
|
}
|
|
1096
1425
|
function ShippingTimeline({ events }) {
|
|
1097
1426
|
if (!events.length) {
|
|
1098
|
-
return /* @__PURE__ */
|
|
1427
|
+
return /* @__PURE__ */ jsx2("p", { style: { margin: "16px 0 0", color: "#475569", fontSize: 14 }, children: "Shipping events will appear when the carrier publishes them." });
|
|
1099
1428
|
}
|
|
1100
|
-
return /* @__PURE__ */
|
|
1429
|
+
return /* @__PURE__ */ jsx2("div", { "aria-label": "Shipping events", style: { marginTop: 16, display: "flex", flexDirection: "column", gap: 20 }, children: events.map((event, index) => {
|
|
1101
1430
|
const latest = event.state === "current" || index === 0;
|
|
1102
1431
|
return /* @__PURE__ */ jsxs("div", { style: { position: "relative", paddingLeft: 28, paddingBottom: index < events.length - 1 ? 20 : 0 }, children: [
|
|
1103
|
-
/* @__PURE__ */
|
|
1104
|
-
index < events.length - 1 ? /* @__PURE__ */
|
|
1432
|
+
/* @__PURE__ */ jsx2("span", { "aria-hidden": "true", style: { position: "absolute", left: 0, top: 2, width: 16, height: 16, borderRadius: 9999, background: latest ? "#16a34a" : "#cbd5e1" } }),
|
|
1433
|
+
index < events.length - 1 ? /* @__PURE__ */ jsx2("span", { "aria-hidden": "true", style: { position: "absolute", left: 7, top: 20, width: 1, height: "100%", background: "#e2e8f0" } }) : null,
|
|
1105
1434
|
/* @__PURE__ */ jsxs("p", { style: { margin: 0, fontSize: 14, fontWeight: 500, lineHeight: 1.5, color: latest ? "#c01400" : "#64748b" }, children: [
|
|
1106
1435
|
event.title,
|
|
1107
1436
|
event.detail ? ", " + event.detail : ""
|
|
1108
1437
|
] }),
|
|
1109
|
-
event.at ? /* @__PURE__ */
|
|
1438
|
+
event.at ? /* @__PURE__ */ jsx2("p", { style: { margin: "4px 0 0", fontSize: 12, lineHeight: 1.5, color: latest ? "rgba(192, 20, 0, 0.8)" : "#94a3b8" }, children: event.at }) : null
|
|
1110
1439
|
] }, event.id);
|
|
1111
1440
|
}) });
|
|
1112
1441
|
}
|
|
1113
1442
|
function PackageContents({ items }) {
|
|
1114
|
-
if (!items.length) return /* @__PURE__ */
|
|
1115
|
-
return /* @__PURE__ */
|
|
1443
|
+
if (!items.length) return /* @__PURE__ */ jsx2("p", { style: { margin: 0, color: "#64748b", fontSize: 14 }, children: "Package contents are not available for this shipment." });
|
|
1444
|
+
return /* @__PURE__ */ jsx2("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: items.map((item) => {
|
|
1116
1445
|
const title = item.title;
|
|
1117
1446
|
return /* @__PURE__ */ jsxs("article", { style: { display: "flex", alignItems: "center", gap: 12, padding: "8px 0" }, children: [
|
|
1118
|
-
/* @__PURE__ */
|
|
1447
|
+
/* @__PURE__ */ jsx2(ProductImage, { src: item.imageUrl, alt: title }),
|
|
1119
1448
|
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1120
|
-
/* @__PURE__ */
|
|
1121
|
-
item.description ? /* @__PURE__ */
|
|
1449
|
+
/* @__PURE__ */ jsx2("p", { style: { margin: 0, fontSize: 14, fontWeight: 500, color: "#1e293b", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: title }),
|
|
1450
|
+
item.description ? /* @__PURE__ */ jsx2("p", { style: { margin: "4px 0 0", fontSize: 13, color: "#64748b" }, children: item.description }) : null,
|
|
1122
1451
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", flexWrap: "wrap", alignItems: "center", gap: 8, marginTop: 4 }, children: [
|
|
1123
1452
|
/* @__PURE__ */ jsxs("p", { style: { margin: 0, fontSize: 13, color: "#64748b" }, children: [
|
|
1124
1453
|
"x",
|
|
1125
1454
|
item.quantity
|
|
1126
1455
|
] }),
|
|
1127
|
-
safeHref(item.href) ? /* @__PURE__ */
|
|
1456
|
+
safeHref(item.href) ? /* @__PURE__ */ jsx2("a", { href: safeHref(item.href), style: { display: "inline-flex", minHeight: 32, alignItems: "center", padding: "6px 16px", border: "1px solid #cbd5e1", borderRadius: 6, color: "#1e293b", fontSize: 13, fontWeight: 500, textDecoration: "none" }, children: "Reorder" }) : null
|
|
1128
1457
|
] })
|
|
1129
1458
|
] })
|
|
1130
1459
|
] }, item.id);
|
|
1131
1460
|
}) });
|
|
1132
1461
|
}
|
|
1133
|
-
function formatTrackPageRecommendPrice(price) {
|
|
1134
|
-
if (!price || !Number.isInteger(price.amount)) return "";
|
|
1135
|
-
return `$ ${(price.amount / 100).toFixed(2)}`;
|
|
1136
|
-
}
|
|
1137
1462
|
function RecommendationCards({ items }) {
|
|
1138
|
-
const autoplay =
|
|
1463
|
+
const autoplay = useMemo2(() => Autoplay({ delay: 3e3, stopOnInteraction: false, stopOnMouseEnter: true }), []);
|
|
1139
1464
|
const [emblaRef, emblaApi] = useEmblaCarousel({ loop: true, align: "start", slidesToScroll: 1 }, [autoplay]);
|
|
1140
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
1141
|
-
const [canScrollNext, setCanScrollNext] =
|
|
1142
|
-
const [hideButtons, setHideButtons] =
|
|
1143
|
-
const onSelect =
|
|
1465
|
+
const [canScrollPrev, setCanScrollPrev] = useState3(false);
|
|
1466
|
+
const [canScrollNext, setCanScrollNext] = useState3(false);
|
|
1467
|
+
const [hideButtons, setHideButtons] = useState3(false);
|
|
1468
|
+
const onSelect = useCallback2(() => {
|
|
1144
1469
|
if (!emblaApi) return;
|
|
1145
1470
|
setCanScrollPrev(emblaApi.canScrollPrev());
|
|
1146
1471
|
setCanScrollNext(emblaApi.canScrollNext());
|
|
1147
1472
|
}, [emblaApi]);
|
|
1148
|
-
|
|
1473
|
+
useEffect3(() => {
|
|
1149
1474
|
if (!emblaApi) return;
|
|
1150
1475
|
const frame = window.requestAnimationFrame(onSelect);
|
|
1151
1476
|
emblaApi.on("select", onSelect);
|
|
@@ -1156,7 +1481,7 @@ function RecommendationCards({ items }) {
|
|
|
1156
1481
|
emblaApi.off("reInit", onSelect);
|
|
1157
1482
|
};
|
|
1158
1483
|
}, [emblaApi, onSelect]);
|
|
1159
|
-
|
|
1484
|
+
useEffect3(() => {
|
|
1160
1485
|
if (typeof window.matchMedia !== "function") return;
|
|
1161
1486
|
const media = window.matchMedia("(max-width: 768px)");
|
|
1162
1487
|
const update = () => setHideButtons(media.matches);
|
|
@@ -1165,7 +1490,7 @@ function RecommendationCards({ items }) {
|
|
|
1165
1490
|
return () => media.removeEventListener("change", update);
|
|
1166
1491
|
}, []);
|
|
1167
1492
|
if (items.length === 0) return null;
|
|
1168
|
-
const arrow = (points) => /* @__PURE__ */
|
|
1493
|
+
const arrow = (points) => /* @__PURE__ */ jsx2("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx2("polyline", { points }) });
|
|
1169
1494
|
const buttonStyle = {
|
|
1170
1495
|
position: "absolute",
|
|
1171
1496
|
top: 115,
|
|
@@ -1184,21 +1509,21 @@ function RecommendationCards({ items }) {
|
|
|
1184
1509
|
padding: 0
|
|
1185
1510
|
};
|
|
1186
1511
|
return /* @__PURE__ */ jsxs("div", { "aria-label": "Recommended products carousel", style: { position: "relative", marginLeft: "min(48px, 4%)", marginRight: "min(48px, 4%)" }, children: [
|
|
1187
|
-
!hideButtons && canScrollPrev ? /* @__PURE__ */
|
|
1188
|
-
/* @__PURE__ */
|
|
1512
|
+
!hideButtons && canScrollPrev ? /* @__PURE__ */ jsx2("button", { type: "button", "aria-label": "Previous", onClick: () => emblaApi?.scrollPrev(), style: { ...buttonStyle, left: -40 }, children: arrow("15 18 9 12 15 6") }) : null,
|
|
1513
|
+
/* @__PURE__ */ jsx2("div", { ref: emblaRef, style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx2("div", { style: { display: "flex" }, children: items.map((item) => {
|
|
1189
1514
|
const href = safeHref(item.href);
|
|
1190
|
-
const displayPrice =
|
|
1515
|
+
const displayPrice = formatRecommendationPrice(item.price);
|
|
1191
1516
|
const card = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1192
|
-
/* @__PURE__ */
|
|
1517
|
+
/* @__PURE__ */ jsx2("div", { style: { width: 262, height: 262, maxWidth: "100%", borderRadius: 8, border: "1px solid #E3E3E3", overflow: "hidden", background: "#f1f5f9" }, children: /* @__PURE__ */ jsx2(ProductImage, { src: item.imageUrl, alt: item.title, size: 262 }) }),
|
|
1193
1518
|
/* @__PURE__ */ jsxs("div", { style: { padding: "12px 8px", textAlign: "center", fontSize: 14 }, children: [
|
|
1194
|
-
/* @__PURE__ */
|
|
1195
|
-
displayPrice ? /* @__PURE__ */
|
|
1196
|
-
item.description ? /* @__PURE__ */
|
|
1519
|
+
/* @__PURE__ */ jsx2("p", { style: { margin: 0, color: "#334155" }, children: item.title }),
|
|
1520
|
+
displayPrice ? /* @__PURE__ */ jsx2("p", { style: { margin: "4px 0 0", fontWeight: 600, color: "#0f172a" }, children: displayPrice }) : null,
|
|
1521
|
+
item.description ? /* @__PURE__ */ jsx2("p", { style: { margin: "4px 0 0", color: "#64748b", fontSize: 13 }, children: item.description }) : null
|
|
1197
1522
|
] })
|
|
1198
1523
|
] });
|
|
1199
|
-
return /* @__PURE__ */
|
|
1524
|
+
return /* @__PURE__ */ jsx2("div", { style: { flex: "0 0 286px", minWidth: 0, paddingRight: 24, boxSizing: "border-box" }, children: href ? /* @__PURE__ */ jsx2("a", { href, style: { display: "block", width: 262, maxWidth: "100%", textDecoration: "none", color: "inherit" }, children: card }) : /* @__PURE__ */ jsx2("div", { style: { width: 262, maxWidth: "100%" }, children: card }) }, item.id);
|
|
1200
1525
|
}) }) }),
|
|
1201
|
-
!hideButtons && canScrollNext ? /* @__PURE__ */
|
|
1526
|
+
!hideButtons && canScrollNext ? /* @__PURE__ */ jsx2("button", { type: "button", "aria-label": "Next", onClick: () => emblaApi?.scrollNext(), style: { ...buttonStyle, right: -40 }, children: arrow("9 18 15 12 9 6") }) : null
|
|
1202
1527
|
] });
|
|
1203
1528
|
}
|
|
1204
1529
|
var trackingPageAdSlotStyle = {
|
|
@@ -1221,41 +1546,92 @@ var trackingPageAdImageStyle = {
|
|
|
1221
1546
|
objectPosition: "center"
|
|
1222
1547
|
};
|
|
1223
1548
|
function TrackingPageAdSlot({ ad, disableLink = false }) {
|
|
1224
|
-
const [failedUrl, setFailedUrl] =
|
|
1549
|
+
const [failedUrl, setFailedUrl] = useState3();
|
|
1225
1550
|
const imageUrl = safeImageUrl(ad?.imageUrl);
|
|
1226
1551
|
if (!imageUrl || failedUrl === imageUrl) return null;
|
|
1227
|
-
const content = /* @__PURE__ */
|
|
1552
|
+
const content = /* @__PURE__ */ jsx2("img", { src: imageUrl, alt: ad?.alt ?? "Promotion", loading: "lazy", onError: () => setFailedUrl(imageUrl), style: trackingPageAdImageStyle });
|
|
1228
1553
|
const href = safeHref(ad?.href);
|
|
1229
|
-
if (!href || disableLink) return /* @__PURE__ */
|
|
1230
|
-
return /* @__PURE__ */
|
|
1554
|
+
if (!href || disableLink) return /* @__PURE__ */ jsx2("div", { "data-tracking-page-ad": true, style: trackingPageAdSlotStyle, children: content });
|
|
1555
|
+
return /* @__PURE__ */ jsx2("a", { "data-tracking-page-ad": true, href, target: "_blank", rel: "noopener noreferrer", style: trackingPageAdSlotStyle, children: content });
|
|
1231
1556
|
}
|
|
1232
1557
|
function EstimatedDeliveryCard({ dateText, steps = 5 }) {
|
|
1233
1558
|
const trackInset = `max(0px, calc(50% / ${Math.max(steps, 1)} - var(--bt-progress-icon, 44px) / 2))`;
|
|
1234
1559
|
return /* @__PURE__ */ jsxs("div", { "aria-label": "Est. Delivery", className: "bt-edd-card", style: { margin: `16px ${trackInset} 0`, width: "auto", boxSizing: "border-box", border: "1px solid transparent", borderRadius: 10, backgroundColor: "#eaf4ff", padding: "20px 22px 18px", textAlign: "left" }, children: [
|
|
1235
|
-
/* @__PURE__ */
|
|
1236
|
-
/* @__PURE__ */
|
|
1237
|
-
/* @__PURE__ */
|
|
1560
|
+
/* @__PURE__ */ jsx2("p", { style: { margin: 0, color: "#202124", fontSize: 13, fontWeight: 700, lineHeight: 1.3 }, children: "Est. Delivery" }),
|
|
1561
|
+
/* @__PURE__ */ jsx2("p", { style: { margin: "6px 0 0", color: "#202124", fontSize: 22, fontWeight: 700, lineHeight: 1.15, letterSpacing: 0, overflowWrap: "anywhere", wordBreak: "break-word" }, children: dateText }),
|
|
1562
|
+
/* @__PURE__ */ jsx2("p", { style: { margin: "6px 0 0", color: "#5f6368", fontSize: 13, fontWeight: 400, lineHeight: 1.35 }, children: "Estimated time may update as tracking progresses." })
|
|
1563
|
+
] });
|
|
1564
|
+
}
|
|
1565
|
+
var orderBadgeRowStyle = {
|
|
1566
|
+
display: "flex",
|
|
1567
|
+
flexWrap: "wrap",
|
|
1568
|
+
alignItems: "center",
|
|
1569
|
+
justifyContent: "center",
|
|
1570
|
+
gap: 12,
|
|
1571
|
+
margin: "0 auto"
|
|
1572
|
+
};
|
|
1573
|
+
var orderBadgeStyle = (active) => ({
|
|
1574
|
+
appearance: "none",
|
|
1575
|
+
height: 36,
|
|
1576
|
+
minWidth: 128,
|
|
1577
|
+
borderRadius: 8,
|
|
1578
|
+
border: `1px solid ${active ? "#c01400" : "#cbd5e1"}`,
|
|
1579
|
+
padding: "0 16px",
|
|
1580
|
+
font: "inherit",
|
|
1581
|
+
fontSize: 14,
|
|
1582
|
+
fontWeight: 600,
|
|
1583
|
+
color: active ? "#c01400" : "#64748b",
|
|
1584
|
+
background: "transparent",
|
|
1585
|
+
cursor: "pointer"
|
|
1586
|
+
});
|
|
1587
|
+
function TrackPageOrderBadges({
|
|
1588
|
+
values,
|
|
1589
|
+
selectedIndex,
|
|
1590
|
+
onSelect,
|
|
1591
|
+
style
|
|
1592
|
+
}) {
|
|
1593
|
+
if (values.length === 0) return null;
|
|
1594
|
+
return /* @__PURE__ */ jsx2("div", { style: { ...orderBadgeRowStyle, ...style }, children: values.map((value, index) => {
|
|
1595
|
+
const active = selectedIndex === index;
|
|
1596
|
+
return /* @__PURE__ */ jsx2(
|
|
1597
|
+
"button",
|
|
1598
|
+
{
|
|
1599
|
+
type: "button",
|
|
1600
|
+
"aria-pressed": active,
|
|
1601
|
+
onClick: () => onSelect(index),
|
|
1602
|
+
style: orderBadgeStyle(active),
|
|
1603
|
+
children: value
|
|
1604
|
+
},
|
|
1605
|
+
`${value}-${index}`
|
|
1606
|
+
);
|
|
1607
|
+
}) });
|
|
1608
|
+
}
|
|
1609
|
+
function TrackPageQueryNumber({ mode, value }) {
|
|
1610
|
+
return /* @__PURE__ */ jsxs("p", { style: { margin: 0, fontSize: 20, fontWeight: 400, lineHeight: 1.4, color: "#000", overflowWrap: "anywhere" }, children: [
|
|
1611
|
+
mode === "order" ? "Order" : "Tracking",
|
|
1612
|
+
": ",
|
|
1613
|
+
value
|
|
1238
1614
|
] });
|
|
1239
1615
|
}
|
|
1240
1616
|
function SectionShell({ title, children, bordered = true, resultAnchor = false }) {
|
|
1241
|
-
return /* @__PURE__ */
|
|
1617
|
+
return /* @__PURE__ */ jsx2("section", { "aria-label": title, "data-tracking-result": resultAnchor ? "" : void 0, style: { ...pageFont, background: "var(--pb-color-background, #fff)", color: "var(--pb-color-text, #0f172a)", borderBottom: bordered ? "1px solid #f1f5f9" : "0" }, children });
|
|
1242
1618
|
}
|
|
1243
1619
|
|
|
1244
1620
|
// src/shopify-track-page/assets/not-found.png.ts
|
|
1245
1621
|
var not_found_png_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcQAAAHECAYAAACnX1ofAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGW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wi6b+lnTL0lhJCeUCASMiBGqwSL4YV1u6WdAjIvbX+lfd+NY+GF40sQaLruuLQ1vmxJoUcIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQsh08P8D6wH8vd+UWaQAAAAASUVORK5CYII=";
|
|
1246
1622
|
|
|
1247
1623
|
// src/tracking-not-found.tsx
|
|
1248
|
-
import { jsx as
|
|
1624
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1249
1625
|
function TrackingNotFound({ resultAnchor = false } = {}) {
|
|
1250
1626
|
return /* @__PURE__ */ jsxs2("section", { "aria-label": "Order not found", role: "status", "data-tracking-result": resultAnchor ? "" : void 0, style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", padding: "80px 24px", gap: 16 }, children: [
|
|
1251
|
-
/* @__PURE__ */
|
|
1252
|
-
/* @__PURE__ */
|
|
1627
|
+
/* @__PURE__ */ jsx3("img", { src: not_found_png_default, alt: "", width: 180, height: 180, style: { width: 180, height: 180, objectFit: "contain" } }),
|
|
1628
|
+
/* @__PURE__ */ jsx3("p", { style: { margin: 0, fontSize: 16, fontWeight: 500, color: "#475569" }, children: "Can not find order" })
|
|
1253
1629
|
] });
|
|
1254
1630
|
}
|
|
1255
1631
|
|
|
1256
1632
|
// src/tracking-loading.tsx
|
|
1257
1633
|
import { useId } from "react";
|
|
1258
|
-
import { Fragment as Fragment2, jsx as
|
|
1634
|
+
import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1259
1635
|
var loadingStyles = `
|
|
1260
1636
|
@keyframes bt-tracking-pin-float {
|
|
1261
1637
|
0%, 100% { transform: translateY(-1px); }
|
|
@@ -1273,129 +1649,43 @@ var loadingStyles = `
|
|
|
1273
1649
|
function TrackingLoading() {
|
|
1274
1650
|
const id = useId();
|
|
1275
1651
|
return /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
1276
|
-
/* @__PURE__ */
|
|
1652
|
+
/* @__PURE__ */ jsx4("style", { children: loadingStyles }),
|
|
1277
1653
|
/* @__PURE__ */ jsxs3("div", { role: "status", "aria-label": "\u67E5\u8BE2\u4E2D...", "aria-live": "polite", "aria-atomic": "true", style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 16, marginTop: 56, paddingBottom: 8, textAlign: "center" }, children: [
|
|
1278
|
-
/* @__PURE__ */
|
|
1654
|
+
/* @__PURE__ */ jsx4("p", { style: { margin: 0, color: "var(--pb-color-muted, #64748b)", fontSize: 14, fontWeight: 400, lineHeight: "20px" }, children: "\u67E5\u8BE2\u4E2D..." }),
|
|
1279
1655
|
/* @__PURE__ */ jsxs3("svg", { width: "56", height: "64", viewBox: "0 0 56 64", fill: "none", "aria-hidden": "true", focusable: "false", style: { display: "block", flexShrink: 0, overflow: "visible" }, children: [
|
|
1280
1656
|
/* @__PURE__ */ jsxs3("defs", { children: [
|
|
1281
1657
|
/* @__PURE__ */ jsxs3("linearGradient", { id: `${id}-top`, x1: "10", y1: "28", x2: "44", y2: "40", gradientUnits: "userSpaceOnUse", children: [
|
|
1282
|
-
/* @__PURE__ */
|
|
1283
|
-
/* @__PURE__ */
|
|
1658
|
+
/* @__PURE__ */ jsx4("stop", { stopColor: "#FFF0DA" }),
|
|
1659
|
+
/* @__PURE__ */ jsx4("stop", { offset: "1", stopColor: "#EABD8E" })
|
|
1284
1660
|
] }),
|
|
1285
1661
|
/* @__PURE__ */ jsxs3("linearGradient", { id: `${id}-left`, x1: "11", y1: "35", x2: "29", y2: "60", gradientUnits: "userSpaceOnUse", children: [
|
|
1286
|
-
/* @__PURE__ */
|
|
1287
|
-
/* @__PURE__ */
|
|
1662
|
+
/* @__PURE__ */ jsx4("stop", { stopColor: "#FFE8CD" }),
|
|
1663
|
+
/* @__PURE__ */ jsx4("stop", { offset: "1", stopColor: "#F3C79C" })
|
|
1288
1664
|
] }),
|
|
1289
1665
|
/* @__PURE__ */ jsxs3("linearGradient", { id: `${id}-right`, x1: "28", y1: "40", x2: "45", y2: "52", gradientUnits: "userSpaceOnUse", children: [
|
|
1290
|
-
/* @__PURE__ */
|
|
1291
|
-
/* @__PURE__ */
|
|
1666
|
+
/* @__PURE__ */ jsx4("stop", { stopColor: "#F8D2AA" }),
|
|
1667
|
+
/* @__PURE__ */ jsx4("stop", { offset: "1", stopColor: "#DCA574" })
|
|
1292
1668
|
] }),
|
|
1293
1669
|
/* @__PURE__ */ jsxs3("linearGradient", { id: `${id}-pin`, x1: "21", y1: "8", x2: "35", y2: "25", gradientUnits: "userSpaceOnUse", children: [
|
|
1294
|
-
/* @__PURE__ */
|
|
1295
|
-
/* @__PURE__ */
|
|
1670
|
+
/* @__PURE__ */ jsx4("stop", { stopColor: "#FFD18A" }),
|
|
1671
|
+
/* @__PURE__ */ jsx4("stop", { offset: "1", stopColor: "#F6A34A" })
|
|
1296
1672
|
] })
|
|
1297
1673
|
] }),
|
|
1298
|
-
/* @__PURE__ */
|
|
1299
|
-
/* @__PURE__ */
|
|
1300
|
-
/* @__PURE__ */
|
|
1301
|
-
/* @__PURE__ */
|
|
1302
|
-
/* @__PURE__ */
|
|
1303
|
-
/* @__PURE__ */
|
|
1674
|
+
/* @__PURE__ */ jsx4("path", { d: "m11 35 17-10 17 10-17 10-17-10Z", fill: `url(#${id}-top)` }),
|
|
1675
|
+
/* @__PURE__ */ jsx4("path", { d: "M11 35v19l17 10V45L11 35Z", fill: `url(#${id}-left)` }),
|
|
1676
|
+
/* @__PURE__ */ jsx4("path", { d: "M28 45v19l17-10V35L28 45Z", fill: `url(#${id}-right)` }),
|
|
1677
|
+
/* @__PURE__ */ jsx4("path", { d: "m18 31 17 10v19l4-2V39L22 29l-4 2Z", fill: "#FFF3E0", fillOpacity: ".6" }),
|
|
1678
|
+
/* @__PURE__ */ jsx4("path", { d: "M11 35 28 45 45 35M28 45v19", stroke: "#FFF8EC", strokeOpacity: ".35", strokeWidth: ".7" }),
|
|
1679
|
+
/* @__PURE__ */ jsx4("g", { className: "bt-tracking-loading__pin", children: /* @__PURE__ */ jsx4("path", { d: "M28 8a7 7 0 0 0-7 7c0 5 7 12 7 12s7-7 7-12a7 7 0 0 0-7-7Zm0 4a3 3 0 1 1 0 6 3 3 0 0 1 0-6Z", fill: `url(#${id}-pin)`, fillRule: "evenodd" }) })
|
|
1304
1680
|
] })
|
|
1305
1681
|
] })
|
|
1306
1682
|
] });
|
|
1307
1683
|
}
|
|
1308
1684
|
|
|
1309
1685
|
// src/ready-to-go.tsx
|
|
1310
|
-
import { Fragment as Fragment3, jsx as
|
|
1311
|
-
var initialRuntime = {
|
|
1312
|
-
phase: "idle",
|
|
1313
|
-
recommendations: { phase: "idle", items: [] },
|
|
1314
|
-
autoQueryFromUrl: false,
|
|
1315
|
-
autoQueryDemo: false,
|
|
1316
|
-
async query() {
|
|
1317
|
-
return void 0;
|
|
1318
|
-
}
|
|
1319
|
-
};
|
|
1320
|
-
var ReadyToGoRuntimeContext = createContext(initialRuntime);
|
|
1321
|
-
function previewReadyToGoTracking(trackingNumber = "BT-2048-DEMO") {
|
|
1322
|
-
return {
|
|
1323
|
-
trackingNumber,
|
|
1324
|
-
status: "In transit",
|
|
1325
|
-
carrier: "BestTrack demo carrier",
|
|
1326
|
-
latestEvent: "Shipment accepted at the regional hub",
|
|
1327
|
-
updatedAt: "Sep 17, 10:00 AM",
|
|
1328
|
-
destination: "Shanghai",
|
|
1329
|
-
estimatedDelivery: "Sep 22 - Sep 24",
|
|
1330
|
-
progress: defaultProgress("In transit"),
|
|
1331
|
-
events: [
|
|
1332
|
-
{ id: "hub", title: "Shipment accepted at the regional hub", at: "Sep 17, 10:00 AM", state: "current" },
|
|
1333
|
-
{ id: "info", title: "The order has been placed and confirmed.", at: "Sep 16, 3:31 PM", state: "complete" }
|
|
1334
|
-
],
|
|
1335
|
-
orderItems: [{ id: "demo-order-item", title: "Demo shipment item", quantity: 1, description: "Product details are available in your order." }],
|
|
1336
|
-
recommendations: [
|
|
1337
|
-
{ id: "shipping-protection", title: "Shipping protection", description: "Extra assurance for your next delivery.", price: { amount: 900, currencyCode: "USD" } },
|
|
1338
|
-
{ id: "delivery-alerts", title: "Delivery alerts", description: "Receive an update at every milestone.", price: { amount: 400, currencyCode: "USD" } }
|
|
1339
|
-
]
|
|
1340
|
-
};
|
|
1341
|
-
}
|
|
1342
|
-
async function queryMockReadyToGoTracking(request) {
|
|
1343
|
-
return previewReadyToGoTracking(request.mode === "tracking" ? request.trackingNumber : request.orderNumber);
|
|
1344
|
-
}
|
|
1345
|
-
function ReadyToGoRuntimeProvider({ children, query: injectedQuery, queryRecommendations, transport, autoQueryFromUrl, autoQueryDemo = false, watermark, adPreview }) {
|
|
1346
|
-
const [state, setState] = useState2({ phase: "idle" });
|
|
1347
|
-
const [recommendations, setRecommendations] = useState2(() => queryRecommendations || transport ? { phase: "loading", items: [] } : { phase: "idle", items: [] });
|
|
1348
|
-
const requestId = useRef(0);
|
|
1349
|
-
const resolvedQuery = useMemo2(() => {
|
|
1350
|
-
if (injectedQuery) return injectedQuery;
|
|
1351
|
-
if (transport) return createShopifyTrackQuery(transport);
|
|
1352
|
-
return void 0;
|
|
1353
|
-
}, [injectedQuery, transport]);
|
|
1354
|
-
const resolvedRecommendations = useMemo2(() => {
|
|
1355
|
-
if (queryRecommendations) return queryRecommendations;
|
|
1356
|
-
if (transport) return createShopifyRecommendationsQuery(transport.post);
|
|
1357
|
-
return void 0;
|
|
1358
|
-
}, [queryRecommendations, transport]);
|
|
1359
|
-
const live = Boolean(resolvedQuery);
|
|
1360
|
-
useEffect2(() => {
|
|
1361
|
-
if (!resolvedRecommendations) return;
|
|
1362
|
-
let active = true;
|
|
1363
|
-
void resolvedRecommendations().then((items) => {
|
|
1364
|
-
if (!active) return;
|
|
1365
|
-
setRecommendations({ phase: items.length ? "success" : "empty", items });
|
|
1366
|
-
}).catch(() => {
|
|
1367
|
-
if (!active) return;
|
|
1368
|
-
setRecommendations({ phase: "error", items: [] });
|
|
1369
|
-
});
|
|
1370
|
-
return () => {
|
|
1371
|
-
active = false;
|
|
1372
|
-
};
|
|
1373
|
-
}, [resolvedRecommendations]);
|
|
1374
|
-
const query = useCallback2(async (request) => {
|
|
1375
|
-
const currentRequestId = ++requestId.current;
|
|
1376
|
-
setState({ phase: "loading" });
|
|
1377
|
-
try {
|
|
1378
|
-
const result = live ? await resolvedQuery(request) : await queryMockReadyToGoTracking(request);
|
|
1379
|
-
if (currentRequestId !== requestId.current) return;
|
|
1380
|
-
setState({ phase: isEmptyTrackingPageResult(result) ? "empty" : "success", result });
|
|
1381
|
-
} catch {
|
|
1382
|
-
if (currentRequestId !== requestId.current) return;
|
|
1383
|
-
setState({ phase: "error", error: "We couldn\u2019t retrieve this order right now. Please try again later." });
|
|
1384
|
-
}
|
|
1385
|
-
}, [live, resolvedQuery]);
|
|
1386
|
-
const resolveAutoQuery = autoQueryFromUrl ?? Boolean(transport && !injectedQuery);
|
|
1387
|
-
const resolvedWatermark = useMemo2(
|
|
1388
|
-
() => watermark ?? { visible: !shouldHidePoweredBy() },
|
|
1389
|
-
[watermark]
|
|
1390
|
-
);
|
|
1391
|
-
const value = useMemo2(() => ({ ...state, adPreview, query, recommendations, autoQueryFromUrl: resolveAutoQuery, autoQueryDemo, watermark: resolvedWatermark }), [adPreview, autoQueryDemo, query, recommendations, resolveAutoQuery, resolvedWatermark, state]);
|
|
1392
|
-
return /* @__PURE__ */ jsx4(ReadyToGoRuntimeContext.Provider, { value, children });
|
|
1393
|
-
}
|
|
1394
|
-
function useReadyToGoRuntime() {
|
|
1395
|
-
return useContext(ReadyToGoRuntimeContext);
|
|
1396
|
-
}
|
|
1686
|
+
import { Fragment as Fragment3, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1397
1687
|
function RuntimeWatermark({ watermark }) {
|
|
1398
|
-
return watermark?.visible ? /* @__PURE__ */
|
|
1688
|
+
return watermark?.visible ? /* @__PURE__ */ jsx5("small", { style: { display: "block", marginTop: "auto", paddingTop: 28, textAlign: "center", fontSize: 12, lineHeight: "17px", fontStyle: "italic", color: "#b8b8b8" }, children: watermark.label || "Powered by BestTrack" }) : null;
|
|
1399
1689
|
}
|
|
1400
1690
|
var heroStyle = {
|
|
1401
1691
|
...pageFont,
|
|
@@ -1487,12 +1777,12 @@ function submitButtonStyle(props, loading = false) {
|
|
|
1487
1777
|
};
|
|
1488
1778
|
}
|
|
1489
1779
|
function ReadyToGoTextField({ value, onChange }) {
|
|
1490
|
-
return /* @__PURE__ */
|
|
1780
|
+
return /* @__PURE__ */ jsx5("input", { "aria-label": "Ready-to-go text", value: typeof value === "string" ? value : "", onChange: (event) => onChange(event.target.value) });
|
|
1491
1781
|
}
|
|
1492
1782
|
function InlineText({ block, name, fallback }) {
|
|
1493
1783
|
const value = text(block, name, fallback);
|
|
1494
|
-
if (!block.selected) return /* @__PURE__ */
|
|
1495
|
-
return /* @__PURE__ */
|
|
1784
|
+
if (!block.selected) return /* @__PURE__ */ jsx5("span", { "data-ready-to-go-editor-field": name, children: value });
|
|
1785
|
+
return /* @__PURE__ */ jsx5(
|
|
1496
1786
|
"input",
|
|
1497
1787
|
{
|
|
1498
1788
|
"aria-label": "Canvas " + name,
|
|
@@ -1521,53 +1811,56 @@ function InlineText({ block, name, fallback }) {
|
|
|
1521
1811
|
}
|
|
1522
1812
|
);
|
|
1523
1813
|
}
|
|
1524
|
-
function
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1814
|
+
function ProgressResult({
|
|
1815
|
+
result,
|
|
1816
|
+
showEstimatedDelivery = true,
|
|
1817
|
+
color,
|
|
1818
|
+
recentQueries = [],
|
|
1819
|
+
selectedRecentIndex = 0,
|
|
1820
|
+
onSelectRecent,
|
|
1821
|
+
selectedShipmentIndex = 0,
|
|
1822
|
+
onSelectShipment
|
|
1823
|
+
}) {
|
|
1824
|
+
const steps = trackingSteps(result);
|
|
1825
|
+
const { identity, shipmentValues } = trackingSelection(result, recentQueries);
|
|
1531
1826
|
return /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
1532
|
-
/* @__PURE__ */
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
] }),
|
|
1536
|
-
/* @__PURE__ */ jsx4("h2", { style: { margin: "clamp(24px, 8%, 48px) 0 0", fontSize: 32, lineHeight: 1.25, fontWeight: 700, color: "#303030", overflowWrap: "anywhere" }, children: result.status }),
|
|
1827
|
+
identity.values.length > 1 && onSelectRecent ? /* @__PURE__ */ jsx5(TrackPageOrderBadges, { values: identity.values.slice(0, 3), selectedIndex: selectedRecentIndex, onSelect: onSelectRecent }) : identity.values[0] ? /* @__PURE__ */ jsx5(TrackPageQueryNumber, { mode: identity.mode, value: identity.values[0] }) : null,
|
|
1828
|
+
shipmentValues.length > 1 && onSelectShipment ? /* @__PURE__ */ jsx5(TrackPageOrderBadges, { values: shipmentValues, selectedIndex: selectedShipmentIndex, onSelect: onSelectShipment, style: { marginTop: 8 } }) : null,
|
|
1829
|
+
/* @__PURE__ */ jsx5("h2", { style: { margin: "clamp(24px, 8%, 48px) 0 0", fontSize: 32, lineHeight: 1.25, fontWeight: 700, color: "#303030", overflowWrap: "anywhere" }, children: result.status }),
|
|
1537
1830
|
/* @__PURE__ */ jsxs4("div", { className: "bt-progress-band", children: [
|
|
1538
|
-
showEstimatedDelivery && result.estimatedDelivery ? /* @__PURE__ */
|
|
1539
|
-
/* @__PURE__ */
|
|
1831
|
+
showEstimatedDelivery && result.estimatedDelivery ? /* @__PURE__ */ jsx5(EstimatedDeliveryCard, { dateText: result.estimatedDelivery, steps: steps.length }) : null,
|
|
1832
|
+
/* @__PURE__ */ jsx5(TrackingProgress, { steps, color })
|
|
1540
1833
|
] })
|
|
1541
1834
|
] });
|
|
1542
1835
|
}
|
|
1543
1836
|
function DeliveryResult({ heading, contentsHeading, carrierHeading, result, editing }) {
|
|
1544
1837
|
return /* @__PURE__ */ jsxs4("div", { style: { ...contentWidth, display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 280px), 500px))", gap: 40, justifyContent: "center", alignItems: "start" }, children: [
|
|
1545
1838
|
/* @__PURE__ */ jsxs4("div", { children: [
|
|
1546
|
-
/* @__PURE__ */
|
|
1547
|
-
/* @__PURE__ */
|
|
1839
|
+
/* @__PURE__ */ jsx5("h3", { style: { margin: 0, fontSize: 20, lineHeight: "20px", fontWeight: 700 }, children: heading }),
|
|
1840
|
+
/* @__PURE__ */ jsx5(ShippingTimeline, { events: trackingEvents(result) })
|
|
1548
1841
|
] }),
|
|
1549
1842
|
/* @__PURE__ */ jsxs4("div", { style: { display: "flex", flexDirection: "column", gap: 24 }, children: [
|
|
1550
|
-
/* @__PURE__ */
|
|
1843
|
+
/* @__PURE__ */ jsx5(TrackingPageAdSlot, { ad: result.ad, disableLink: editing }),
|
|
1551
1844
|
/* @__PURE__ */ jsxs4("div", { children: [
|
|
1552
|
-
/* @__PURE__ */
|
|
1553
|
-
/* @__PURE__ */
|
|
1845
|
+
/* @__PURE__ */ jsx5("h3", { style: { margin: "0 0 12px", fontSize: 18, fontWeight: 700 }, children: contentsHeading }),
|
|
1846
|
+
/* @__PURE__ */ jsx5(PackageContents, { items: result.orderItems ?? [] })
|
|
1554
1847
|
] }),
|
|
1555
1848
|
/* @__PURE__ */ jsxs4("div", { children: [
|
|
1556
|
-
/* @__PURE__ */
|
|
1557
|
-
/* @__PURE__ */
|
|
1558
|
-
/* @__PURE__ */
|
|
1849
|
+
/* @__PURE__ */ jsx5("h3", { style: { margin: "0 0 12px", fontSize: 18, fontWeight: 700 }, children: carrierHeading }),
|
|
1850
|
+
/* @__PURE__ */ jsx5("p", { style: { margin: 0, fontSize: 14, fontWeight: 600, color: "#1e293b" }, children: result.carrier ?? "Not available" }),
|
|
1851
|
+
/* @__PURE__ */ jsx5("p", { style: { margin: "8px 0 0", fontSize: 14, color: "#64748b" }, children: result.destination ?? "Destination details are not available." })
|
|
1559
1852
|
] })
|
|
1560
1853
|
] })
|
|
1561
1854
|
] });
|
|
1562
1855
|
}
|
|
1563
1856
|
function ReadyToGoQueryEditor(block) {
|
|
1564
|
-
return /* @__PURE__ */
|
|
1857
|
+
return /* @__PURE__ */ jsx5("section", { "aria-label": "Ready-to-go query editor", style: editorHeroStyle, children: /* @__PURE__ */ jsxs4("div", { role: "region", "aria-label": "Ready-to-go tracking query", style: editorFormCardStyle, children: [
|
|
1565
1858
|
/* @__PURE__ */ jsxs4("div", { style: { display: "flex", width: "100%", borderBottom: "1px solid #cbd5e1" }, children: [
|
|
1566
|
-
/* @__PURE__ */
|
|
1567
|
-
/* @__PURE__ */
|
|
1859
|
+
/* @__PURE__ */ jsx5("div", { style: { ...tabStyle(true), display: "flex", alignItems: "center", justifyContent: "center", cursor: "default" }, children: /* @__PURE__ */ jsx5(InlineText, { block, name: "trackingTabLabel", fallback: "Tracking Number" }) }),
|
|
1860
|
+
/* @__PURE__ */ jsx5("div", { style: { ...tabStyle(false), display: "flex", alignItems: "center", justifyContent: "center", cursor: "default" }, children: /* @__PURE__ */ jsx5(InlineText, { block, name: "orderTabLabel", fallback: "Order Number" }) })
|
|
1568
1861
|
] }),
|
|
1569
1862
|
/* @__PURE__ */ jsxs4("div", { style: { marginTop: 24, display: "flex", flexDirection: "column", gap: 16, flex: 1 }, children: [
|
|
1570
|
-
/* @__PURE__ */
|
|
1863
|
+
/* @__PURE__ */ jsx5(
|
|
1571
1864
|
"input",
|
|
1572
1865
|
{
|
|
1573
1866
|
"aria-label": "Canvas default tracking number",
|
|
@@ -1582,153 +1875,113 @@ function ReadyToGoQueryEditor(block) {
|
|
|
1582
1875
|
}
|
|
1583
1876
|
}
|
|
1584
1877
|
),
|
|
1585
|
-
/* @__PURE__ */
|
|
1878
|
+
/* @__PURE__ */ jsx5("div", { style: submitButtonStyle(block), children: /* @__PURE__ */ jsx5(InlineText, { block, name: "submitLabel", fallback: "Track Your Order" }) })
|
|
1586
1879
|
] }),
|
|
1587
|
-
/* @__PURE__ */
|
|
1880
|
+
/* @__PURE__ */ jsx5("p", { style: { marginTop: "auto", paddingTop: 28, textAlign: "center", fontSize: 12, lineHeight: "17px", fontStyle: "italic", color: "#b8b8b8" }, children: "Powered by BestTrack" })
|
|
1588
1881
|
] }) });
|
|
1589
1882
|
}
|
|
1590
1883
|
function ReadyToGoProgressEditor(block) {
|
|
1591
|
-
return /* @__PURE__ */
|
|
1884
|
+
return /* @__PURE__ */ jsx5("section", { "aria-label": "Ready-to-go progress editor", style: { ...pageFont, background: "var(--pb-color-background, #fff)", color: "var(--pb-color-text, #0f172a)", borderBottom: "1px solid #f1f5f9" }, children: /* @__PURE__ */ jsx5("div", { style: { ...contentWidth, textAlign: "center", width: "min(1248px, 100%)" }, children: /* @__PURE__ */ jsx5(ProgressResult, { result: previewTrackingPageResult(), showEstimatedDelivery: false, color: text(block, "progressColor") }) }) });
|
|
1592
1885
|
}
|
|
1593
1886
|
function ReadyToGoDeliveryEditor(block) {
|
|
1594
|
-
const { adPreview } =
|
|
1595
|
-
return /* @__PURE__ */
|
|
1887
|
+
const { adPreview } = useTrackingRuntime();
|
|
1888
|
+
return /* @__PURE__ */ jsx5("section", { "aria-label": "Ready-to-go delivery editor", style: { ...pageFont, background: "var(--pb-color-background, #fff)", color: "var(--pb-color-text, #0f172a)", borderBottom: "1px solid #f1f5f9" }, children: /* @__PURE__ */ jsx5(
|
|
1596
1889
|
DeliveryResult,
|
|
1597
1890
|
{
|
|
1598
|
-
heading: /* @__PURE__ */
|
|
1599
|
-
contentsHeading: /* @__PURE__ */
|
|
1600
|
-
carrierHeading: /* @__PURE__ */
|
|
1891
|
+
heading: /* @__PURE__ */ jsx5(InlineText, { block, name: "heading", fallback: "Shipping Details" }),
|
|
1892
|
+
contentsHeading: /* @__PURE__ */ jsx5(InlineText, { block, name: "contentsHeading", fallback: "Package Contents" }),
|
|
1893
|
+
carrierHeading: /* @__PURE__ */ jsx5(InlineText, { block, name: "carrierHeading", fallback: "Carrier" }),
|
|
1601
1894
|
editing: true,
|
|
1602
|
-
result: { ...
|
|
1895
|
+
result: { ...previewTrackingPageResult(), ad: adPreview ?? void 0 }
|
|
1603
1896
|
}
|
|
1604
1897
|
) });
|
|
1605
1898
|
}
|
|
1606
|
-
function configuredRecommendations(products) {
|
|
1607
|
-
return parseProductReferences(products).map((product) => ({
|
|
1608
|
-
id: product.id,
|
|
1609
|
-
title: product.title || product.id,
|
|
1610
|
-
description: "",
|
|
1611
|
-
imageUrl: product.imageUrl,
|
|
1612
|
-
// Product snapshots only persist the Shopify handle. Resolve the generated
|
|
1613
|
-
// storefront path before RecommendationCards applies its URL safety check.
|
|
1614
|
-
href: resolveShopifyRecommendHref(void 0, product.handle),
|
|
1615
|
-
...product.price ? { price: product.price } : {}
|
|
1616
|
-
}));
|
|
1617
|
-
}
|
|
1618
1899
|
function ReadyToGoRecommendationsEditor(block) {
|
|
1619
1900
|
const selected = configuredRecommendations(block.products);
|
|
1620
|
-
const items = selected.length ? selected :
|
|
1621
|
-
return /* @__PURE__ */
|
|
1622
|
-
/* @__PURE__ */
|
|
1623
|
-
/* @__PURE__ */
|
|
1901
|
+
const items = selected.length ? selected : previewTrackingPageResult().recommendations ?? [];
|
|
1902
|
+
return /* @__PURE__ */ jsx5("section", { "aria-label": "Ready-to-go recommendations editor", style: { ...pageFont, background: "var(--pb-color-background, #fff)", color: "var(--pb-color-text, #0f172a)" }, children: /* @__PURE__ */ jsxs4("div", { style: contentWidth, children: [
|
|
1903
|
+
/* @__PURE__ */ jsx5("h3", { style: { margin: 0, textAlign: "center", fontSize: 20, lineHeight: "20px", fontWeight: 700 }, children: /* @__PURE__ */ jsx5(InlineText, { block, name: "heading", fallback: "You may also like..." }) }),
|
|
1904
|
+
/* @__PURE__ */ jsx5("div", { style: { marginTop: 24 }, children: /* @__PURE__ */ jsx5(RecommendationCards, { items }) })
|
|
1624
1905
|
] }) });
|
|
1625
1906
|
}
|
|
1626
1907
|
function ReadyToGoQueryBlock(props) {
|
|
1627
|
-
const runtime =
|
|
1628
|
-
const
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
const autoQueryStarted = useRef(false);
|
|
1635
|
-
const previewDemoTrackingNumber = useRef(trackingNumber);
|
|
1908
|
+
const runtime = useTrackingRuntime();
|
|
1909
|
+
const { mode, setMode, trackingNumber, setTrackingNumber, orderNumber, setOrderNumber, email, setEmail, localError, loading, submit } = useTrackingQueryForm({
|
|
1910
|
+
initialTrackingNumber: text(props, "defaultTrackingNumber", "BT-2048-DEMO"),
|
|
1911
|
+
initialOrderNumber: text(props, "defaultOrderNumber", ""),
|
|
1912
|
+
initialMode: text(props, "defaultQueryMode", "tracking") === "order" ? "order" : "tracking",
|
|
1913
|
+
onComplete: scrollToTrackingResult
|
|
1914
|
+
});
|
|
1636
1915
|
const submitLabel = text(props, "submitLabel", "Track Your Order");
|
|
1637
1916
|
const trackingTabLabel = text(props, "trackingTabLabel", "Tracking Number");
|
|
1638
1917
|
const orderTabLabel = text(props, "orderTabLabel", "Order Number");
|
|
1639
|
-
|
|
1640
|
-
if (autoQueryStarted.current) return;
|
|
1641
|
-
if (locationState?.canAutoQuery) {
|
|
1642
|
-
autoQueryStarted.current = true;
|
|
1643
|
-
void runtime.query(locationState.tab === "tracking" ? { mode: "tracking", trackingNumber: locationState.trackingNumber } : { mode: "order", orderNumber: locationState.orderNumber, email: locationState.email }).finally(() => scrollToTrackingResult());
|
|
1644
|
-
return;
|
|
1645
|
-
}
|
|
1646
|
-
const demoTrackingNumber = previewDemoTrackingNumber.current.trim();
|
|
1647
|
-
if (!runtime.autoQueryDemo || !demoTrackingNumber) return;
|
|
1648
|
-
autoQueryStarted.current = true;
|
|
1649
|
-
void runtime.query({ mode: "tracking", trackingNumber: demoTrackingNumber });
|
|
1650
|
-
}, [locationState, runtime]);
|
|
1651
|
-
const submit = (event) => {
|
|
1652
|
-
event.preventDefault();
|
|
1653
|
-
if (runtime.phase === "loading") return;
|
|
1654
|
-
setLocalError("");
|
|
1655
|
-
if (mode === "order") {
|
|
1656
|
-
if (!orderNumber.trim() || !email.trim()) {
|
|
1657
|
-
setLocalError("Please enter your order number and email address");
|
|
1658
|
-
return;
|
|
1659
|
-
}
|
|
1660
|
-
syncTrackingQueryToUrl("order", orderNumber.trim(), email.trim());
|
|
1661
|
-
void runtime.query({ mode: "order", orderNumber: orderNumber.trim(), email: email.trim() }).finally(() => scrollToTrackingResult());
|
|
1662
|
-
return;
|
|
1663
|
-
}
|
|
1664
|
-
if (!trackingNumber.trim()) {
|
|
1665
|
-
setLocalError("Please enter your tracking number");
|
|
1666
|
-
return;
|
|
1667
|
-
}
|
|
1668
|
-
syncTrackingQueryToUrl("tracking", trackingNumber.trim());
|
|
1669
|
-
void runtime.query({ mode: "tracking", trackingNumber: trackingNumber.trim() }).finally(() => scrollToTrackingResult());
|
|
1670
|
-
};
|
|
1671
|
-
const loading = runtime.phase === "loading";
|
|
1672
|
-
return /* @__PURE__ */ jsx4("section", { style: heroStyle, children: /* @__PURE__ */ jsxs4("div", { role: "region", "aria-label": "Ready-to-go tracking query", style: formCardStyle, children: [
|
|
1918
|
+
return /* @__PURE__ */ jsx5("section", { style: heroStyle, children: /* @__PURE__ */ jsxs4("div", { role: "region", "aria-label": "Ready-to-go tracking query", style: formCardStyle, children: [
|
|
1673
1919
|
/* @__PURE__ */ jsxs4("div", { role: "tablist", "aria-label": "Tracking method", style: { display: "flex", width: "100%", borderBottom: "1px solid #cbd5e1" }, children: [
|
|
1674
|
-
/* @__PURE__ */
|
|
1675
|
-
|
|
1676
|
-
setLocalError("");
|
|
1677
|
-
}, style: tabStyle(mode === "tracking"), children: trackingTabLabel }),
|
|
1678
|
-
/* @__PURE__ */ jsx4("button", { type: "button", role: "tab", "aria-selected": mode === "order", onClick: () => {
|
|
1679
|
-
setMode("order");
|
|
1680
|
-
setLocalError("");
|
|
1681
|
-
}, style: tabStyle(mode === "order"), children: orderTabLabel })
|
|
1920
|
+
/* @__PURE__ */ jsx5("button", { type: "button", role: "tab", "aria-selected": mode === "tracking", onClick: () => setMode("tracking"), style: tabStyle(mode === "tracking"), children: trackingTabLabel }),
|
|
1921
|
+
/* @__PURE__ */ jsx5("button", { type: "button", role: "tab", "aria-selected": mode === "order", onClick: () => setMode("order"), style: tabStyle(mode === "order"), children: orderTabLabel })
|
|
1682
1922
|
] }),
|
|
1683
1923
|
/* @__PURE__ */ jsxs4("form", { onSubmit: submit, style: { marginTop: 24, display: "flex", flexDirection: "column", gap: 16, flex: 1 }, children: [
|
|
1684
1924
|
mode === "order" ? /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
1685
|
-
/* @__PURE__ */
|
|
1686
|
-
/* @__PURE__ */
|
|
1687
|
-
/* @__PURE__ */
|
|
1688
|
-
/* @__PURE__ */
|
|
1925
|
+
/* @__PURE__ */ jsx5("label", { htmlFor: "ready-to-go-order-number", style: { position: "absolute", width: 1, height: 1, overflow: "hidden", clipPath: "inset(50%)" }, children: "Order number" }),
|
|
1926
|
+
/* @__PURE__ */ jsx5("input", { id: "ready-to-go-order-number", "aria-label": "Order number", value: orderNumber, onChange: (event) => setOrderNumber(event.target.value), placeholder: "Order Number", style: inputStyle }),
|
|
1927
|
+
/* @__PURE__ */ jsx5("label", { htmlFor: "ready-to-go-email", style: { position: "absolute", width: 1, height: 1, overflow: "hidden", clipPath: "inset(50%)" }, children: "Email" }),
|
|
1928
|
+
/* @__PURE__ */ jsx5("input", { id: "ready-to-go-email", "aria-label": "Email", value: email, onChange: (event) => setEmail(event.target.value), placeholder: "Email", style: inputStyle })
|
|
1689
1929
|
] }) : /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
1690
|
-
/* @__PURE__ */
|
|
1691
|
-
/* @__PURE__ */
|
|
1930
|
+
/* @__PURE__ */ jsx5("label", { htmlFor: "ready-to-go-tracking-number", style: { position: "absolute", width: 1, height: 1, overflow: "hidden", clipPath: "inset(50%)" }, children: "Tracking number" }),
|
|
1931
|
+
/* @__PURE__ */ jsx5("input", { id: "ready-to-go-tracking-number", "aria-label": "Tracking number", value: trackingNumber, onChange: (event) => setTrackingNumber(event.target.value), placeholder: "Tracking Number", style: inputStyle })
|
|
1692
1932
|
] }),
|
|
1693
|
-
localError ? /* @__PURE__ */
|
|
1694
|
-
/* @__PURE__ */
|
|
1695
|
-
runtime.phase === "error" ? /* @__PURE__ */
|
|
1933
|
+
localError ? /* @__PURE__ */ jsx5("p", { role: "alert", style: { margin: 0, textAlign: "center", fontSize: 12, color: "#f43f5e" }, children: localError }) : null,
|
|
1934
|
+
/* @__PURE__ */ jsx5("button", { type: "submit", disabled: loading, style: { ...submitButtonStyle(props, loading), border: 0, font: "inherit", fontSize: 15, fontWeight: 600, cursor: loading ? "wait" : "pointer", opacity: loading ? 0.7 : 1 }, children: submitLabel }),
|
|
1935
|
+
runtime.phase === "error" ? /* @__PURE__ */ jsx5("p", { role: "alert", style: { margin: 0, textAlign: "center", fontSize: 12, color: "#f43f5e" }, children: runtime.error }) : null
|
|
1696
1936
|
] }),
|
|
1697
|
-
/* @__PURE__ */
|
|
1698
|
-
loading ? /* @__PURE__ */
|
|
1937
|
+
/* @__PURE__ */ jsx5(RuntimeWatermark, { watermark: runtime.watermark }),
|
|
1938
|
+
loading ? /* @__PURE__ */ jsx5(TrackingLoading, {}) : null
|
|
1699
1939
|
] }) });
|
|
1700
1940
|
}
|
|
1701
1941
|
function ReadyToGoProgressBlock(props) {
|
|
1702
|
-
const runtime =
|
|
1942
|
+
const runtime = useTrackingRuntime();
|
|
1943
|
+
const visibility = trackingBlockState(runtime);
|
|
1703
1944
|
const result = runtime.result;
|
|
1704
|
-
if (
|
|
1705
|
-
if (
|
|
1706
|
-
return /* @__PURE__ */
|
|
1707
|
-
|
|
1708
|
-
|
|
1945
|
+
if (!visibility.showProgress) return null;
|
|
1946
|
+
if (visibility.showNotFound) return /* @__PURE__ */ jsx5(TrackingNotFound, { resultAnchor: true });
|
|
1947
|
+
return /* @__PURE__ */ jsx5(SectionShell, { title: "Shipment progress", resultAnchor: true, children: /* @__PURE__ */ jsxs4("div", { style: { ...contentWidth, textAlign: "center", width: "min(1248px, 100%)" }, children: [
|
|
1948
|
+
visibility.showUnavailable ? /* @__PURE__ */ jsx5("p", { style: { margin: 0, color: "#b42318" }, children: "Shipment progress is temporarily unavailable." }) : null,
|
|
1949
|
+
visibility.showResult && result ? /* @__PURE__ */ jsx5(
|
|
1950
|
+
ProgressResult,
|
|
1951
|
+
{
|
|
1952
|
+
result,
|
|
1953
|
+
showEstimatedDelivery: visibility.showEstimatedDelivery,
|
|
1954
|
+
color: text(props, "progressColor"),
|
|
1955
|
+
recentQueries: runtime.recentQueries,
|
|
1956
|
+
selectedRecentIndex: runtime.selectedRecentIndex,
|
|
1957
|
+
onSelectRecent: runtime.selectRecentQuery,
|
|
1958
|
+
selectedShipmentIndex: runtime.selectedShipmentIndex,
|
|
1959
|
+
onSelectShipment: runtime.selectShipment
|
|
1960
|
+
}
|
|
1961
|
+
) : null
|
|
1709
1962
|
] }) });
|
|
1710
1963
|
}
|
|
1711
1964
|
function ReadyToGoDeliveryBlock(props) {
|
|
1712
|
-
const runtime =
|
|
1713
|
-
|
|
1965
|
+
const runtime = useTrackingRuntime();
|
|
1966
|
+
const visibility = trackingBlockState(runtime);
|
|
1967
|
+
if (!visibility.showDelivery) return null;
|
|
1714
1968
|
const heading = text(props, "heading", "Shipping Details");
|
|
1715
1969
|
const contentsHeading = text(props, "contentsHeading", "Package Contents");
|
|
1716
1970
|
const carrierHeading = text(props, "carrierHeading", "Carrier");
|
|
1717
1971
|
const result = runtime.result;
|
|
1718
|
-
return /* @__PURE__ */
|
|
1719
|
-
/* @__PURE__ */
|
|
1720
|
-
|
|
1972
|
+
return /* @__PURE__ */ jsx5(SectionShell, { title: heading, children: visibility.showResult && result ? /* @__PURE__ */ jsx5(DeliveryResult, { heading, contentsHeading, carrierHeading, result }) : /* @__PURE__ */ jsx5("div", { style: { ...contentWidth, display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 280px), 500px))", gap: 40, justifyContent: "center", alignItems: "start" }, children: /* @__PURE__ */ jsxs4("div", { children: [
|
|
1973
|
+
/* @__PURE__ */ jsx5("h3", { style: { margin: 0, fontSize: 20, lineHeight: "20px", fontWeight: 700 }, children: heading }),
|
|
1974
|
+
visibility.showUnavailable ? /* @__PURE__ */ jsx5("p", { style: { margin: "16px 0 0", color: "#b42318" }, children: "Delivery details are temporarily unavailable." }) : null
|
|
1721
1975
|
] }) }) });
|
|
1722
1976
|
}
|
|
1723
1977
|
function ReadyToGoRecommendationsBlock(props) {
|
|
1724
|
-
const runtime =
|
|
1978
|
+
const runtime = useTrackingRuntime();
|
|
1725
1979
|
const heading = text(props, "heading", "You may also like...");
|
|
1726
|
-
const
|
|
1727
|
-
const items = configured.length ? configured : runtime.recommendations.phase === "success" ? runtime.recommendations.items : [];
|
|
1980
|
+
const items = recommendationItems(props.products, runtime);
|
|
1728
1981
|
if (!items.length) return null;
|
|
1729
|
-
return /* @__PURE__ */
|
|
1730
|
-
/* @__PURE__ */
|
|
1731
|
-
/* @__PURE__ */
|
|
1982
|
+
return /* @__PURE__ */ jsx5(SectionShell, { title: heading, bordered: false, children: /* @__PURE__ */ jsxs4("div", { style: contentWidth, children: [
|
|
1983
|
+
/* @__PURE__ */ jsx5("h3", { style: { margin: 0, textAlign: "center", fontSize: 20, lineHeight: "20px", fontWeight: 700 }, children: heading }),
|
|
1984
|
+
/* @__PURE__ */ jsx5("div", { style: { marginTop: 24 }, children: /* @__PURE__ */ jsx5(RecommendationCards, { items }) })
|
|
1732
1985
|
] }) });
|
|
1733
1986
|
}
|
|
1734
1987
|
|
|
@@ -1828,12 +2081,12 @@ var readyToGoBlocks = withTemplatePolicy([
|
|
|
1828
2081
|
},
|
|
1829
2082
|
render: { web: ReadyToGoRecommendationsBlock, editor: ReadyToGoRecommendationsEditor }
|
|
1830
2083
|
}
|
|
1831
|
-
], ["besttrack.ready-to-go.query", "besttrack.ready-to-go.progress", "besttrack.ready-to-go.delivery"]);
|
|
2084
|
+
], ["besttrack.ready-to-go.query", "besttrack.ready-to-go.progress", "besttrack.ready-to-go.delivery", "besttrack.ready-to-go.recommendations"]);
|
|
1832
2085
|
var readyToGoTemplatePolicy = defineTemplatePolicy(
|
|
1833
2086
|
"besttrack.ready-to-go",
|
|
1834
2087
|
"Ready-to-go",
|
|
1835
2088
|
readyToGoBlocks.map((block) => block.type),
|
|
1836
|
-
["besttrack.ready-to-go.query", "besttrack.ready-to-go.progress", "besttrack.ready-to-go.delivery"]
|
|
2089
|
+
["besttrack.ready-to-go.query", "besttrack.ready-to-go.progress", "besttrack.ready-to-go.delivery", "besttrack.ready-to-go.recommendations"]
|
|
1837
2090
|
);
|
|
1838
2091
|
function createReadyToGoTemplate() {
|
|
1839
2092
|
return {
|
|
@@ -1883,11 +2136,11 @@ var bestTrackPageExtension = Object.freeze({
|
|
|
1883
2136
|
import { createPageDocument as createPageDocument2 } from "@standhigher/puck-page-builder/runtime";
|
|
1884
2137
|
|
|
1885
2138
|
// src/branded.tsx
|
|
1886
|
-
import {
|
|
2139
|
+
import { useState as useState5 } from "react";
|
|
1887
2140
|
|
|
1888
2141
|
// src/tracking-query-experience.tsx
|
|
1889
|
-
import { useEffect as
|
|
1890
|
-
import { Fragment as Fragment4, jsx as
|
|
2142
|
+
import { useEffect as useEffect4, useId as useId2, useRef as useRef3, useState as useState4 } from "react";
|
|
2143
|
+
import { Fragment as Fragment4, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1891
2144
|
var srOnly = {
|
|
1892
2145
|
position: "absolute",
|
|
1893
2146
|
width: 1,
|
|
@@ -1931,11 +2184,6 @@ var defaultSubmitStyle = (loading) => ({
|
|
|
1931
2184
|
fontWeight: 700,
|
|
1932
2185
|
cursor: loading ? "wait" : "pointer"
|
|
1933
2186
|
});
|
|
1934
|
-
function fieldError(field) {
|
|
1935
|
-
if (field === "tracking") return "Enter a valid tracking number.";
|
|
1936
|
-
if (field === "order") return "Enter a valid order number.";
|
|
1937
|
-
return "Enter a valid email address.";
|
|
1938
|
-
}
|
|
1939
2187
|
function TrackingQueryCard({
|
|
1940
2188
|
phase,
|
|
1941
2189
|
onQuery,
|
|
@@ -1949,7 +2197,6 @@ function TrackingQueryCard({
|
|
|
1949
2197
|
trackingPlaceholder = "Enter your tracking number",
|
|
1950
2198
|
orderPlaceholder = "Enter your order number",
|
|
1951
2199
|
emailPlaceholder = "Enter your email",
|
|
1952
|
-
emptyMessage = "We couldn't find an order or shipment for that number.",
|
|
1953
2200
|
errorMessage = "We couldn't retrieve this order right now. Please try again later.",
|
|
1954
2201
|
trackingInputLabel = "Tracking number",
|
|
1955
2202
|
orderInputLabel = "Order number",
|
|
@@ -1976,20 +2223,16 @@ function TrackingQueryCard({
|
|
|
1976
2223
|
const orderTabId = useId2();
|
|
1977
2224
|
const tabPanelId = useId2();
|
|
1978
2225
|
const queryStatusId = useId2();
|
|
1979
|
-
const
|
|
1980
|
-
const
|
|
1981
|
-
const
|
|
1982
|
-
const
|
|
1983
|
-
const
|
|
1984
|
-
const
|
|
1985
|
-
const
|
|
1986
|
-
const
|
|
1987
|
-
const
|
|
1988
|
-
|
|
1989
|
-
const tabRefs = useRef2({ tracking: null, order: null });
|
|
1990
|
-
const loading = phase === "loading";
|
|
1991
|
-
const terminalPhase = phase === "success" || phase === "empty" || phase === "error";
|
|
1992
|
-
useEffect3(() => {
|
|
2226
|
+
const { mode, setMode, trackingNumber, setTrackingNumber, orderNumber, setOrderNumber, email, setEmail, localError, firstInvalidField, loading, submit } = useTrackingQueryForm({ initialTrackingNumber, initialOrderNumber, initialMode, onQuery, phase });
|
|
2227
|
+
const cardRef = useRef3(null);
|
|
2228
|
+
const resultRef = useRef3(null);
|
|
2229
|
+
const trackingInputRef = useRef3(null);
|
|
2230
|
+
const orderInputRef = useRef3(null);
|
|
2231
|
+
const emailInputRef = useRef3(null);
|
|
2232
|
+
const tabRefs = useRef3({ tracking: null, order: null });
|
|
2233
|
+
const visibility = trackingBlockState({ phase });
|
|
2234
|
+
const terminalPhase = visibility.showProgress;
|
|
2235
|
+
useEffect4(() => {
|
|
1993
2236
|
if (!terminalPhase) return;
|
|
1994
2237
|
const card = cardRef.current;
|
|
1995
2238
|
const resultNode = resultRef.current;
|
|
@@ -1998,13 +2241,12 @@ function TrackingQueryCard({
|
|
|
1998
2241
|
}
|
|
1999
2242
|
resultNode?.focus({ preventScroll: true });
|
|
2000
2243
|
}, [phase, terminalPhase]);
|
|
2001
|
-
|
|
2002
|
-
const input =
|
|
2244
|
+
useEffect4(() => {
|
|
2245
|
+
const input = firstInvalidField === "tracking" ? trackingInputRef.current : firstInvalidField === "order" ? orderInputRef.current : firstInvalidField === "email" ? emailInputRef.current : null;
|
|
2003
2246
|
input?.focus();
|
|
2004
|
-
};
|
|
2247
|
+
}, [firstInvalidField, localError]);
|
|
2005
2248
|
const setActiveMode = (nextMode, moveFocus = false) => {
|
|
2006
2249
|
setMode(nextMode);
|
|
2007
|
-
setErrors({});
|
|
2008
2250
|
if (moveFocus) tabRefs.current[nextMode]?.focus();
|
|
2009
2251
|
};
|
|
2010
2252
|
const onTabKeyDown = (event, currentMode) => {
|
|
@@ -2015,273 +2257,186 @@ function TrackingQueryCard({
|
|
|
2015
2257
|
event.preventDefault();
|
|
2016
2258
|
setActiveMode(nextMode, true);
|
|
2017
2259
|
};
|
|
2018
|
-
const
|
|
2019
|
-
setErrors((current) => {
|
|
2020
|
-
if (!current[field]) return current;
|
|
2021
|
-
const next = { ...current };
|
|
2022
|
-
delete next[field];
|
|
2023
|
-
return next;
|
|
2024
|
-
});
|
|
2025
|
-
};
|
|
2026
|
-
const submit = (event) => {
|
|
2027
|
-
event.preventDefault();
|
|
2028
|
-
if (loading) return;
|
|
2029
|
-
const nextErrors = {};
|
|
2030
|
-
const normalizedTrackingNumber = trackingNumber.trim();
|
|
2031
|
-
const normalizedOrderNumber = orderNumber.trim();
|
|
2032
|
-
const normalizedEmail = email.trim();
|
|
2033
|
-
if (mode === "tracking" && !isValidTrackingNumber(normalizedTrackingNumber)) nextErrors.tracking = fieldError("tracking");
|
|
2034
|
-
if (mode === "order" && !isValidOrderNumber(normalizedOrderNumber)) nextErrors.order = fieldError("order");
|
|
2035
|
-
if (mode === "order" && !isValidOrderEmail(normalizedEmail)) nextErrors.email = fieldError("email");
|
|
2036
|
-
const firstInvalidField = mode === "tracking" ? "tracking" : nextErrors.order ? "order" : nextErrors.email ? "email" : void 0;
|
|
2037
|
-
if (firstInvalidField && nextErrors[firstInvalidField]) {
|
|
2038
|
-
setErrors(nextErrors);
|
|
2039
|
-
focusField(firstInvalidField);
|
|
2040
|
-
return;
|
|
2041
|
-
}
|
|
2042
|
-
setErrors({});
|
|
2043
|
-
void onQuery(mode === "tracking" ? { mode, trackingNumber: normalizedTrackingNumber } : { mode, orderNumber: normalizedOrderNumber, email: normalizedEmail });
|
|
2044
|
-
};
|
|
2045
|
-
const errorFor = (field) => errors[field];
|
|
2260
|
+
const errorFor = (field) => firstInvalidField === field ? localError : void 0;
|
|
2046
2261
|
const inputWithError = (field) => ({ ...inputStyle2, borderColor: errorFor(field) ? "#b42318" : inputStyle2.borderColor ?? "#cbd5e1" });
|
|
2047
|
-
const message =
|
|
2262
|
+
const message = visibility.showUnavailable ? errorMessage : void 0;
|
|
2048
2263
|
const cardData = cardDataAttribute ? { [cardDataAttribute]: "true" } : {};
|
|
2049
2264
|
const resultData = resultDataAttribute ? { [resultDataAttribute]: "true" } : {};
|
|
2050
2265
|
const activeTabId = mode === "tracking" ? trackingTabId : orderTabId;
|
|
2051
|
-
const resultLabel =
|
|
2266
|
+
const resultLabel = visibility.showResult ? "Tracking result" : "Tracking query status";
|
|
2052
2267
|
return /* @__PURE__ */ jsxs5("div", { ref: cardRef, "data-tracking-query-card": true, ...cardData, "aria-busy": loading || void 0, style: { boxSizing: "border-box", minWidth: 0, maxWidth: "100%", overflowX: "hidden", overflowY: "auto", overscrollBehavior: "contain", scrollPaddingBlock: 16, ...cardStyle2 }, children: [
|
|
2053
|
-
/* @__PURE__ */
|
|
2268
|
+
/* @__PURE__ */ jsx6("h1", { style: { margin: "0 0 28px", textAlign: "center", ...headingStyle }, children: heading }),
|
|
2054
2269
|
/* @__PURE__ */ jsxs5("div", { role: "tablist", "aria-label": "Tracking method", style: { display: "grid", gridTemplateColumns: "1fr 1fr", borderBottom: "1px solid #cbd5e1", marginBottom: 18, ...tabListStyle }, children: [
|
|
2055
|
-
/* @__PURE__ */
|
|
2270
|
+
/* @__PURE__ */ jsx6("button", { ref: (element) => {
|
|
2056
2271
|
tabRefs.current.tracking = element;
|
|
2057
2272
|
}, id: trackingTabId, type: "button", role: "tab", "aria-selected": mode === "tracking", "aria-controls": tabPanelId, tabIndex: mode === "tracking" ? 0 : -1, onClick: () => setActiveMode("tracking"), onKeyDown: (event) => onTabKeyDown(event, "tracking"), style: tabStyle2(mode === "tracking"), children: trackingTabLabel }),
|
|
2058
|
-
/* @__PURE__ */
|
|
2273
|
+
/* @__PURE__ */ jsx6("button", { ref: (element) => {
|
|
2059
2274
|
tabRefs.current.order = element;
|
|
2060
2275
|
}, id: orderTabId, type: "button", role: "tab", "aria-selected": mode === "order", "aria-controls": tabPanelId, tabIndex: mode === "order" ? 0 : -1, onClick: () => setActiveMode("order"), onKeyDown: (event) => onTabKeyDown(event, "order"), style: tabStyle2(mode === "order"), children: orderTabLabel })
|
|
2061
2276
|
] }),
|
|
2062
|
-
/* @__PURE__ */
|
|
2277
|
+
/* @__PURE__ */ jsx6("div", { id: tabPanelId, role: "tabpanel", "aria-labelledby": activeTabId, children: /* @__PURE__ */ jsxs5("form", { noValidate: true, onSubmit: submit, style: { display: "grid", gap: 12, minWidth: 0, ...formStyle }, children: [
|
|
2063
2278
|
mode === "tracking" ? /* @__PURE__ */ jsxs5("div", { children: [
|
|
2064
|
-
/* @__PURE__ */
|
|
2065
|
-
/* @__PURE__ */
|
|
2279
|
+
/* @__PURE__ */ jsx6("label", { htmlFor: trackingInputId, style: srOnly, children: trackingInputLabel }),
|
|
2280
|
+
/* @__PURE__ */ jsx6("input", { ref: trackingInputRef, id: trackingInputId, "aria-label": trackingInputLabel, "aria-invalid": Boolean(errorFor("tracking")), "aria-describedby": errorFor("tracking") ? trackingInputId + "-error" : void 0, value: trackingNumber, onChange: (event) => {
|
|
2066
2281
|
setTrackingNumber(event.target.value);
|
|
2067
|
-
clearError("tracking");
|
|
2068
2282
|
}, placeholder: trackingPlaceholder, style: inputWithError("tracking") }),
|
|
2069
|
-
errorFor("tracking") ? /* @__PURE__ */
|
|
2283
|
+
errorFor("tracking") ? /* @__PURE__ */ jsx6("p", { id: trackingInputId + "-error", role: "alert", style: { margin: "6px 0 0", color: "#b42318", fontSize: 13 }, children: errorFor("tracking") }) : null
|
|
2070
2284
|
] }) : /* @__PURE__ */ jsxs5(Fragment4, { children: [
|
|
2071
2285
|
/* @__PURE__ */ jsxs5("div", { children: [
|
|
2072
|
-
/* @__PURE__ */
|
|
2073
|
-
/* @__PURE__ */
|
|
2286
|
+
/* @__PURE__ */ jsx6("label", { htmlFor: orderInputId, style: srOnly, children: orderInputLabel }),
|
|
2287
|
+
/* @__PURE__ */ jsx6("input", { ref: orderInputRef, id: orderInputId, "aria-label": orderInputLabel, "aria-invalid": Boolean(errorFor("order")), "aria-describedby": errorFor("order") ? orderInputId + "-error" : void 0, value: orderNumber, onChange: (event) => {
|
|
2074
2288
|
setOrderNumber(event.target.value);
|
|
2075
|
-
clearError("order");
|
|
2076
2289
|
}, placeholder: orderPlaceholder, style: inputWithError("order") }),
|
|
2077
|
-
errorFor("order") ? /* @__PURE__ */
|
|
2290
|
+
errorFor("order") ? /* @__PURE__ */ jsx6("p", { id: orderInputId + "-error", role: "alert", style: { margin: "6px 0 0", color: "#b42318", fontSize: 13 }, children: errorFor("order") }) : null
|
|
2078
2291
|
] }),
|
|
2079
2292
|
/* @__PURE__ */ jsxs5("div", { children: [
|
|
2080
|
-
/* @__PURE__ */
|
|
2081
|
-
/* @__PURE__ */
|
|
2293
|
+
/* @__PURE__ */ jsx6("label", { htmlFor: emailInputId, style: srOnly, children: emailInputLabel }),
|
|
2294
|
+
/* @__PURE__ */ jsx6("input", { ref: emailInputRef, id: emailInputId, type: "email", "aria-label": emailInputLabel, "aria-invalid": Boolean(errorFor("email")), "aria-describedby": errorFor("email") ? emailInputId + "-error" : void 0, value: email, onChange: (event) => {
|
|
2082
2295
|
setEmail(event.target.value);
|
|
2083
|
-
clearError("email");
|
|
2084
2296
|
}, placeholder: emailPlaceholder, style: inputWithError("email") }),
|
|
2085
|
-
errorFor("email") ? /* @__PURE__ */
|
|
2297
|
+
errorFor("email") ? /* @__PURE__ */ jsx6("p", { id: emailInputId + "-error", role: "alert", style: { margin: "6px 0 0", color: "#b42318", fontSize: 13 }, children: errorFor("email") }) : null
|
|
2086
2298
|
] })
|
|
2087
2299
|
] }),
|
|
2088
|
-
/* @__PURE__ */
|
|
2300
|
+
/* @__PURE__ */ jsx6("button", { type: "submit", disabled: loading, style: submitStyle(loading), children: submitLabel })
|
|
2089
2301
|
] }) }),
|
|
2090
|
-
message ? /* @__PURE__ */
|
|
2091
|
-
|
|
2092
|
-
terminalPhase ? /* @__PURE__ */
|
|
2302
|
+
message ? /* @__PURE__ */ jsx6("p", { id: queryStatusId, role: "alert", "aria-live": "assertive", style: { margin: "16px 0 0", color: "#b42318", ...messageStyle }, children: message }) : null,
|
|
2303
|
+
visibility.showResult ? /* @__PURE__ */ jsx6("p", { id: queryStatusId, role: "status", "aria-live": "polite", style: srOnly, children: "Tracking details loaded." }) : null,
|
|
2304
|
+
terminalPhase ? /* @__PURE__ */ jsx6("div", { ref: resultRef, role: "region", "aria-label": resultLabel, "aria-describedby": queryStatusId, "data-tracking-query-result": true, ...resultData, "data-testid": resultTestId, tabIndex: -1, style: { minWidth: 0, overflowWrap: "anywhere", marginTop: visibility.showResult ? 20 : 0, ...resultStyle }, children: visibility.showResult ? result : visibility.showNotFound ? /* @__PURE__ */ jsx6("div", { id: queryStatusId, children: /* @__PURE__ */ jsx6(TrackingNotFound, {}) }) : /* @__PURE__ */ jsxs5(Fragment4, { children: [
|
|
2305
|
+
/* @__PURE__ */ jsx6("section", { "aria-label": "Shipment progress", children: /* @__PURE__ */ jsx6("p", { style: { color: "#b42318" }, children: "Shipment progress is temporarily unavailable." }) }),
|
|
2306
|
+
/* @__PURE__ */ jsx6("section", { "aria-label": "Shipping Details", children: /* @__PURE__ */ jsx6("p", { style: { color: "#b42318" }, children: "Delivery details are temporarily unavailable." }) })
|
|
2307
|
+
] }) }) : null,
|
|
2093
2308
|
watermark,
|
|
2094
|
-
loading ? /* @__PURE__ */
|
|
2309
|
+
loading ? /* @__PURE__ */ jsx6(TrackingLoading, {}) : null
|
|
2095
2310
|
] });
|
|
2096
2311
|
}
|
|
2097
|
-
function defaultProgress2(status) {
|
|
2098
|
-
const steps = [
|
|
2099
|
-
{ id: "ordered", label: "Ordered", icon: "check" },
|
|
2100
|
-
{ id: "ready", label: "Order Ready", icon: "bag" },
|
|
2101
|
-
{ id: "transit", label: "In Transit", icon: "truck" },
|
|
2102
|
-
{ id: "out", label: "Out for Delivery", icon: "box" },
|
|
2103
|
-
{ id: "delivered", label: "Delivered", icon: "check" }
|
|
2104
|
-
];
|
|
2105
|
-
const normalized = status.toLowerCase();
|
|
2106
|
-
const current = normalized.includes("deliver") ? normalized.includes("out for") ? 3 : 4 : normalized.includes("transit") ? 2 : normalized.includes("ready") ? 1 : 0;
|
|
2107
|
-
return steps.map((step, index) => ({ ...step, state: index < current ? "complete" : index === current ? "current" : "upcoming" }));
|
|
2108
|
-
}
|
|
2109
2312
|
function TrackingProgressDetails({ steps }) {
|
|
2110
|
-
return /* @__PURE__ */
|
|
2111
|
-
/* @__PURE__ */
|
|
2112
|
-
/* @__PURE__ */
|
|
2113
|
-
step.date ? /* @__PURE__ */
|
|
2313
|
+
return /* @__PURE__ */ jsx6("ol", { "aria-label": "Delivery progress", style: { display: "grid", gridTemplateColumns: `repeat(${steps.length}, minmax(0, 1fr))`, gap: 4, margin: "20px 0 0", padding: 0, listStyle: "none" }, children: steps.map((step, index) => /* @__PURE__ */ jsxs5("li", { style: { minWidth: 0, textAlign: "center", color: step.state === "upcoming" ? "#64748b" : "#0f172a" }, children: [
|
|
2314
|
+
/* @__PURE__ */ jsx6("span", { "aria-label": step.label + " " + step.state, style: { display: "grid", placeItems: "center", width: 28, height: 28, margin: "0 auto", border: "1px solid " + (step.state === "upcoming" ? "#94a3b8" : "#0f172a"), borderRadius: "50%", background: step.state === "current" ? "#0f172a" : "#fff", color: step.state === "current" ? "#fff" : "#0f172a", fontSize: 13, fontWeight: 700 }, children: step.state === "complete" || step.state === "current" ? "\u2713" : index + 1 }),
|
|
2315
|
+
/* @__PURE__ */ jsx6("span", { style: { display: "block", marginTop: 6, overflowWrap: "anywhere", fontSize: 11, lineHeight: 1.25 }, children: step.label }),
|
|
2316
|
+
step.date ? /* @__PURE__ */ jsx6("span", { style: { display: "block", marginTop: 3, color: "#94a3b8", fontSize: 10, lineHeight: 1.2 }, children: step.date }) : null
|
|
2114
2317
|
] }, step.id)) });
|
|
2115
2318
|
}
|
|
2116
2319
|
function TrackingEvents({ result }) {
|
|
2117
|
-
const
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
/* @__PURE__ */
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
event.detail ? /* @__PURE__ */ jsx5("span", { style: { display: "block", marginTop: 2, color: "#64748b", fontSize: 13 }, children: event.detail }) : null,
|
|
2126
|
-
event.at ? /* @__PURE__ */ jsx5("time", { style: { display: "block", marginTop: 3, color: "#94a3b8", fontSize: 12 }, children: event.at }) : null
|
|
2127
|
-
] }, event.id)) }),
|
|
2128
|
-
events.length > 3 ? /* @__PURE__ */ jsx5("button", { type: "button", onClick: () => setExpanded((current) => !current), style: { minWidth: 44, minHeight: 44, marginTop: 14, padding: "6px 12px", border: "1px solid #cbd5e1", borderRadius: 6, background: "#fff", color: "#0f172a", font: "inherit", fontSize: 13, cursor: "pointer" }, children: expanded ? "Show recent events" : "Show all events" }) : null
|
|
2129
|
-
] });
|
|
2320
|
+
const events = trackingEvents(result);
|
|
2321
|
+
if (!events.length) return /* @__PURE__ */ jsx6("p", { style: { margin: "12px 0 0", color: "#64748b", fontSize: 14 }, children: "Tracking events are not available yet. Please try again later." });
|
|
2322
|
+
return /* @__PURE__ */ jsx6("div", { "aria-label": "Shipping events", style: { marginTop: 16 }, children: /* @__PURE__ */ jsx6("ol", { style: { display: "grid", gap: 14, margin: 0, padding: 0, listStyle: "none" }, children: events.map((event, index) => /* @__PURE__ */ jsxs5("li", { style: { position: "relative", minWidth: 0, paddingLeft: 22, overflowWrap: "anywhere" }, children: [
|
|
2323
|
+
/* @__PURE__ */ jsx6("span", { "aria-hidden": "true", style: { position: "absolute", left: 0, top: 4, width: 10, height: 10, borderRadius: "50%", background: event.state === "current" || index === 0 ? "#111827" : "#cbd5e1" } }),
|
|
2324
|
+
/* @__PURE__ */ jsx6("strong", { style: { display: "block", fontSize: 14 }, children: event.title }),
|
|
2325
|
+
event.detail ? /* @__PURE__ */ jsx6("span", { style: { display: "block", marginTop: 2, color: "#64748b", fontSize: 13 }, children: event.detail }) : null,
|
|
2326
|
+
event.at ? /* @__PURE__ */ jsx6("time", { style: { display: "block", marginTop: 3, color: "#94a3b8", fontSize: 12 }, children: event.at }) : null
|
|
2327
|
+
] }, event.id)) }) });
|
|
2130
2328
|
}
|
|
2131
2329
|
function TrackingOrderItemImage({ src, title }) {
|
|
2132
|
-
const [failed, setFailed] =
|
|
2330
|
+
const [failed, setFailed] = useState4(false);
|
|
2133
2331
|
const imageUrl = safeTrackingPageUrl(src);
|
|
2134
|
-
if (!imageUrl || failed) return /* @__PURE__ */
|
|
2135
|
-
return /* @__PURE__ */
|
|
2332
|
+
if (!imageUrl || failed) return /* @__PURE__ */ jsx6("span", { "aria-label": title + " image unavailable", style: { display: "grid", width: 56, height: 56, placeItems: "center", borderRadius: 6, background: "#e2e8f0", color: "#64748b", fontSize: 13 }, children: title.slice(0, 1).toUpperCase() });
|
|
2333
|
+
return /* @__PURE__ */ jsx6("img", { src: imageUrl, alt: "", onError: () => setFailed(true), style: { width: 56, height: 56, borderRadius: 6, objectFit: "cover", background: "#f1f5f9" } });
|
|
2136
2334
|
}
|
|
2137
2335
|
function TrackingOrderItems({ items }) {
|
|
2138
|
-
if (!items.length) return null;
|
|
2139
2336
|
return /* @__PURE__ */ jsxs5("section", { "aria-label": "Order items", style: { marginTop: 24, borderTop: "1px solid #e2e8f0", paddingTop: 18 }, children: [
|
|
2140
|
-
/* @__PURE__ */
|
|
2141
|
-
/* @__PURE__ */
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
/* @__PURE__ */ jsxs5("
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
/* @__PURE__ */
|
|
2151
|
-
|
|
2152
|
-
|
|
2337
|
+
/* @__PURE__ */ jsx6("h2", { style: { margin: 0, fontSize: 16 }, children: "Items in your order" }),
|
|
2338
|
+
/* @__PURE__ */ jsxs5("div", { style: { display: "grid", gap: 12, marginTop: 12 }, children: [
|
|
2339
|
+
!items.length ? /* @__PURE__ */ jsx6("p", { style: { margin: 0, color: "#64748b", fontSize: 14 }, children: "Package contents are not available for this shipment." }) : null,
|
|
2340
|
+
items.map((item) => {
|
|
2341
|
+
const price = item.price ? formatTrackingPageMoney(item.price) : void 0;
|
|
2342
|
+
const href = safeTrackingPageUrl(item.href);
|
|
2343
|
+
return /* @__PURE__ */ jsxs5("article", { style: { display: "grid", gridTemplateColumns: "56px minmax(0, 1fr)", gap: 12, alignItems: "center" }, children: [
|
|
2344
|
+
/* @__PURE__ */ jsx6(TrackingOrderItemImage, { src: item.imageUrl, title: item.title }),
|
|
2345
|
+
/* @__PURE__ */ jsxs5("div", { style: { minWidth: 0, overflowWrap: "anywhere" }, children: [
|
|
2346
|
+
href ? /* @__PURE__ */ jsx6("a", { href, style: { color: "inherit", fontWeight: 700, overflowWrap: "anywhere" }, children: item.title }) : /* @__PURE__ */ jsx6("strong", { style: { overflowWrap: "anywhere" }, children: item.title }),
|
|
2347
|
+
item.description ? /* @__PURE__ */ jsx6("p", { style: { margin: "3px 0 0", color: "#64748b", fontSize: 13 }, children: item.description }) : null,
|
|
2348
|
+
/* @__PURE__ */ jsxs5("p", { style: { display: "flex", flexWrap: "wrap", gap: 8, margin: "4px 0 0", color: "#475569", fontSize: 13 }, children: [
|
|
2349
|
+
/* @__PURE__ */ jsxs5("span", { children: [
|
|
2350
|
+
"Qty ",
|
|
2351
|
+
item.quantity
|
|
2352
|
+
] }),
|
|
2353
|
+
price?.amount ? /* @__PURE__ */ jsxs5("span", { children: [
|
|
2354
|
+
price.amount,
|
|
2355
|
+
price.startsAt ? " and up" : ""
|
|
2356
|
+
] }) : null,
|
|
2357
|
+
price?.compareAt ? /* @__PURE__ */ jsx6("s", { style: { color: "#94a3b8" }, children: price.compareAt }) : null
|
|
2153
2358
|
] }),
|
|
2154
|
-
|
|
2155
|
-
price.amount,
|
|
2156
|
-
price.startsAt ? " and up" : ""
|
|
2157
|
-
] }) : null,
|
|
2158
|
-
price?.compareAt ? /* @__PURE__ */ jsx5("s", { style: { color: "#94a3b8" }, children: price.compareAt }) : null
|
|
2359
|
+
href ? /* @__PURE__ */ jsx6("a", { href, style: { display: "inline-flex", alignItems: "center", minHeight: 32, marginTop: 6, padding: "6px 12px", border: "1px solid #cbd5e1", borderRadius: 6, color: "inherit", fontSize: 13 }, children: "Reorder" }) : null
|
|
2159
2360
|
] })
|
|
2160
|
-
] })
|
|
2161
|
-
|
|
2162
|
-
|
|
2361
|
+
] }, item.id);
|
|
2362
|
+
})
|
|
2363
|
+
] })
|
|
2163
2364
|
] });
|
|
2164
2365
|
}
|
|
2165
|
-
function TrackingQueryResultDetails({ result, onTrackAnother, trackAnotherLabel = "Track another" }) {
|
|
2166
|
-
const [copied, setCopied] =
|
|
2167
|
-
const
|
|
2366
|
+
function TrackingQueryResultDetails({ result, onTrackAnother, trackAnotherLabel = "Track another", showShipments = true }) {
|
|
2367
|
+
const [copied, setCopied] = useState4(false);
|
|
2368
|
+
const runtime = useTrackingRuntime();
|
|
2369
|
+
const visibility = trackingBlockState(runtime);
|
|
2370
|
+
const progress = trackingSteps(result);
|
|
2371
|
+
const { identity, shipmentValues } = trackingSelection(result, runtime.recentQueries);
|
|
2168
2372
|
const copyTrackingNumber = () => {
|
|
2169
2373
|
if (typeof navigator !== "undefined" && navigator.clipboard?.writeText) {
|
|
2170
2374
|
void navigator.clipboard.writeText(result.trackingNumber).then(() => setCopied(true)).catch(() => void 0);
|
|
2171
2375
|
}
|
|
2172
2376
|
};
|
|
2173
2377
|
return /* @__PURE__ */ jsxs5("section", { "aria-label": "Tracking result details", style: { minWidth: 0, overflowWrap: "anywhere" }, children: [
|
|
2378
|
+
identity.values.length > 1 ? /* @__PURE__ */ jsx6(TrackPageOrderBadges, { values: identity.values, selectedIndex: runtime.selectedRecentIndex, onSelect: runtime.selectRecentQuery, style: { marginBottom: 16 } }) : identity.values[0] ? /* @__PURE__ */ jsx6("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ jsx6(TrackPageQueryNumber, { mode: identity.mode, value: identity.values[0] }) }) : null,
|
|
2379
|
+
showShipments && shipmentValues.length > 1 ? /* @__PURE__ */ jsx6(TrackPageOrderBadges, { values: shipmentValues, selectedIndex: runtime.selectedShipmentIndex, onSelect: runtime.selectShipment, style: { marginBottom: 16 } }) : null,
|
|
2174
2380
|
/* @__PURE__ */ jsxs5("div", { style: { display: "flex", flexWrap: "wrap", alignItems: "start", justifyContent: "space-between", gap: 12 }, children: [
|
|
2175
2381
|
/* @__PURE__ */ jsxs5("div", { style: { minWidth: 0, flex: "1 1 180px" }, children: [
|
|
2176
2382
|
/* @__PURE__ */ jsxs5("strong", { style: { fontSize: 17 }, children: [
|
|
2177
2383
|
"Your order is ",
|
|
2178
2384
|
result.status || "being updated"
|
|
2179
2385
|
] }),
|
|
2180
|
-
result.estimatedDelivery ? /* @__PURE__ */ jsxs5("p", { style: { margin: "5px 0 0", color: "#475569", fontSize: 14 }, children: [
|
|
2386
|
+
visibility.showEstimatedDelivery && result.estimatedDelivery ? /* @__PURE__ */ jsxs5("p", { style: { margin: "5px 0 0", color: "#475569", fontSize: 14 }, children: [
|
|
2181
2387
|
"Estimated delivery: ",
|
|
2182
2388
|
result.estimatedDelivery
|
|
2183
2389
|
] }) : null
|
|
2184
2390
|
] }),
|
|
2185
|
-
onTrackAnother ? /* @__PURE__ */
|
|
2391
|
+
onTrackAnother ? /* @__PURE__ */ jsx6("button", { type: "button", onClick: onTrackAnother, style: { minWidth: 44, minHeight: 44, flex: "0 0 auto", padding: "6px 10px", border: "1px solid #cbd5e1", borderRadius: 6, background: "#fff", color: "#0f172a", font: "inherit", fontSize: 12, cursor: "pointer" }, children: trackAnotherLabel }) : null
|
|
2186
2392
|
] }),
|
|
2187
|
-
/* @__PURE__ */
|
|
2393
|
+
/* @__PURE__ */ jsx6(TrackingProgressDetails, { steps: progress }),
|
|
2188
2394
|
/* @__PURE__ */ jsxs5("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 140px), 1fr))", gap: 10, marginTop: 22, padding: 12, borderRadius: 8, background: "#f8fafc", color: "#334155", fontSize: 13 }, children: [
|
|
2189
2395
|
/* @__PURE__ */ jsxs5("span", { style: { minWidth: 0, overflowWrap: "anywhere" }, children: [
|
|
2190
|
-
/* @__PURE__ */
|
|
2191
|
-
/* @__PURE__ */
|
|
2192
|
-
result.carrier
|
|
2396
|
+
/* @__PURE__ */ jsx6("strong", { children: "Carrier" }),
|
|
2397
|
+
/* @__PURE__ */ jsx6("br", {}),
|
|
2398
|
+
result.carrier ?? "Not available"
|
|
2193
2399
|
] }),
|
|
2194
2400
|
/* @__PURE__ */ jsxs5("span", { style: { minWidth: 0, overflowWrap: "anywhere" }, children: [
|
|
2195
|
-
/* @__PURE__ */
|
|
2196
|
-
/* @__PURE__ */
|
|
2197
|
-
/* @__PURE__ */
|
|
2401
|
+
/* @__PURE__ */ jsx6("strong", { children: "Tracking number" }),
|
|
2402
|
+
/* @__PURE__ */ jsx6("br", {}),
|
|
2403
|
+
/* @__PURE__ */ jsx6("span", { children: result.trackingNumber }),
|
|
2198
2404
|
" ",
|
|
2199
|
-
/* @__PURE__ */
|
|
2405
|
+
/* @__PURE__ */ jsx6("button", { type: "button", onClick: copyTrackingNumber, style: { minWidth: 44, minHeight: 44, border: 0, background: "transparent", color: "#0f172a", font: "inherit", fontSize: 12, fontWeight: 700, cursor: "pointer" }, children: copied ? "Copied" : "Copy" })
|
|
2200
2406
|
] }),
|
|
2201
2407
|
/* @__PURE__ */ jsxs5("span", { style: { minWidth: 0, overflowWrap: "anywhere" }, children: [
|
|
2202
|
-
/* @__PURE__ */
|
|
2203
|
-
/* @__PURE__ */
|
|
2204
|
-
result.destination
|
|
2408
|
+
/* @__PURE__ */ jsx6("strong", { children: "Destination" }),
|
|
2409
|
+
/* @__PURE__ */ jsx6("br", {}),
|
|
2410
|
+
result.destination ?? "Destination details are not available."
|
|
2205
2411
|
] }),
|
|
2206
2412
|
/* @__PURE__ */ jsxs5("span", { style: { minWidth: 0, overflowWrap: "anywhere" }, children: [
|
|
2207
|
-
/* @__PURE__ */
|
|
2208
|
-
/* @__PURE__ */
|
|
2413
|
+
/* @__PURE__ */ jsx6("strong", { children: "Transit time" }),
|
|
2414
|
+
/* @__PURE__ */ jsx6("br", {}),
|
|
2209
2415
|
result.transitDuration || "\u2014"
|
|
2210
2416
|
] }),
|
|
2211
2417
|
result.orderNumber ? /* @__PURE__ */ jsxs5("span", { style: { minWidth: 0, overflowWrap: "anywhere" }, children: [
|
|
2212
|
-
/* @__PURE__ */
|
|
2213
|
-
/* @__PURE__ */
|
|
2418
|
+
/* @__PURE__ */ jsx6("strong", { children: "Order number" }),
|
|
2419
|
+
/* @__PURE__ */ jsx6("br", {}),
|
|
2214
2420
|
result.orderNumber
|
|
2215
2421
|
] }) : null
|
|
2216
2422
|
] }),
|
|
2217
2423
|
/* @__PURE__ */ jsxs5("section", { "aria-label": "Tracking timeline", style: { marginTop: 24, borderTop: "1px solid #e2e8f0", paddingTop: 18 }, children: [
|
|
2218
|
-
/* @__PURE__ */
|
|
2219
|
-
/* @__PURE__ */
|
|
2424
|
+
/* @__PURE__ */ jsx6("h2", { style: { margin: 0, fontSize: 16 }, children: "Tracking timeline" }),
|
|
2425
|
+
/* @__PURE__ */ jsx6(TrackingEvents, { result })
|
|
2220
2426
|
] }),
|
|
2221
|
-
/* @__PURE__ */
|
|
2427
|
+
/* @__PURE__ */ jsx6(TrackingPageAdSlot, { ad: result.ad }),
|
|
2428
|
+
/* @__PURE__ */ jsx6(TrackingOrderItems, { items: result.orderItems ?? [] })
|
|
2222
2429
|
] });
|
|
2223
2430
|
}
|
|
2224
2431
|
|
|
2225
2432
|
// src/branded.tsx
|
|
2226
|
-
import { jsx as
|
|
2227
|
-
var
|
|
2228
|
-
|
|
2229
|
-
selectedShipmentId: null,
|
|
2230
|
-
async query() {
|
|
2231
|
-
return void 0;
|
|
2232
|
-
},
|
|
2233
|
-
reset() {
|
|
2234
|
-
return void 0;
|
|
2235
|
-
},
|
|
2236
|
-
selectShipment() {
|
|
2237
|
-
return void 0;
|
|
2238
|
-
}
|
|
2239
|
-
};
|
|
2240
|
-
var BrandedRuntimeContext = createContext2(initialRuntime2);
|
|
2433
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2434
|
+
var BrandedRuntimeProvider = TrackingRuntimeProvider;
|
|
2435
|
+
var useBrandedRuntime = useTrackingRuntime;
|
|
2241
2436
|
var contentWidth2 = { width: "min(1200px, 100%)", margin: "0 auto", padding: "0 clamp(16px, 4vw, 48px)", boxSizing: "border-box" };
|
|
2242
2437
|
var cardStyle = { background: "#fff", color: "#0a0a0a", border: "1px solid #e7e7e7", borderRadius: 10, fontFamily: "var(--pb-font-family)" };
|
|
2243
|
-
function BrandedRuntimeProvider({ children, query: injectedQuery, watermark }) {
|
|
2244
|
-
const [state, setState] = useState4({ phase: "idle" });
|
|
2245
|
-
const [selectedShipmentId, setSelectedShipmentId] = useState4(null);
|
|
2246
|
-
const requestId = useRef3(0);
|
|
2247
|
-
const query = useCallback3(async (request) => {
|
|
2248
|
-
const currentRequestId = ++requestId.current;
|
|
2249
|
-
setState({ phase: "loading" });
|
|
2250
|
-
try {
|
|
2251
|
-
if (!injectedQuery) throw new Error("tracking-query-not-configured");
|
|
2252
|
-
const result = await injectedQuery(request);
|
|
2253
|
-
if (currentRequestId !== requestId.current) return;
|
|
2254
|
-
setSelectedShipmentId(result.shipments?.[0]?.id ?? null);
|
|
2255
|
-
setState({ phase: isEmptyTrackingPageResult(result) ? "empty" : "success", result });
|
|
2256
|
-
} catch {
|
|
2257
|
-
if (currentRequestId !== requestId.current) return;
|
|
2258
|
-
setState({ phase: "error", error: "tracking-query-failed" });
|
|
2259
|
-
}
|
|
2260
|
-
}, [injectedQuery]);
|
|
2261
|
-
const reset = useCallback3(() => {
|
|
2262
|
-
requestId.current += 1;
|
|
2263
|
-
setSelectedShipmentId(null);
|
|
2264
|
-
setState({ phase: "idle" });
|
|
2265
|
-
}, []);
|
|
2266
|
-
const displayedResult = useMemo3(() => {
|
|
2267
|
-
if (!state.result) return void 0;
|
|
2268
|
-
const shipment = state.result.shipments?.find((item) => item.id === selectedShipmentId);
|
|
2269
|
-
return shipment ? { ...state.result, ...shipment } : state.result;
|
|
2270
|
-
}, [selectedShipmentId, state.result]);
|
|
2271
|
-
const selectShipment = useCallback3((id) => {
|
|
2272
|
-
if (state.result?.shipments?.some((shipment) => shipment.id === id)) setSelectedShipmentId(id);
|
|
2273
|
-
}, [state.result]);
|
|
2274
|
-
const value = useMemo3(
|
|
2275
|
-
() => ({ ...state, displayedResult, selectedShipmentId, query, reset, selectShipment, watermark }),
|
|
2276
|
-
[displayedResult, query, reset, selectedShipmentId, selectShipment, state, watermark]
|
|
2277
|
-
);
|
|
2278
|
-
return /* @__PURE__ */ jsx6(BrandedRuntimeContext.Provider, { value, children });
|
|
2279
|
-
}
|
|
2280
|
-
function useBrandedRuntime() {
|
|
2281
|
-
return useContext2(BrandedRuntimeContext);
|
|
2282
|
-
}
|
|
2283
2438
|
function RuntimeWatermark2({ watermark }) {
|
|
2284
|
-
return watermark?.visible ? /* @__PURE__ */
|
|
2439
|
+
return watermark?.visible ? /* @__PURE__ */ jsx7("small", { style: { display: "block", marginTop: 10, color: "#8a8a8a", fontSize: 8, textAlign: "right" }, children: watermark.label || "Powered by BestTrack" }) : null;
|
|
2285
2440
|
}
|
|
2286
2441
|
function text3(props, key, fallback) {
|
|
2287
2442
|
return typeof props[key] === "string" ? props[key] : fallback;
|
|
@@ -2292,31 +2447,31 @@ function shipmentLabels(value) {
|
|
|
2292
2447
|
return typeof value === "string" ? value.split("|").map((label, index) => ({ id: "configured-" + index, label: label.trim() })).filter((item) => item.label) : [];
|
|
2293
2448
|
}
|
|
2294
2449
|
function ProductImage2({ src, alt }) {
|
|
2295
|
-
const [failed, setFailed] =
|
|
2450
|
+
const [failed, setFailed] = useState5(false);
|
|
2296
2451
|
const safeSrc = safeImageUrl2(src);
|
|
2297
2452
|
if (!safeSrc || failed) {
|
|
2298
|
-
return /* @__PURE__ */
|
|
2453
|
+
return /* @__PURE__ */ jsx7("span", { "aria-label": alt + " image unavailable", style: { display: "grid", placeItems: "center", width: 72, height: 72, flex: "0 0 auto", borderRadius: 6, background: "#f2f2f2", color: "#6b6b6b", fontSize: 14 }, children: alt.slice(0, 1).toUpperCase() });
|
|
2299
2454
|
}
|
|
2300
|
-
return /* @__PURE__ */
|
|
2455
|
+
return /* @__PURE__ */ jsx7("img", { src: safeSrc, alt, onError: () => setFailed(true), style: { width: 72, height: 72, flex: "0 0 auto", borderRadius: 6, objectFit: "cover", background: "#f2f2f2" } });
|
|
2301
2456
|
}
|
|
2302
|
-
function ShipmentSwitcher(
|
|
2457
|
+
function ShipmentSwitcher() {
|
|
2303
2458
|
const runtime = useBrandedRuntime();
|
|
2304
|
-
const
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
return /* @__PURE__ */
|
|
2308
|
-
const selected =
|
|
2309
|
-
return /* @__PURE__ */
|
|
2459
|
+
const shipments = trackingBlockState(runtime).showResult ? runtime.result?.shipments ?? [] : [];
|
|
2460
|
+
if (shipments.length < 2 || !runtime.result) return null;
|
|
2461
|
+
const { shipmentValues } = trackingSelection(runtime.result, runtime.recentQueries);
|
|
2462
|
+
return /* @__PURE__ */ jsx7("div", { "aria-label": "Shipment switcher", style: { ...contentWidth2, minWidth: 0, minHeight: 56, display: "flex", alignItems: "center", gap: 8, overflowX: "auto", whiteSpace: "nowrap" }, children: shipments.map((shipment, index) => {
|
|
2463
|
+
const selected = runtime.selectedShipmentIndex === index;
|
|
2464
|
+
return /* @__PURE__ */ jsx7("button", { type: "button", onClick: () => runtime.selectShipment(index), "aria-pressed": selected, style: { minWidth: 92, minHeight: 44, padding: "0 12px", border: selected ? "1px solid #1a1a1a" : "1px solid #e7e7e7", borderRadius: 4, background: "#fff", color: "#0a0a0a", fontSize: 11, fontWeight: selected ? 700 : 400, cursor: "pointer" }, children: shipmentValues[index] }, shipment.id);
|
|
2310
2465
|
}) });
|
|
2311
2466
|
}
|
|
2312
2467
|
function QueryHero(props) {
|
|
2313
2468
|
const runtime = useBrandedRuntime();
|
|
2314
|
-
const [heroImageFailed, setHeroImageFailed] =
|
|
2315
|
-
const result = runtime.
|
|
2469
|
+
const [heroImageFailed, setHeroImageFailed] = useState5(false);
|
|
2470
|
+
const result = runtime.result;
|
|
2316
2471
|
return /* @__PURE__ */ jsxs6("div", { style: { position: "relative", minWidth: 0, minHeight: "clamp(520px, 44vw, 560px)", display: "grid", overflow: "hidden", background: "linear-gradient(135deg, #dedbd4, #b9b3aa)" }, children: [
|
|
2317
|
-
!heroImageFailed && safeImageUrl2(props.heroImageUrl) ? /* @__PURE__ */
|
|
2318
|
-
/* @__PURE__ */
|
|
2319
|
-
/* @__PURE__ */
|
|
2472
|
+
!heroImageFailed && safeImageUrl2(props.heroImageUrl) ? /* @__PURE__ */ jsx7("img", { src: safeImageUrl2(props.heroImageUrl), alt: "", onError: () => setHeroImageFailed(true), style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: "cover" } }) : null,
|
|
2473
|
+
/* @__PURE__ */ jsx7("div", { "aria-hidden": "true", style: { position: "absolute", inset: 0, background: "rgba(255,255,255,0.12)" } }),
|
|
2474
|
+
/* @__PURE__ */ jsx7("div", { style: { ...contentWidth2, position: "relative", zIndex: 1, display: "grid", alignItems: "center", width: "100%", minWidth: 0, paddingTop: "clamp(24px, 5vw, 48px)", paddingBottom: "clamp(24px, 5vw, 48px)" }, children: /* @__PURE__ */ jsx7(
|
|
2320
2475
|
TrackingQueryCard,
|
|
2321
2476
|
{
|
|
2322
2477
|
phase: runtime.phase,
|
|
@@ -2340,34 +2495,38 @@ function QueryHero(props) {
|
|
|
2340
2495
|
formStyle: { gap: 12 },
|
|
2341
2496
|
inputStyle: { width: "100%", height: 48, padding: "0 16px", boxSizing: "border-box", border: "1px solid #e2e2e2", borderRadius: 10, font: "inherit" },
|
|
2342
2497
|
submitStyle: (loading) => ({ width: "100%", minHeight: 48, marginTop: 12, border: 0, borderRadius: 10, background: loading ? "#6b6b6b" : "#000", color: "#fff", font: "inherit", cursor: loading ? "wait" : "pointer" }),
|
|
2343
|
-
result: result ? /* @__PURE__ */
|
|
2498
|
+
result: result ? /* @__PURE__ */ jsx7(TrackingQueryResultDetails, { showShipments: false, result, onTrackAnother: runtime.reset, trackAnotherLabel: text3(props, "trackAnotherLabel", "Track another order") }) : null,
|
|
2344
2499
|
resultStyle: { padding: 16, border: "1px solid #e7e7e7", borderRadius: 8, background: "#fffdf0" },
|
|
2345
|
-
watermark: /* @__PURE__ */
|
|
2500
|
+
watermark: /* @__PURE__ */ jsx7(RuntimeWatermark2, { watermark: runtime.watermark })
|
|
2346
2501
|
}
|
|
2347
2502
|
) })
|
|
2348
2503
|
] });
|
|
2349
2504
|
}
|
|
2350
2505
|
function PackageContents2({ items }) {
|
|
2351
|
-
if (!items?.length) return /* @__PURE__ */
|
|
2352
|
-
return /* @__PURE__ */
|
|
2353
|
-
|
|
2354
|
-
/* @__PURE__ */ jsxs6("
|
|
2355
|
-
/* @__PURE__ */
|
|
2356
|
-
/* @__PURE__ */
|
|
2357
|
-
|
|
2358
|
-
"
|
|
2359
|
-
|
|
2506
|
+
if (!items?.length) return /* @__PURE__ */ jsx7("p", { style: { margin: 0, color: "#6b6b6b" }, children: "Package contents are not available for this shipment." });
|
|
2507
|
+
return /* @__PURE__ */ jsx7("div", { style: { display: "grid", gap: 16 }, children: items.map((item) => {
|
|
2508
|
+
const href = safeHref2(item.href);
|
|
2509
|
+
return /* @__PURE__ */ jsxs6("article", { style: { display: "flex", alignItems: "flex-start", gap: 14, minWidth: 0 }, children: [
|
|
2510
|
+
/* @__PURE__ */ jsx7(ProductImage2, { src: item.imageUrl, alt: item.title }),
|
|
2511
|
+
/* @__PURE__ */ jsxs6("div", { style: { minWidth: 0, overflowWrap: "anywhere" }, children: [
|
|
2512
|
+
/* @__PURE__ */ jsx7("strong", { children: item.title }),
|
|
2513
|
+
item.description ? /* @__PURE__ */ jsx7("p", { style: { margin: "5px 0", color: "#6b6b6b", fontSize: 14 }, children: item.description }) : null,
|
|
2514
|
+
/* @__PURE__ */ jsxs6("small", { style: { color: "#6b6b6b" }, children: [
|
|
2515
|
+
"Qty ",
|
|
2516
|
+
item.quantity
|
|
2517
|
+
] }),
|
|
2518
|
+
href ? /* @__PURE__ */ jsx7("a", { href, style: { display: "inline-flex", alignItems: "center", minHeight: 32, marginLeft: 8, padding: "6px 12px", border: "1px solid #e7e7e7", borderRadius: 6, color: "inherit", fontSize: 13 }, children: "Reorder" }) : null
|
|
2360
2519
|
] })
|
|
2361
|
-
] })
|
|
2362
|
-
|
|
2520
|
+
] }, item.id);
|
|
2521
|
+
}) });
|
|
2363
2522
|
}
|
|
2364
2523
|
function BrandedTextField({ value, onChange }) {
|
|
2365
|
-
return /* @__PURE__ */
|
|
2524
|
+
return /* @__PURE__ */ jsx7("input", { "aria-label": "Branded text", value: typeof value === "string" ? value : "", onChange: (event) => onChange(event.target.value) });
|
|
2366
2525
|
}
|
|
2367
2526
|
function InlineText2({ block, name, fallback }) {
|
|
2368
2527
|
const value = text3(block, name, fallback);
|
|
2369
|
-
if (!block.selected) return /* @__PURE__ */
|
|
2370
|
-
return /* @__PURE__ */
|
|
2528
|
+
if (!block.selected) return /* @__PURE__ */ jsx7("span", { "data-branded-editor-field": name, children: value });
|
|
2529
|
+
return /* @__PURE__ */ jsx7(
|
|
2371
2530
|
"input",
|
|
2372
2531
|
{
|
|
2373
2532
|
"aria-label": "Canvas " + name,
|
|
@@ -2397,22 +2556,22 @@ function InlineText2({ block, name, fallback }) {
|
|
|
2397
2556
|
);
|
|
2398
2557
|
}
|
|
2399
2558
|
function EditorSurface({ block, children }) {
|
|
2400
|
-
return /* @__PURE__ */
|
|
2559
|
+
return /* @__PURE__ */ jsx7("section", { "aria-label": "Branded editor preview", style: { ...cardStyle, outline: block.selected ? "2px solid #2563eb" : "1px dashed #cbd5e1", outlineOffset: -2, padding: 24 }, children });
|
|
2401
2560
|
}
|
|
2402
2561
|
function BrandedAnnouncementEditor(block) {
|
|
2403
|
-
return /* @__PURE__ */
|
|
2562
|
+
return /* @__PURE__ */ jsx7("section", { "aria-label": "Branded announcement editor", style: { minHeight: 36, display: "grid", placeItems: "center", padding: "0 16px", background: "#252525", color: "#fff", fontFamily: "var(--pb-font-family)", fontSize: 12, textAlign: "center" }, children: /* @__PURE__ */ jsx7(InlineText2, { block, name: "message", fallback: "Check out our summer sale" }) });
|
|
2404
2563
|
}
|
|
2405
2564
|
function BrandedTrackingExperienceEditor(block) {
|
|
2406
2565
|
const labels = shipmentLabels(block.shipmentLabels);
|
|
2407
2566
|
return /* @__PURE__ */ jsxs6("section", { "aria-label": "Branded tracking experience editor", style: { background: "#fffdf0", fontFamily: "var(--pb-font-family)" }, children: [
|
|
2408
|
-
/* @__PURE__ */
|
|
2409
|
-
/* @__PURE__ */
|
|
2410
|
-
/* @__PURE__ */
|
|
2567
|
+
/* @__PURE__ */ jsx7("div", { style: { ...contentWidth2, minHeight: 56, display: "flex", alignItems: "center", gap: 8, overflowX: "auto" }, children: labels.map((shipment, index) => /* @__PURE__ */ jsx7("span", { style: { minWidth: 92, padding: "9px 12px", border: index === 0 ? "1px solid #1a1a1a" : "1px solid #e7e7e7", borderRadius: 4, background: "#fff", fontSize: 11, fontWeight: index === 0 ? 700 : 400 }, children: shipment.label }, shipment.id)) }),
|
|
2568
|
+
/* @__PURE__ */ jsx7("div", { style: { minHeight: 360, display: "grid", placeItems: "center", padding: 16, background: "linear-gradient(135deg, #dedbd4, #b9b3aa)" }, children: /* @__PURE__ */ jsxs6(EditorSurface, { block, children: [
|
|
2569
|
+
/* @__PURE__ */ jsx7("h1", { style: { margin: "0 0 28px", textAlign: "center", fontSize: 32 }, children: /* @__PURE__ */ jsx7(InlineText2, { block, name: "heading", fallback: "Track your order" }) }),
|
|
2411
2570
|
/* @__PURE__ */ jsxs6("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", borderBottom: "1px solid #e7e7e7", marginBottom: 20, textAlign: "center" }, children: [
|
|
2412
|
-
/* @__PURE__ */
|
|
2413
|
-
/* @__PURE__ */
|
|
2571
|
+
/* @__PURE__ */ jsx7("span", { style: { padding: 10 }, children: /* @__PURE__ */ jsx7(InlineText2, { block, name: "orderTabLabel", fallback: "Order Number" }) }),
|
|
2572
|
+
/* @__PURE__ */ jsx7("strong", { style: { padding: 10, borderBottom: "2px solid #0a0a0a" }, children: /* @__PURE__ */ jsx7(InlineText2, { block, name: "trackingTabLabel", fallback: "Tracking Number" }) })
|
|
2414
2573
|
] }),
|
|
2415
|
-
/* @__PURE__ */
|
|
2574
|
+
/* @__PURE__ */ jsx7("input", { "aria-label": "Canvas default tracking number", readOnly: !block.selected, value: text3(block, "defaultTrackingNumber", "DEMO-YQTRACK9999"), onMouseDown: (event) => block.selected && event.stopPropagation(), onClick: (event) => block.selected && event.stopPropagation(), onChange: (event) => block.onPropsChange({ defaultTrackingNumber: event.currentTarget.value }), style: {
|
|
2416
2575
|
width: "100%",
|
|
2417
2576
|
height: 44,
|
|
2418
2577
|
boxSizing: "border-box",
|
|
@@ -2423,42 +2582,42 @@ function BrandedTrackingExperienceEditor(block) {
|
|
|
2423
2582
|
background: "#fff",
|
|
2424
2583
|
font: "inherit"
|
|
2425
2584
|
} }),
|
|
2426
|
-
/* @__PURE__ */
|
|
2427
|
-
/* @__PURE__ */
|
|
2585
|
+
/* @__PURE__ */ jsx7("div", { style: { display: "grid", placeItems: "center", minHeight: 46, marginTop: 16, borderRadius: 10, background: "#000", color: "#fff", fontWeight: 700 }, children: /* @__PURE__ */ jsx7(InlineText2, { block, name: "submitLabel", fallback: "Track" }) }),
|
|
2586
|
+
/* @__PURE__ */ jsx7("small", { style: { display: "block", marginTop: 10, color: "#8a8a8a", fontSize: 9, textAlign: "right" }, children: "Powered by BestTrack" })
|
|
2428
2587
|
] }) })
|
|
2429
2588
|
] });
|
|
2430
2589
|
}
|
|
2431
2590
|
function BrandedQueryEditor(block) {
|
|
2432
|
-
return /* @__PURE__ */
|
|
2591
|
+
return /* @__PURE__ */ jsx7(BrandedTrackingExperienceEditor, { ...block });
|
|
2433
2592
|
}
|
|
2434
2593
|
function BrandedOrderItemsEditor(block) {
|
|
2435
2594
|
return /* @__PURE__ */ jsxs6(EditorSurface, { block, children: [
|
|
2436
|
-
/* @__PURE__ */
|
|
2437
|
-
/* @__PURE__ */
|
|
2595
|
+
/* @__PURE__ */ jsx7("h2", { style: { margin: 0 }, children: /* @__PURE__ */ jsx7(InlineText2, { block, name: "heading", fallback: "What's Inside" }) }),
|
|
2596
|
+
/* @__PURE__ */ jsx7("p", { style: { color: "#6b6b6b" }, children: "Package contents appear after a consumer tracking query." })
|
|
2438
2597
|
] });
|
|
2439
2598
|
}
|
|
2440
2599
|
function BrandedRecommendationsEditor(block) {
|
|
2441
2600
|
return /* @__PURE__ */ jsxs6(EditorSurface, { block, children: [
|
|
2442
|
-
/* @__PURE__ */
|
|
2443
|
-
/* @__PURE__ */
|
|
2601
|
+
/* @__PURE__ */ jsx7("h2", { style: { margin: 0, textAlign: "center" }, children: /* @__PURE__ */ jsx7(InlineText2, { block, name: "heading", fallback: "You might also like" }) }),
|
|
2602
|
+
/* @__PURE__ */ jsx7("p", { style: { color: "#6b6b6b", textAlign: "center" }, children: "Recommended products load independently of tracking queries." })
|
|
2444
2603
|
] });
|
|
2445
2604
|
}
|
|
2446
2605
|
function BrandedQuickLinksEditor(block) {
|
|
2447
2606
|
return /* @__PURE__ */ jsxs6(EditorSurface, { block, children: [
|
|
2448
|
-
/* @__PURE__ */
|
|
2607
|
+
/* @__PURE__ */ jsx7("h2", { children: /* @__PURE__ */ jsx7(InlineText2, { block, name: "heading", fallback: "Need help?" }) }),
|
|
2449
2608
|
/* @__PURE__ */ jsxs6("div", { style: { display: "flex", gap: 20 }, children: [
|
|
2450
|
-
/* @__PURE__ */
|
|
2451
|
-
/* @__PURE__ */
|
|
2609
|
+
/* @__PURE__ */ jsx7(InlineText2, { block, name: "primaryLabel", fallback: "Shipping help" }),
|
|
2610
|
+
/* @__PURE__ */ jsx7(InlineText2, { block, name: "secondaryLabel", fallback: "Contact us" })
|
|
2452
2611
|
] })
|
|
2453
2612
|
] });
|
|
2454
2613
|
}
|
|
2455
2614
|
function BrandedBlogEditor(block) {
|
|
2456
2615
|
return /* @__PURE__ */ jsxs6(EditorSurface, { block, children: [
|
|
2457
|
-
/* @__PURE__ */
|
|
2616
|
+
/* @__PURE__ */ jsx7("h2", { children: /* @__PURE__ */ jsx7(InlineText2, { block, name: "heading", fallback: "From our journal" }) }),
|
|
2458
2617
|
/* @__PURE__ */ jsxs6("article", { children: [
|
|
2459
|
-
/* @__PURE__ */
|
|
2460
|
-
/* @__PURE__ */
|
|
2461
|
-
/* @__PURE__ */
|
|
2618
|
+
/* @__PURE__ */ jsx7("strong", { children: /* @__PURE__ */ jsx7(InlineText2, { block, name: "articleTitle", fallback: "Delivery tips for every season" }) }),
|
|
2619
|
+
/* @__PURE__ */ jsx7("p", { children: /* @__PURE__ */ jsx7(InlineText2, { block, name: "excerpt", fallback: "Simple ways to make every delivery feel considered." }) }),
|
|
2620
|
+
/* @__PURE__ */ jsx7(InlineText2, { block, name: "linkLabel", fallback: "Read the story" })
|
|
2462
2621
|
] })
|
|
2463
2622
|
] });
|
|
2464
2623
|
}
|
|
@@ -2466,53 +2625,55 @@ function BrandedAnnouncementBlock(props) {
|
|
|
2466
2625
|
const message = text3(props, "message", "");
|
|
2467
2626
|
const href = safeHref2(props.href);
|
|
2468
2627
|
if (!message) return null;
|
|
2469
|
-
return /* @__PURE__ */
|
|
2628
|
+
return /* @__PURE__ */ jsx7("section", { "aria-label": "Branded announcement", style: { minHeight: 36, display: "grid", placeItems: "center", padding: "0 16px", background: "#252525", color: "#fff", fontFamily: "var(--pb-font-family)", fontSize: 12, textAlign: "center" }, children: href ? /* @__PURE__ */ jsx7("a", { href, style: { color: "inherit", textDecoration: "none" }, children: message }) : message });
|
|
2470
2629
|
}
|
|
2471
2630
|
function BrandedTrackingExperienceBlock(props) {
|
|
2472
2631
|
return /* @__PURE__ */ jsxs6("section", { "aria-label": "Branded tracking experience", style: { background: "#fffdf0", fontFamily: "var(--pb-font-family)" }, children: [
|
|
2473
|
-
/* @__PURE__ */
|
|
2474
|
-
/* @__PURE__ */
|
|
2632
|
+
/* @__PURE__ */ jsx7(ShipmentSwitcher, {}),
|
|
2633
|
+
/* @__PURE__ */ jsx7(QueryHero, { ...props })
|
|
2475
2634
|
] });
|
|
2476
2635
|
}
|
|
2477
2636
|
function BrandedQueryBlock(props) {
|
|
2478
2637
|
return /* @__PURE__ */ jsxs6("section", { "aria-label": "Branded tracking query", style: { background: "#fffdf0", fontFamily: "var(--pb-font-family)" }, children: [
|
|
2479
|
-
/* @__PURE__ */
|
|
2480
|
-
/* @__PURE__ */
|
|
2638
|
+
/* @__PURE__ */ jsx7(ShipmentSwitcher, {}),
|
|
2639
|
+
/* @__PURE__ */ jsx7(QueryHero, { ...props })
|
|
2481
2640
|
] });
|
|
2482
2641
|
}
|
|
2483
2642
|
function BrandedOrderItemsBlock(props) {
|
|
2484
2643
|
const runtime = useBrandedRuntime();
|
|
2485
|
-
const
|
|
2644
|
+
const visibility = trackingBlockState(runtime);
|
|
2645
|
+
if (!visibility.showDelivery) return null;
|
|
2646
|
+
const items = runtime.result?.orderItems ?? [];
|
|
2486
2647
|
const title = text3(props, "heading", "What's Inside");
|
|
2487
|
-
return /* @__PURE__ */
|
|
2648
|
+
return /* @__PURE__ */ jsx7("section", { "aria-label": title, style: { background: "#fffdf0", color: "#0a0a0a", fontFamily: "var(--pb-font-family)", padding: "clamp(28px, 4vw, 48px) 0" }, children: /* @__PURE__ */ jsxs6("div", { style: contentWidth2, children: [
|
|
2488
2649
|
/* @__PURE__ */ jsxs6("h2", { style: { margin: "0 0 20px", fontSize: 20 }, children: [
|
|
2489
2650
|
title,
|
|
2490
|
-
|
|
2651
|
+
visibility.showResult ? " (" + items.length + ")" : ""
|
|
2491
2652
|
] }),
|
|
2492
|
-
|
|
2653
|
+
visibility.showResult ? /* @__PURE__ */ jsx7(PackageContents2, { items }) : /* @__PURE__ */ jsx7("p", { style: { margin: 0, color: "#b42318" }, children: "Order items are temporarily unavailable." })
|
|
2493
2654
|
] }) });
|
|
2494
2655
|
}
|
|
2495
2656
|
function RecommendationCard({ item }) {
|
|
2496
2657
|
const href = safeHref2(item.href);
|
|
2497
|
-
const price =
|
|
2658
|
+
const price = formatRecommendationPrice(item.price);
|
|
2498
2659
|
return /* @__PURE__ */ jsxs6("article", { style: { overflow: "hidden", borderRadius: 6, background: "#fff", boxShadow: "0 1px 2px rgb(0 0 0 / 8%)" }, children: [
|
|
2499
|
-
/* @__PURE__ */
|
|
2660
|
+
/* @__PURE__ */ jsx7(ProductImage2, { src: item.imageUrl, alt: item.title }),
|
|
2500
2661
|
/* @__PURE__ */ jsxs6("div", { style: { padding: 14 }, children: [
|
|
2501
|
-
/* @__PURE__ */
|
|
2502
|
-
price
|
|
2503
|
-
/* @__PURE__ */
|
|
2504
|
-
!href ? /* @__PURE__ */
|
|
2662
|
+
/* @__PURE__ */ jsx7("strong", { children: item.title }),
|
|
2663
|
+
price ? /* @__PURE__ */ jsx7("p", { style: { margin: "6px 0", fontWeight: 700 }, children: price }) : null,
|
|
2664
|
+
/* @__PURE__ */ jsx7("p", { style: { margin: "6px 0", color: "#6b6b6b", fontSize: 13 }, children: item.description }),
|
|
2665
|
+
!href ? /* @__PURE__ */ jsx7("span", { style: { color: "#6b6b6b", fontSize: 13, fontWeight: 700 }, children: "View product" }) : /* @__PURE__ */ jsx7("a", { href, style: { color: "#0a0a0a", fontSize: 13, fontWeight: 700 }, children: "View product" })
|
|
2505
2666
|
] })
|
|
2506
2667
|
] });
|
|
2507
2668
|
}
|
|
2508
2669
|
function BrandedRecommendationsBlock(props) {
|
|
2509
2670
|
const runtime = useBrandedRuntime();
|
|
2510
|
-
const recommendations =
|
|
2671
|
+
const recommendations = recommendationItems(props.products, runtime);
|
|
2511
2672
|
const title = text3(props, "heading", "You might also like");
|
|
2512
|
-
if (
|
|
2513
|
-
return /* @__PURE__ */
|
|
2514
|
-
/* @__PURE__ */
|
|
2515
|
-
|
|
2673
|
+
if (!recommendations.length) return null;
|
|
2674
|
+
return /* @__PURE__ */ jsx7("section", { "aria-label": title, style: { background: "#fffdf0", color: "#0a0a0a", fontFamily: "var(--pb-font-family)", padding: "clamp(28px, 4vw, 48px) 0" }, children: /* @__PURE__ */ jsxs6("div", { style: contentWidth2, children: [
|
|
2675
|
+
/* @__PURE__ */ jsx7("h2", { style: { margin: "0 0 24px", textAlign: "center", fontSize: 20 }, children: title }),
|
|
2676
|
+
/* @__PURE__ */ jsx7("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(220px, 1fr))", gap: 16 }, children: recommendations.map((item) => /* @__PURE__ */ jsx7(RecommendationCard, { item }, item.id)) })
|
|
2516
2677
|
] }) });
|
|
2517
2678
|
}
|
|
2518
2679
|
function BrandedQuickLinksBlock(props) {
|
|
@@ -2520,10 +2681,10 @@ function BrandedQuickLinksBlock(props) {
|
|
|
2520
2681
|
const primaryHref = safeHref2(props.primaryHref);
|
|
2521
2682
|
const secondaryHref = safeHref2(props.secondaryHref);
|
|
2522
2683
|
return /* @__PURE__ */ jsxs6("section", { "aria-label": title, style: { ...cardStyle, margin: "24px auto", maxWidth: 1200, padding: 24 }, children: [
|
|
2523
|
-
/* @__PURE__ */
|
|
2684
|
+
/* @__PURE__ */ jsx7("h2", { children: title }),
|
|
2524
2685
|
/* @__PURE__ */ jsxs6("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(180px, 1fr))", gap: 16 }, children: [
|
|
2525
|
-
primaryHref ? /* @__PURE__ */
|
|
2526
|
-
secondaryHref ? /* @__PURE__ */
|
|
2686
|
+
primaryHref ? /* @__PURE__ */ jsx7("a", { href: primaryHref, style: { color: "#0a0a0a" }, children: text3(props, "primaryLabel", "Shipping help") }) : /* @__PURE__ */ jsx7("span", { children: text3(props, "primaryLabel", "Shipping help") }),
|
|
2687
|
+
secondaryHref ? /* @__PURE__ */ jsx7("a", { href: secondaryHref, style: { color: "#0a0a0a" }, children: text3(props, "secondaryLabel", "Contact us") }) : /* @__PURE__ */ jsx7("span", { children: text3(props, "secondaryLabel", "Contact us") })
|
|
2527
2688
|
] })
|
|
2528
2689
|
] });
|
|
2529
2690
|
}
|
|
@@ -2531,11 +2692,11 @@ function BrandedBlogBlock(props) {
|
|
|
2531
2692
|
const title = text3(props, "heading", "From our journal");
|
|
2532
2693
|
const href = safeHref2(props.articleHref);
|
|
2533
2694
|
return /* @__PURE__ */ jsxs6("section", { "aria-label": title, style: { ...cardStyle, margin: "24px auto", maxWidth: 1200, padding: 24 }, children: [
|
|
2534
|
-
/* @__PURE__ */
|
|
2695
|
+
/* @__PURE__ */ jsx7("h2", { children: title }),
|
|
2535
2696
|
/* @__PURE__ */ jsxs6("article", { children: [
|
|
2536
|
-
/* @__PURE__ */
|
|
2537
|
-
/* @__PURE__ */
|
|
2538
|
-
href ? /* @__PURE__ */
|
|
2697
|
+
/* @__PURE__ */ jsx7("strong", { children: text3(props, "articleTitle", "Delivery tips for every season") }),
|
|
2698
|
+
/* @__PURE__ */ jsx7("p", { children: text3(props, "excerpt", "Simple ways to make every delivery feel considered.") }),
|
|
2699
|
+
href ? /* @__PURE__ */ jsx7("a", { href, style: { color: "#0a0a0a" }, children: text3(props, "linkLabel", "Read the story") }) : /* @__PURE__ */ jsx7("span", { children: text3(props, "linkLabel", "Read the story") })
|
|
2539
2700
|
] })
|
|
2540
2701
|
] });
|
|
2541
2702
|
}
|
|
@@ -2551,16 +2712,18 @@ var brandedBlocks = withTemplatePolicy2([
|
|
|
2551
2712
|
{ type: "besttrack.branded.tracking-experience", version: 1, label: "Tracking experience", category: "BestTrack Branded", targets: ["web"], defaultProps: { heading: "Track your order", submitLabel: "Track", trackAnotherLabel: "Track another order", defaultTrackingNumber: "DEMO-YQTRACK9999", defaultOrderNumber: "", defaultQueryMode: "tracking", trackingTabLabel: "Tracking Number", orderTabLabel: "Order Number", shipmentLabels: "Shipment #1|Shipment #2|Shipment #3", heroImageUrl: "https://images.unsplash.com/photo-1596462502278-27bfdc403348?auto=format&fit=crop&w=1600&q=85" }, defaultVariant: "brand", variants: [{ id: "brand", label: "Brand" }, { id: "compact", label: "Compact", theme: { spacing: "12px" } }], fields: { heading: text4("Heading"), submitLabel: text4("Button label"), trackAnotherLabel: text4("Track another label"), defaultTrackingNumber: text4("Default tracking number"), defaultOrderNumber: text4("Default order number"), defaultQueryMode: text4("Default query mode"), trackingTabLabel: text4("Tracking tab label"), orderTabLabel: text4("Order tab label"), shipmentLabels: text4("Shipment labels (separate with |)"), heroImageUrl: httpsUrl("Hero image URL") }, render: { web: BrandedTrackingExperienceBlock, editor: BrandedTrackingExperienceEditor } },
|
|
2552
2713
|
{ type: "besttrack.branded.query", version: 1, label: "Order query", category: "BestTrack Branded", targets: ["web"], defaultProps: { heading: "Track your order", submitLabel: "Track", defaultTrackingNumber: "DEMO-YQTRACK9999", defaultOrderNumber: "", defaultQueryMode: "tracking", trackingTabLabel: "Tracking Number", orderTabLabel: "Order Number", shipmentLabels: "Shipment #1|Shipment #2|Shipment #3", heroImageUrl: "https://images.unsplash.com/photo-1596462502278-27bfdc403348?auto=format&fit=crop&w=1600&q=85" }, defaultVariant: "brand", variants: [{ id: "brand", label: "Brand" }, { id: "compact", label: "Compact", theme: { spacing: "12px" } }], fields: { heading: text4("Heading"), submitLabel: text4("Button label"), defaultTrackingNumber: text4("Default tracking number"), defaultOrderNumber: text4("Default order number"), defaultQueryMode: text4("Default query mode"), trackingTabLabel: text4("Tracking tab label"), orderTabLabel: text4("Order tab label"), shipmentLabels: text4("Shipment labels (separate with |)"), heroImageUrl: httpsUrl("Hero image URL") }, render: { web: BrandedQueryBlock, editor: BrandedQueryEditor } },
|
|
2553
2714
|
{ type: "besttrack.branded.order-items", version: 1, label: "Order items", category: "BestTrack Branded", targets: ["web"], defaultProps: { heading: "What's Inside" }, defaultVariant: "brand", variants: [{ id: "brand", label: "Brand" }, { id: "minimal", label: "Minimal" }], fields: { heading: text4("Heading") }, render: { web: BrandedOrderItemsBlock, editor: BrandedOrderItemsEditor } },
|
|
2554
|
-
|
|
2715
|
+
// products 接入与 Ready-to-go 相同的商家选品优先规则;hideWhenEmpty 仅保留旧文档兼容,
|
|
2716
|
+
// 不再提供编辑开关,因为三套模板都在没有可用推荐时隐藏内容。
|
|
2717
|
+
{ type: "besttrack.branded.recommendations", version: 1, label: "Recommended products", category: "BestTrack Branded", targets: ["web"], defaultProps: { heading: "You might also like", hideWhenEmpty: "false", products: [] }, defaultVariant: "brand", variants: [{ id: "brand", label: "Brand" }, { id: "editorial", label: "Editorial", theme: { "color.surface": "#fffdf0" } }], fields: { heading: text4("Heading"), products: { field: "besttrack.branded.products", label: "\u63A8\u8350\u5546\u54C1 (Shopify)", control: "products", group: "Content" } }, render: { web: BrandedRecommendationsBlock, editor: BrandedRecommendationsEditor } },
|
|
2555
2718
|
{ type: "besttrack.branded.quick-links", version: 1, label: "Quick links", category: "BestTrack Branded", targets: ["web"], defaultProps: { heading: "Need help?", primaryLabel: "Shipping help", primaryHref: "https://example.com/pages/shipping", secondaryLabel: "Contact us", secondaryHref: "https://example.com/pages/contact" }, defaultVariant: "brand", variants: [{ id: "brand", label: "Brand" }], fields: { heading: text4("Heading"), primaryLabel: text4("Primary link label"), primaryHref: httpsUrl("Primary link URL"), secondaryLabel: text4("Secondary link label"), secondaryHref: httpsUrl("Secondary link URL") }, render: { web: BrandedQuickLinksBlock, editor: BrandedQuickLinksEditor } },
|
|
2556
2719
|
{ type: "besttrack.branded.blog", version: 1, label: "Blog", category: "BestTrack Branded", targets: ["web"], defaultProps: { heading: "From our journal", articleTitle: "Delivery tips for every season", excerpt: "Simple ways to make every delivery feel considered.", articleHref: "https://example.com/blogs/news", linkLabel: "Read the story" }, defaultVariant: "brand", variants: [{ id: "brand", label: "Brand" }], fields: { heading: text4("Heading"), articleTitle: text4("Article title"), excerpt: text4("Excerpt", { control: "textarea" }), articleHref: httpsUrl("Article URL"), linkLabel: text4("Link label") }, render: { web: BrandedBlogBlock, editor: BrandedBlogEditor } }
|
|
2557
|
-
], ["besttrack.branded.announcement", "besttrack.branded.tracking-experience"]);
|
|
2720
|
+
], ["besttrack.branded.announcement", "besttrack.branded.tracking-experience", "besttrack.branded.recommendations"]);
|
|
2558
2721
|
var brandedDefaultBlockTypes = brandedBlocks.filter((block) => !["besttrack.branded.query", "besttrack.branded.order-items"].includes(block.type)).map((block) => block.type);
|
|
2559
2722
|
var brandedTemplatePolicy = defineTemplatePolicy(
|
|
2560
2723
|
"besttrack.branded",
|
|
2561
2724
|
"Branded",
|
|
2562
2725
|
brandedDefaultBlockTypes,
|
|
2563
|
-
["besttrack.branded.announcement", "besttrack.branded.tracking-experience"]
|
|
2726
|
+
["besttrack.branded.announcement", "besttrack.branded.tracking-experience", "besttrack.branded.recommendations"]
|
|
2564
2727
|
);
|
|
2565
2728
|
function createBrandedTemplate() {
|
|
2566
2729
|
const templateBlocks = brandedBlocks.filter((block) => brandedDefaultBlockTypes.includes(block.type));
|
|
@@ -2572,40 +2735,16 @@ var bestTrackBrandedExtension = Object.freeze({ name: "besttrack.branded", versi
|
|
|
2572
2735
|
import { createPageDocument as createPageDocument3 } from "@standhigher/puck-page-builder/runtime";
|
|
2573
2736
|
|
|
2574
2737
|
// src/sales.tsx
|
|
2575
|
-
import {
|
|
2576
|
-
import { Fragment as Fragment5, jsx as
|
|
2577
|
-
var
|
|
2578
|
-
|
|
2579
|
-
} };
|
|
2580
|
-
var SalesRuntimeContext = createContext3(initialRuntime3);
|
|
2738
|
+
import { useState as useState6 } from "react";
|
|
2739
|
+
import { Fragment as Fragment5, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2740
|
+
var SalesRuntimeProvider = TrackingRuntimeProvider;
|
|
2741
|
+
var useSalesRuntime = useTrackingRuntime;
|
|
2581
2742
|
var contentWidth3 = { boxSizing: "border-box", width: "min(1120px, calc(100% - 32px))", margin: "0 auto" };
|
|
2582
2743
|
var sectionStyle = { ...contentWidth3, marginTop: "clamp(32px, 6vw, 72px)", color: "var(--pb-color-text)", fontFamily: "var(--pb-font-family)" };
|
|
2583
2744
|
var panelStyle = { boxSizing: "border-box", border: "1px solid var(--pb-color-border)", borderRadius: "var(--pb-radius)", padding: "clamp(20px, 3vw, 32px)", background: "var(--pb-color-surface)", color: "var(--pb-color-text)", overflowWrap: "anywhere" };
|
|
2584
2745
|
var gridStyle = { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 220px), 1fr))", gap: "clamp(16px, 2vw, 24px)" };
|
|
2585
|
-
function SalesRuntimeProvider({ children, query: injectedQuery, watermark, resourceResolution }) {
|
|
2586
|
-
const [state, setState] = useState5({ phase: "idle" });
|
|
2587
|
-
const requestId = useRef4(0);
|
|
2588
|
-
const query = useCallback4(async (request) => {
|
|
2589
|
-
const currentRequestId = ++requestId.current;
|
|
2590
|
-
setState({ phase: "loading" });
|
|
2591
|
-
try {
|
|
2592
|
-
if (!injectedQuery) throw new Error("tracking-query-not-configured");
|
|
2593
|
-
const result = await injectedQuery(request);
|
|
2594
|
-
if (currentRequestId !== requestId.current) return;
|
|
2595
|
-
setState({ phase: isEmptyTrackingPageResult(result) ? "empty" : "success", result });
|
|
2596
|
-
} catch {
|
|
2597
|
-
if (currentRequestId !== requestId.current) return;
|
|
2598
|
-
setState({ phase: "error" });
|
|
2599
|
-
}
|
|
2600
|
-
}, [injectedQuery]);
|
|
2601
|
-
const value = useMemo4(() => ({ ...state, query, watermark, resourceResolution }), [query, resourceResolution, state, watermark]);
|
|
2602
|
-
return /* @__PURE__ */ jsx7(SalesRuntimeContext.Provider, { value, children });
|
|
2603
|
-
}
|
|
2604
|
-
function useSalesRuntime() {
|
|
2605
|
-
return useContext3(SalesRuntimeContext);
|
|
2606
|
-
}
|
|
2607
2746
|
function RuntimeWatermark3({ watermark }) {
|
|
2608
|
-
return watermark?.visible ? /* @__PURE__ */
|
|
2747
|
+
return watermark?.visible ? /* @__PURE__ */ jsx8("small", { style: { display: "block", marginTop: 14, color: "var(--pb-color-muted)", fontSize: 11, textAlign: "right" }, children: watermark.label || "Powered by BestTrack" }) : null;
|
|
2609
2748
|
}
|
|
2610
2749
|
function text5(props, key, fallback) {
|
|
2611
2750
|
const value = props[key];
|
|
@@ -2614,28 +2753,28 @@ function text5(props, key, fallback) {
|
|
|
2614
2753
|
var safeHref3 = safeTrackingPageUrl;
|
|
2615
2754
|
var safeImageUrl3 = safeTrackingPageUrl;
|
|
2616
2755
|
function Status({ children, alert = false }) {
|
|
2617
|
-
return /* @__PURE__ */
|
|
2756
|
+
return /* @__PURE__ */ jsx8("p", { role: alert ? "alert" : "status", "aria-live": alert ? "assertive" : "polite", style: { margin: "16px 0 0", color: alert ? "#a61b1b" : "var(--pb-color-muted)" }, children });
|
|
2618
2757
|
}
|
|
2619
2758
|
function Section({ title, children, busy = false }) {
|
|
2620
|
-
return /* @__PURE__ */
|
|
2621
|
-
/* @__PURE__ */
|
|
2759
|
+
return /* @__PURE__ */ jsx8("section", { "aria-label": title, "aria-busy": busy || void 0, style: sectionStyle, children: /* @__PURE__ */ jsxs7("div", { style: panelStyle, children: [
|
|
2760
|
+
/* @__PURE__ */ jsx8("h2", { style: { margin: "0 0 20px", fontSize: "clamp(24px, 3vw, 34px)", lineHeight: 1.15 }, children: title }),
|
|
2622
2761
|
children
|
|
2623
2762
|
] }) });
|
|
2624
2763
|
}
|
|
2625
2764
|
function ProductImage3({ src, alt }) {
|
|
2626
|
-
const [failed, setFailed] =
|
|
2765
|
+
const [failed, setFailed] = useState6(false);
|
|
2627
2766
|
const safeSrc = safeImageUrl3(src);
|
|
2628
|
-
if (!safeSrc || failed) return /* @__PURE__ */
|
|
2629
|
-
return /* @__PURE__ */
|
|
2767
|
+
if (!safeSrc || failed) return /* @__PURE__ */ jsx8("span", { "aria-label": `${alt} image unavailable`, role: "img", style: { display: "grid", placeItems: "center", width: 76, height: 76, flex: "0 0 auto", border: "1px solid var(--pb-color-border)", borderRadius: "calc(var(--pb-radius) / 1.5)", background: "var(--pb-color-background)", color: "var(--pb-color-muted)", fontWeight: 700 }, children: alt.slice(0, 1).toUpperCase() });
|
|
2768
|
+
return /* @__PURE__ */ jsx8("img", { src: safeSrc, alt, onError: () => setFailed(true), style: { width: 76, height: 76, flex: "0 0 auto", borderRadius: "calc(var(--pb-radius) / 1.5)", objectFit: "cover", background: "var(--pb-color-background)" } });
|
|
2630
2769
|
}
|
|
2631
2770
|
function HeroAsset({ src }) {
|
|
2632
|
-
const [failed, setFailed] =
|
|
2771
|
+
const [failed, setFailed] = useState6(false);
|
|
2633
2772
|
const safeSrc = safeImageUrl3(src);
|
|
2634
2773
|
if (!safeSrc || failed) return null;
|
|
2635
|
-
return /* @__PURE__ */
|
|
2774
|
+
return /* @__PURE__ */ jsx8("img", { "data-sales-hero-image": true, src: safeSrc, alt: "", "aria-hidden": "true", onError: () => setFailed(true), style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: "cover", opacity: 0.62 } });
|
|
2636
2775
|
}
|
|
2637
2776
|
function SalesTextField({ value, onChange }) {
|
|
2638
|
-
return /* @__PURE__ */
|
|
2777
|
+
return /* @__PURE__ */ jsx8("input", { "aria-label": "Sales text", value: typeof value === "string" ? value : "", onChange: (event) => onChange(event.target.value) });
|
|
2639
2778
|
}
|
|
2640
2779
|
var editorSurfaceStyle = { boxSizing: "border-box", border: "1px solid #dfddd7", borderRadius: 10, padding: 24, background: "#ffffff", color: "#0a0a0a", fontFamily: "Arial, Helvetica, sans-serif" };
|
|
2641
2780
|
var editorCardStyle = { boxSizing: "border-box", padding: 18, border: "1px solid #dfddd7", borderRadius: 7, background: "#f7f5f0" };
|
|
@@ -2644,8 +2783,8 @@ function editorText(block, name, fallback) {
|
|
|
2644
2783
|
}
|
|
2645
2784
|
function SalesInlineText({ block, name, fallback, style }) {
|
|
2646
2785
|
const value = editorText(block, name, fallback);
|
|
2647
|
-
if (!block.selected) return /* @__PURE__ */
|
|
2648
|
-
return /* @__PURE__ */
|
|
2786
|
+
if (!block.selected) return /* @__PURE__ */ jsx8("span", { "data-sales-editor-field": name, style, children: value });
|
|
2787
|
+
return /* @__PURE__ */ jsx8("input", { "aria-label": `Canvas ${name}`, "data-sales-editor-field": name, value, onMouseDown: (event) => event.stopPropagation(), onClick: (event) => event.stopPropagation(), onChange: (event) => block.onPropsChange({ [name]: event.currentTarget.value }), style: {
|
|
2649
2788
|
boxSizing: "border-box",
|
|
2650
2789
|
width: "100%",
|
|
2651
2790
|
/* border: "1px dashed currentColor", */
|
|
@@ -2662,55 +2801,55 @@ function SalesInlineText({ block, name, fallback, style }) {
|
|
|
2662
2801
|
} });
|
|
2663
2802
|
}
|
|
2664
2803
|
function SalesEditorSurface({ block, children }) {
|
|
2665
|
-
return /* @__PURE__ */
|
|
2804
|
+
return /* @__PURE__ */ jsx8("section", { "aria-label": "Sales editor preview", style: { ...editorSurfaceStyle, outline: block.selected ? "2px solid #2563eb" : void 0, outlineOffset: -2 }, children });
|
|
2666
2805
|
}
|
|
2667
2806
|
function SalesAnnouncementEditor(block) {
|
|
2668
|
-
return /* @__PURE__ */
|
|
2807
|
+
return /* @__PURE__ */ jsx8("section", { "aria-label": "Sales announcement editor", style: { display: "grid", minHeight: 38, placeItems: "center", boxSizing: "border-box", padding: "10px 16px", borderBottom: "1px solid #dfddd7", background: "#f7f5f0", color: "#0a0a0a", fontFamily: "Arial, Helvetica, sans-serif", fontSize: 13, fontWeight: 700, textAlign: "center" }, children: /* @__PURE__ */ jsx8(SalesInlineText, { block, name: "message", fallback: "Free delivery on orders over $50" }) });
|
|
2669
2808
|
}
|
|
2670
2809
|
function SalesQueryEditor(block) {
|
|
2671
2810
|
const imageUrl = safeImageUrl3(block.heroImageUrl);
|
|
2672
2811
|
const trackingNumber = editorText(block, "defaultTrackingNumber", "BT-2048-DEMO");
|
|
2673
2812
|
return /* @__PURE__ */ jsxs7("section", { "aria-label": "Sales Hero query editor", style: { position: "relative", display: "grid", minHeight: "clamp(460px, 52vw, 620px)", placeItems: "center", boxSizing: "border-box", overflow: "hidden", padding: "clamp(28px, 6vw, 72px) 16px", background: "#0a0a0a", fontFamily: "Arial, Helvetica, sans-serif" }, children: [
|
|
2674
|
-
imageUrl ? /* @__PURE__ */
|
|
2675
|
-
/* @__PURE__ */
|
|
2813
|
+
imageUrl ? /* @__PURE__ */ jsx8("img", { src: imageUrl, alt: "", "aria-hidden": "true", style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: "cover", opacity: 0.62 } }) : null,
|
|
2814
|
+
/* @__PURE__ */ jsx8("div", { "aria-hidden": "true", style: { position: "absolute", inset: 0, background: "rgb(0 0 0 / 42%)" } }),
|
|
2676
2815
|
/* @__PURE__ */ jsxs7("div", { style: { position: "relative", zIndex: 1, boxSizing: "border-box", width: "min(560px, 100%)", padding: "clamp(28px, 5vw, 48px)", borderRadius: 10, background: "#ffffff", color: "#0a0a0a", boxShadow: "0 20px 56px rgb(0 0 0 / 28%)" }, children: [
|
|
2677
|
-
/* @__PURE__ */
|
|
2678
|
-
/* @__PURE__ */
|
|
2679
|
-
/* @__PURE__ */
|
|
2680
|
-
/* @__PURE__ */
|
|
2816
|
+
/* @__PURE__ */ jsx8("h1", { style: { margin: "0 0 28px", fontSize: "clamp(32px, 5vw, 48px)", fontWeight: 800, letterSpacing: "-0.035em", lineHeight: 1.02, textAlign: "center" }, children: /* @__PURE__ */ jsx8(SalesInlineText, { block, name: "heading", fallback: "Track your order" }) }),
|
|
2817
|
+
/* @__PURE__ */ jsx8("input", { "aria-label": "Canvas default tracking number", readOnly: !block.selected, value: trackingNumber, onMouseDown: (event) => block.selected && event.stopPropagation(), onClick: (event) => block.selected && event.stopPropagation(), onChange: (event) => block.onPropsChange({ defaultTrackingNumber: event.currentTarget.value }), style: { boxSizing: "border-box", width: "100%", minHeight: 58, padding: "12px 16px", border: "1px solid #dfddd7", borderRadius: 8, background: "#ffffff", color: "#0a0a0a", font: "inherit", fontSize: 17 } }),
|
|
2818
|
+
/* @__PURE__ */ jsx8("div", { style: { display: "grid", minHeight: 58, placeItems: "center", marginTop: 14, padding: "12px 18px", borderRadius: 8, background: "#0a0a0a", color: "#ffffff", fontSize: 16, fontWeight: 700 }, children: /* @__PURE__ */ jsx8(SalesInlineText, { block, name: "submitLabel", fallback: "Track order" }) }),
|
|
2819
|
+
/* @__PURE__ */ jsx8("small", { style: { display: "block", marginTop: 14, color: "#6b6b6b", fontSize: 11, textAlign: "right" }, children: "Powered by BestTrack" })
|
|
2681
2820
|
] })
|
|
2682
2821
|
] });
|
|
2683
2822
|
}
|
|
2684
2823
|
function SalesOrderItemsEditor(block) {
|
|
2685
2824
|
return /* @__PURE__ */ jsxs7(SalesEditorSurface, { block, children: [
|
|
2686
|
-
/* @__PURE__ */
|
|
2825
|
+
/* @__PURE__ */ jsx8("h2", { style: { margin: "0 0 20px" }, children: /* @__PURE__ */ jsx8(SalesInlineText, { block, name: "heading", fallback: "Items in your order" }) }),
|
|
2687
2826
|
/* @__PURE__ */ jsxs7("article", { style: { ...editorCardStyle, display: "flex", alignItems: "center", gap: 14 }, children: [
|
|
2688
|
-
/* @__PURE__ */
|
|
2827
|
+
/* @__PURE__ */ jsx8("span", { "aria-hidden": "true", style: { width: 68, height: 68, borderRadius: 7, background: "#dfddd7" } }),
|
|
2689
2828
|
/* @__PURE__ */ jsxs7("span", { children: [
|
|
2690
|
-
/* @__PURE__ */
|
|
2691
|
-
/* @__PURE__ */
|
|
2692
|
-
/* @__PURE__ */
|
|
2829
|
+
/* @__PURE__ */ jsx8("strong", { children: "Order item" }),
|
|
2830
|
+
/* @__PURE__ */ jsx8("br", {}),
|
|
2831
|
+
/* @__PURE__ */ jsx8("small", { style: { color: "#6b6b6b" }, children: "Items appear after a successful tracking query." })
|
|
2693
2832
|
] })
|
|
2694
2833
|
] })
|
|
2695
2834
|
] });
|
|
2696
2835
|
}
|
|
2697
2836
|
function SalesOtherTrackingEditor(block) {
|
|
2698
2837
|
return /* @__PURE__ */ jsxs7(SalesEditorSurface, { block, children: [
|
|
2699
|
-
/* @__PURE__ */
|
|
2700
|
-
/* @__PURE__ */
|
|
2838
|
+
/* @__PURE__ */ jsx8("h2", { style: { margin: "0 0 20px" }, children: /* @__PURE__ */ jsx8(SalesInlineText, { block, name: "heading", fallback: "Other shipments" }) }),
|
|
2839
|
+
/* @__PURE__ */ jsx8("p", { style: { margin: 0, color: "#6b6b6b" }, children: /* @__PURE__ */ jsx8(SalesInlineText, { block, name: "emptyMessage", fallback: "No other shipments are linked to this order." }) })
|
|
2701
2840
|
] });
|
|
2702
2841
|
}
|
|
2703
2842
|
function SalesServiceCardsEditor(block) {
|
|
2704
2843
|
return /* @__PURE__ */ jsxs7(SalesEditorSurface, { block, children: [
|
|
2705
|
-
/* @__PURE__ */
|
|
2844
|
+
/* @__PURE__ */ jsx8("h2", { style: { margin: "0 0 20px" }, children: /* @__PURE__ */ jsx8(SalesInlineText, { block, name: "heading", fallback: "Shop with confidence" }) }),
|
|
2706
2845
|
/* @__PURE__ */ jsxs7("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 180px), 1fr))", gap: 14 }, children: [
|
|
2707
2846
|
/* @__PURE__ */ jsxs7("article", { style: editorCardStyle, children: [
|
|
2708
|
-
/* @__PURE__ */
|
|
2709
|
-
/* @__PURE__ */
|
|
2847
|
+
/* @__PURE__ */ jsx8("strong", { children: /* @__PURE__ */ jsx8(SalesInlineText, { block, name: "firstTitle", fallback: "Easy returns" }) }),
|
|
2848
|
+
/* @__PURE__ */ jsx8("p", { style: { marginBottom: 0, color: "#6b6b6b" }, children: /* @__PURE__ */ jsx8(SalesInlineText, { block, name: "firstDescription", fallback: "Simple support when plans change." }) })
|
|
2710
2849
|
] }),
|
|
2711
2850
|
/* @__PURE__ */ jsxs7("article", { style: editorCardStyle, children: [
|
|
2712
|
-
/* @__PURE__ */
|
|
2713
|
-
/* @__PURE__ */
|
|
2851
|
+
/* @__PURE__ */ jsx8("strong", { children: /* @__PURE__ */ jsx8(SalesInlineText, { block, name: "secondTitle", fallback: "Secure delivery" }) }),
|
|
2852
|
+
/* @__PURE__ */ jsx8("p", { style: { marginBottom: 0, color: "#6b6b6b" }, children: /* @__PURE__ */ jsx8(SalesInlineText, { block, name: "secondDescription", fallback: "Follow every milestone in one place." }) })
|
|
2714
2853
|
] })
|
|
2715
2854
|
] })
|
|
2716
2855
|
] });
|
|
@@ -2718,39 +2857,39 @@ function SalesServiceCardsEditor(block) {
|
|
|
2718
2857
|
function SalesProductCategoriesEditor(block) {
|
|
2719
2858
|
const collection = isShopifyResourceReference(block.collection, "collection") ? block.collection : void 0;
|
|
2720
2859
|
return /* @__PURE__ */ jsxs7(SalesEditorSurface, { block, children: [
|
|
2721
|
-
/* @__PURE__ */
|
|
2860
|
+
/* @__PURE__ */ jsx8("h2", { style: { margin: "0 0 20px" }, children: /* @__PURE__ */ jsx8(SalesInlineText, { block, name: "heading", fallback: "Shop by category" }) }),
|
|
2722
2861
|
/* @__PURE__ */ jsxs7("div", { style: { ...editorCardStyle, display: "flex", justifyContent: "space-between", fontWeight: 700 }, children: [
|
|
2723
|
-
/* @__PURE__ */
|
|
2724
|
-
/* @__PURE__ */
|
|
2862
|
+
/* @__PURE__ */ jsx8("span", { children: collection?.title ?? "Choose a collection in the inspector" }),
|
|
2863
|
+
/* @__PURE__ */ jsx8("span", { "aria-hidden": "true", children: "\u2192" })
|
|
2725
2864
|
] })
|
|
2726
2865
|
] });
|
|
2727
2866
|
}
|
|
2728
2867
|
function SalesFeaturedProductEditor(block) {
|
|
2729
2868
|
const product = isShopifyResourceReference(block.product, "product") ? block.product : void 0;
|
|
2730
2869
|
return /* @__PURE__ */ jsxs7(SalesEditorSurface, { block, children: [
|
|
2731
|
-
/* @__PURE__ */
|
|
2870
|
+
/* @__PURE__ */ jsx8("h2", { style: { margin: "0 0 20px" }, children: /* @__PURE__ */ jsx8(SalesInlineText, { block, name: "heading", fallback: "Featured product" }) }),
|
|
2732
2871
|
/* @__PURE__ */ jsxs7("div", { style: { ...editorCardStyle, display: "flex", justifyContent: "space-between", fontWeight: 700 }, children: [
|
|
2733
|
-
/* @__PURE__ */
|
|
2734
|
-
/* @__PURE__ */
|
|
2872
|
+
/* @__PURE__ */ jsx8("span", { children: product?.title ?? "Choose a product in the inspector" }),
|
|
2873
|
+
/* @__PURE__ */ jsx8("span", { "aria-hidden": "true", children: "\u2192" })
|
|
2735
2874
|
] }),
|
|
2736
|
-
/* @__PURE__ */
|
|
2875
|
+
/* @__PURE__ */ jsx8("small", { style: { display: "block", marginTop: 10, color: "#6b6b6b" }, children: "Availability is supplied by the authorized runtime." })
|
|
2737
2876
|
] });
|
|
2738
2877
|
}
|
|
2739
2878
|
function SalesRecommendationsEditor(block) {
|
|
2740
2879
|
return /* @__PURE__ */ jsxs7(SalesEditorSurface, { block, children: [
|
|
2741
|
-
/* @__PURE__ */
|
|
2742
|
-
/* @__PURE__ */
|
|
2880
|
+
/* @__PURE__ */ jsx8("h2", { style: { margin: "0 0 20px" }, children: /* @__PURE__ */ jsx8(SalesInlineText, { block, name: "heading", fallback: "Complete your order" }) }),
|
|
2881
|
+
/* @__PURE__ */ jsx8("div", { style: { ...editorCardStyle, color: "#6b6b6b" }, children: "Recommended products load independently of tracking queries." })
|
|
2743
2882
|
] });
|
|
2744
2883
|
}
|
|
2745
2884
|
function SalesAnnouncementBlock(props) {
|
|
2746
|
-
return /* @__PURE__ */
|
|
2885
|
+
return /* @__PURE__ */ jsx8("section", { "aria-label": "Sales announcement", "data-sales-announcement": true, style: { display: "grid", minHeight: 38, placeItems: "center", boxSizing: "border-box", padding: "10px 16px", borderBottom: "1px solid var(--pb-color-border)", background: "var(--pb-color-background)", color: "var(--pb-color-text)", fontFamily: "var(--pb-font-family)", fontSize: 13, textAlign: "center" }, children: /* @__PURE__ */ jsx8("strong", { children: text5(props, "message", "Free delivery on orders over $50") }) });
|
|
2747
2886
|
}
|
|
2748
2887
|
function SalesQueryBlock(props) {
|
|
2749
2888
|
const runtime = useSalesRuntime();
|
|
2750
2889
|
return /* @__PURE__ */ jsxs7("section", { "aria-label": "Sales tracking query", "aria-busy": runtime.phase === "loading" || void 0, "data-sales-hero": true, style: { position: "relative", display: "grid", minHeight: "clamp(460px, 52vw, 620px)", boxSizing: "border-box", overflow: "hidden", padding: "clamp(28px, 6vw, 72px) 16px", background: "var(--pb-color-text)", color: "var(--pb-color-surface)", fontFamily: "var(--pb-font-family)" }, children: [
|
|
2751
|
-
/* @__PURE__ */
|
|
2752
|
-
/* @__PURE__ */
|
|
2753
|
-
/* @__PURE__ */
|
|
2890
|
+
/* @__PURE__ */ jsx8(HeroAsset, { src: props.heroImageUrl }),
|
|
2891
|
+
/* @__PURE__ */ jsx8("div", { "aria-hidden": "true", style: { position: "absolute", inset: 0, background: "rgb(0 0 0 / 42%)" } }),
|
|
2892
|
+
/* @__PURE__ */ jsx8("div", { style: { ...contentWidth3, position: "relative", zIndex: 1, display: "grid", alignItems: "center", width: "100%", minWidth: 0 }, children: /* @__PURE__ */ jsx8(
|
|
2754
2893
|
TrackingQueryCard,
|
|
2755
2894
|
{
|
|
2756
2895
|
phase: runtime.phase,
|
|
@@ -2759,6 +2898,7 @@ function SalesQueryBlock(props) {
|
|
|
2759
2898
|
submitLabel: text5(props, "submitLabel", "Track order"),
|
|
2760
2899
|
initialTrackingNumber: text5(props, "defaultTrackingNumber", "BT-2048-DEMO"),
|
|
2761
2900
|
initialOrderNumber: text5(props, "defaultOrderNumber", ""),
|
|
2901
|
+
initialMode: text5(props, "defaultQueryMode", "tracking") === "order" ? "order" : "tracking",
|
|
2762
2902
|
emptyMessage: "We couldn\u2019t find an order for that number.",
|
|
2763
2903
|
errorMessage: "We couldn\u2019t retrieve this order right now. Please try again later.",
|
|
2764
2904
|
trackingInputLabel: "Sales tracking number",
|
|
@@ -2773,9 +2913,9 @@ function SalesQueryBlock(props) {
|
|
|
2773
2913
|
formStyle: { gap: 14 },
|
|
2774
2914
|
inputStyle: { boxSizing: "border-box", width: "100%", minHeight: 58, padding: "12px 16px", border: "1px solid var(--pb-color-border)", borderRadius: "calc(var(--pb-radius) / 1.25)", background: "var(--pb-color-surface)", color: "var(--pb-color-text)", font: "inherit", fontSize: 17 },
|
|
2775
2915
|
submitStyle: (loading) => ({ width: "100%", minHeight: 58, padding: "12px 18px", border: 0, borderRadius: "calc(var(--pb-radius) / 1.25)", background: loading ? "#64748b" : "var(--pb-color-text)", color: "var(--pb-color-surface)", font: "inherit", fontSize: 16, fontWeight: 700, cursor: loading ? "wait" : "pointer" }),
|
|
2776
|
-
result: runtime.result ? /* @__PURE__ */
|
|
2916
|
+
result: runtime.result ? /* @__PURE__ */ jsx8(TrackingQueryResultDetails, { result: runtime.result }) : null,
|
|
2777
2917
|
resultStyle: { padding: 16, border: "1px solid var(--pb-color-border)", borderRadius: "calc(var(--pb-radius) / 1.25)", background: "var(--pb-color-background)" },
|
|
2778
|
-
watermark: /* @__PURE__ */
|
|
2918
|
+
watermark: /* @__PURE__ */ jsx8(RuntimeWatermark3, { watermark: runtime.watermark })
|
|
2779
2919
|
}
|
|
2780
2920
|
) })
|
|
2781
2921
|
] });
|
|
@@ -2783,127 +2923,132 @@ function SalesQueryBlock(props) {
|
|
|
2783
2923
|
function SalesOrderItemsBlock(props) {
|
|
2784
2924
|
const runtime = useSalesRuntime();
|
|
2785
2925
|
const title = text5(props, "heading", "Items in your order");
|
|
2926
|
+
const visibility = trackingBlockState(runtime);
|
|
2927
|
+
if (!visibility.showDelivery) return null;
|
|
2786
2928
|
const items = runtime.result?.orderItems ?? [];
|
|
2787
|
-
return /* @__PURE__ */
|
|
2929
|
+
return /* @__PURE__ */ jsx8(Section, { title, children: visibility.showUnavailable ? /* @__PURE__ */ jsx8(Status, { alert: true, children: "Order items are temporarily unavailable." }) : items.length ? /* @__PURE__ */ jsx8("ul", { style: { display: "grid", gap: 12, margin: 0, padding: 0, listStyle: "none" }, children: items.map((item) => {
|
|
2788
2930
|
const href = safeHref3(item.href);
|
|
2789
2931
|
const itemTitle = text5(item, "title", "Order item");
|
|
2790
|
-
const itemContent = href ? /* @__PURE__ */
|
|
2932
|
+
const itemContent = href ? /* @__PURE__ */ jsx8("a", { href, style: { color: "inherit" }, children: itemTitle }) : itemTitle;
|
|
2791
2933
|
return /* @__PURE__ */ jsxs7("li", { style: { display: "flex", alignItems: "center", gap: 16, minWidth: 0, padding: 14, border: "1px solid var(--pb-color-border)", borderRadius: "calc(var(--pb-radius) / 1.5)", background: "var(--pb-color-background)" }, children: [
|
|
2792
|
-
/* @__PURE__ */
|
|
2934
|
+
/* @__PURE__ */ jsx8(ProductImage3, { src: item.imageUrl, alt: itemTitle }),
|
|
2793
2935
|
/* @__PURE__ */ jsxs7("span", { style: { minWidth: 0 }, children: [
|
|
2794
|
-
/* @__PURE__ */
|
|
2795
|
-
/* @__PURE__ */
|
|
2936
|
+
/* @__PURE__ */ jsx8("strong", { children: itemContent }),
|
|
2937
|
+
/* @__PURE__ */ jsx8("br", {}),
|
|
2796
2938
|
/* @__PURE__ */ jsxs7("small", { style: { color: "var(--pb-color-muted)" }, children: [
|
|
2797
2939
|
"Qty ",
|
|
2798
|
-
|
|
2940
|
+
item.quantity
|
|
2799
2941
|
] }),
|
|
2800
2942
|
item.description ? /* @__PURE__ */ jsxs7(Fragment5, { children: [
|
|
2801
|
-
/* @__PURE__ */
|
|
2802
|
-
/* @__PURE__ */
|
|
2803
|
-
] }) : null
|
|
2943
|
+
/* @__PURE__ */ jsx8("br", {}),
|
|
2944
|
+
/* @__PURE__ */ jsx8("small", { style: { color: "var(--pb-color-muted)" }, children: item.description })
|
|
2945
|
+
] }) : null,
|
|
2946
|
+
href ? /* @__PURE__ */ jsx8("a", { href, style: { display: "inline-flex", alignItems: "center", minHeight: 32, marginLeft: 8, padding: "6px 12px", border: "1px solid var(--pb-color-border)", borderRadius: 6, color: "inherit", fontSize: 13 }, children: "Reorder" }) : null
|
|
2804
2947
|
] })
|
|
2805
2948
|
] }, item.id);
|
|
2806
|
-
}) }) : /* @__PURE__ */
|
|
2949
|
+
}) }) : /* @__PURE__ */ jsx8(Status, { children: "Package contents are not available for this shipment." }) });
|
|
2807
2950
|
}
|
|
2808
2951
|
function SalesOtherTrackingBlock(props) {
|
|
2809
2952
|
const runtime = useSalesRuntime();
|
|
2810
2953
|
const title = text5(props, "heading", "Other shipments");
|
|
2811
|
-
const shipments =
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2954
|
+
const shipments = runtime.result?.shipments ?? [];
|
|
2955
|
+
if (!trackingBlockState(runtime).showResult || shipments.length < 2 || !runtime.result) return null;
|
|
2956
|
+
const { shipmentValues } = trackingSelection(runtime.result, runtime.recentQueries);
|
|
2957
|
+
return /* @__PURE__ */ jsx8(Section, { title, children: /* @__PURE__ */ jsx8("ul", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 220px), 1fr))", gap: 12, margin: 0, padding: 0, listStyle: "none" }, children: shipments.map((shipment, index) => /* @__PURE__ */ jsxs7("li", { style: { padding: 16, border: "1px solid var(--pb-color-border)", borderRadius: "calc(var(--pb-radius) / 1.5)", background: "var(--pb-color-background)" }, children: [
|
|
2958
|
+
/* @__PURE__ */ jsx8("button", { type: "button", "aria-pressed": runtime.selectedShipmentIndex === index, onClick: () => runtime.selectShipment(index), style: { minHeight: 44, border: 0, background: "transparent", color: "inherit", font: "inherit", fontWeight: 700, cursor: "pointer" }, children: shipmentValues[index] }),
|
|
2959
|
+
shipment.status ? /* @__PURE__ */ jsx8("p", { style: { margin: "8px 0 0", color: "var(--pb-color-muted)" }, children: shipment.status }) : null
|
|
2960
|
+
] }, shipment.id)) }) });
|
|
2817
2961
|
}
|
|
2818
2962
|
function SalesServiceCardsBlock(props) {
|
|
2819
2963
|
const title = text5(props, "heading", "Shop with confidence");
|
|
2820
|
-
return /* @__PURE__ */
|
|
2964
|
+
return /* @__PURE__ */ jsx8(Section, { title, children: /* @__PURE__ */ jsxs7("div", { style: gridStyle, children: [
|
|
2821
2965
|
/* @__PURE__ */ jsxs7("article", { style: { padding: 20, border: "1px solid var(--pb-color-border)", borderRadius: "calc(var(--pb-radius) / 1.5)", background: "var(--pb-color-background)" }, children: [
|
|
2822
|
-
/* @__PURE__ */
|
|
2823
|
-
/* @__PURE__ */
|
|
2966
|
+
/* @__PURE__ */ jsx8("strong", { children: text5(props, "firstTitle", "Easy returns") }),
|
|
2967
|
+
/* @__PURE__ */ jsx8("p", { style: { marginBottom: 0, color: "var(--pb-color-muted)" }, children: text5(props, "firstDescription", "Simple support when plans change.") })
|
|
2824
2968
|
] }),
|
|
2825
2969
|
/* @__PURE__ */ jsxs7("article", { style: { padding: 20, border: "1px solid var(--pb-color-border)", borderRadius: "calc(var(--pb-radius) / 1.5)", background: "var(--pb-color-background)" }, children: [
|
|
2826
|
-
/* @__PURE__ */
|
|
2827
|
-
/* @__PURE__ */
|
|
2970
|
+
/* @__PURE__ */ jsx8("strong", { children: text5(props, "secondTitle", "Secure delivery") }),
|
|
2971
|
+
/* @__PURE__ */ jsx8("p", { style: { marginBottom: 0, color: "var(--pb-color-muted)" }, children: text5(props, "secondDescription", "Follow every milestone in one place.") })
|
|
2828
2972
|
] })
|
|
2829
2973
|
] }) });
|
|
2830
2974
|
}
|
|
2831
2975
|
function SalesProductCategoriesBlock(props) {
|
|
2832
2976
|
const title = text5(props, "heading", "Shop by category");
|
|
2833
2977
|
const runtime = useSalesRuntime();
|
|
2834
|
-
if (props.collection !== void 0 && props.collection !== null && !isShopifyResourceReference(props.collection, "collection")) return /* @__PURE__ */
|
|
2978
|
+
if (props.collection !== void 0 && props.collection !== null && !isShopifyResourceReference(props.collection, "collection")) return /* @__PURE__ */ jsx8(Section, { title, children: /* @__PURE__ */ jsx8(Status, { alert: true, children: "Collection reference is invalid." }) });
|
|
2835
2979
|
const collection = isShopifyResourceReference(props.collection, "collection") ? props.collection : void 0;
|
|
2836
|
-
if (!collection) return /* @__PURE__ */
|
|
2980
|
+
if (!collection) return /* @__PURE__ */ jsx8(Section, { title, children: /* @__PURE__ */ jsx8(Status, { children: "No collection selected. Choose a collection through an authorized resource integration." }) });
|
|
2837
2981
|
const resolved = getResolvedShopifyResource(collection, runtime.resourceResolution);
|
|
2838
2982
|
const error = getShopifyResourceResolutionError(collection, runtime.resourceResolution);
|
|
2839
|
-
if (error) return /* @__PURE__ */
|
|
2840
|
-
if (!resolved) return /* @__PURE__ */
|
|
2983
|
+
if (error) return /* @__PURE__ */ jsx8(Section, { title, children: /* @__PURE__ */ jsx8(Status, { alert: true, children: error.code === "missing" ? "This collection is no longer available." : "Collection details are temporarily unavailable." }) });
|
|
2984
|
+
if (!resolved) return /* @__PURE__ */ jsx8(Section, { title, children: /* @__PURE__ */ jsx8(Status, { children: "Collection details are resolved by the authorized runtime." }) });
|
|
2841
2985
|
const content = /* @__PURE__ */ jsxs7(Fragment5, { children: [
|
|
2842
|
-
/* @__PURE__ */
|
|
2843
|
-
/* @__PURE__ */
|
|
2986
|
+
/* @__PURE__ */ jsx8("span", { children: resolved.title }),
|
|
2987
|
+
/* @__PURE__ */ jsx8("span", { "aria-hidden": "true", children: "\u2192" })
|
|
2844
2988
|
] });
|
|
2845
2989
|
const style = { display: "flex", minHeight: 72, alignItems: "center", justifyContent: "space-between", gap: 16, padding: 18, border: "1px solid var(--pb-color-border)", borderRadius: "calc(var(--pb-radius) / 1.5)", background: "var(--pb-color-background)", color: "inherit", fontWeight: 700, textDecoration: "none" };
|
|
2846
|
-
return /* @__PURE__ */
|
|
2990
|
+
return /* @__PURE__ */ jsx8(Section, { title, children: resolved.href ? /* @__PURE__ */ jsx8("a", { href: resolved.href, style, children: content }) : /* @__PURE__ */ jsx8("div", { style, children: content }) });
|
|
2847
2991
|
}
|
|
2848
2992
|
function SalesFeaturedProductBlock(props) {
|
|
2849
2993
|
const runtime = useSalesRuntime();
|
|
2850
2994
|
const title = text5(props, "heading", "Featured product");
|
|
2851
|
-
if (props.product !== void 0 && props.product !== null && !isShopifyResourceReference(props.product, "product")) return /* @__PURE__ */
|
|
2995
|
+
if (props.product !== void 0 && props.product !== null && !isShopifyResourceReference(props.product, "product")) return /* @__PURE__ */ jsx8(Section, { title, children: /* @__PURE__ */ jsx8(Status, { alert: true, children: "Product reference is invalid." }) });
|
|
2852
2996
|
const product = isShopifyResourceReference(props.product, "product") ? props.product : void 0;
|
|
2853
|
-
if (!product) return /* @__PURE__ */
|
|
2997
|
+
if (!product) return /* @__PURE__ */ jsx8(Section, { title, children: /* @__PURE__ */ jsx8(Status, { children: "No product selected. Choose a product through an authorized resource integration." }) });
|
|
2854
2998
|
const resolved = getResolvedShopifyResource(product, runtime.resourceResolution);
|
|
2855
2999
|
const error = getShopifyResourceResolutionError(product, runtime.resourceResolution);
|
|
2856
|
-
if (error) return /* @__PURE__ */
|
|
2857
|
-
if (!resolved) return /* @__PURE__ */
|
|
3000
|
+
if (error) return /* @__PURE__ */ jsx8(Section, { title, children: /* @__PURE__ */ jsx8(Status, { alert: true, children: error.code === "missing" ? "This product is no longer available." : "Product details are temporarily unavailable." }) });
|
|
3001
|
+
if (!resolved) return /* @__PURE__ */ jsx8(Section, { title, children: /* @__PURE__ */ jsx8(Status, { children: "Product details and availability are resolved by the authorized runtime." }) });
|
|
2858
3002
|
const available = resolved.availability === "available";
|
|
2859
3003
|
const body = /* @__PURE__ */ jsxs7(Fragment5, { children: [
|
|
2860
|
-
/* @__PURE__ */
|
|
3004
|
+
/* @__PURE__ */ jsx8(ProductImage3, { src: resolved.imageUrl, alt: resolved.title }),
|
|
2861
3005
|
/* @__PURE__ */ jsxs7("span", { style: { minWidth: 0, flex: 1 }, children: [
|
|
2862
|
-
/* @__PURE__ */
|
|
2863
|
-
/* @__PURE__ */
|
|
2864
|
-
/* @__PURE__ */
|
|
3006
|
+
/* @__PURE__ */ jsx8("strong", { children: resolved.title }),
|
|
3007
|
+
/* @__PURE__ */ jsx8("br", {}),
|
|
3008
|
+
/* @__PURE__ */ jsx8("small", { style: { color: "var(--pb-color-muted)" }, children: available ? "Available" : resolved.availability === "sold-out" ? "Sold out" : "Unavailable" })
|
|
2865
3009
|
] })
|
|
2866
3010
|
] });
|
|
2867
3011
|
const style = { display: "flex", alignItems: "center", gap: 16, padding: 14, border: "1px solid var(--pb-color-border)", borderRadius: "calc(var(--pb-radius) / 1.5)", background: "var(--pb-color-background)", color: "inherit", textDecoration: "none" };
|
|
2868
|
-
return /* @__PURE__ */
|
|
3012
|
+
return /* @__PURE__ */ jsx8(Section, { title, children: available && resolved.href ? /* @__PURE__ */ jsx8("a", { href: resolved.href, style, children: body }) : /* @__PURE__ */ jsx8("div", { style, children: body }) });
|
|
2869
3013
|
}
|
|
2870
3014
|
function SalesRecommendationsBlock(props) {
|
|
2871
3015
|
const runtime = useSalesRuntime();
|
|
2872
3016
|
const title = text5(props, "heading", "Complete your order");
|
|
2873
|
-
const recommendations =
|
|
2874
|
-
|
|
3017
|
+
const recommendations = recommendationItems(props.products, runtime);
|
|
3018
|
+
if (!recommendations.length) return null;
|
|
3019
|
+
return /* @__PURE__ */ jsx8(Section, { title, children: /* @__PURE__ */ jsx8("div", { style: gridStyle, children: recommendations.map((item) => {
|
|
2875
3020
|
const href = safeHref3(item.href);
|
|
2876
3021
|
const itemTitle = text5(item, "title", "Recommended product");
|
|
2877
|
-
const price =
|
|
3022
|
+
const price = formatRecommendationPrice(item.price);
|
|
2878
3023
|
return /* @__PURE__ */ jsxs7("article", { style: { display: "grid", gap: 14, minWidth: 0, padding: 18, border: "1px solid var(--pb-color-border)", borderRadius: "calc(var(--pb-radius) / 1.5)", background: "var(--pb-color-background)" }, children: [
|
|
2879
|
-
/* @__PURE__ */
|
|
3024
|
+
/* @__PURE__ */ jsx8(ProductImage3, { src: item.imageUrl, alt: itemTitle }),
|
|
2880
3025
|
/* @__PURE__ */ jsxs7("div", { children: [
|
|
2881
|
-
/* @__PURE__ */
|
|
2882
|
-
price
|
|
2883
|
-
item.description ? /* @__PURE__ */
|
|
3026
|
+
/* @__PURE__ */ jsx8("strong", { children: href ? /* @__PURE__ */ jsx8("a", { href, style: { color: "inherit" }, children: itemTitle }) : itemTitle }),
|
|
3027
|
+
price ? /* @__PURE__ */ jsx8("small", { style: { display: "block", marginTop: 5, color: "var(--pb-color-muted)" }, children: price }) : null,
|
|
3028
|
+
item.description ? /* @__PURE__ */ jsx8("p", { style: { marginBottom: 0, color: "var(--pb-color-muted)" }, children: item.description }) : null
|
|
2884
3029
|
] })
|
|
2885
3030
|
] }, item.id);
|
|
2886
|
-
}) })
|
|
3031
|
+
}) }) });
|
|
2887
3032
|
}
|
|
2888
3033
|
|
|
2889
3034
|
// src/shopify-resources.tsx
|
|
2890
|
-
import { createContext as
|
|
2891
|
-
import { jsx as
|
|
2892
|
-
var ShopifyResourceBrowserContext =
|
|
3035
|
+
import { createContext as createContext2, useCallback as useCallback3, useContext as useContext2, useState as useState7 } from "react";
|
|
3036
|
+
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3037
|
+
var ShopifyResourceBrowserContext = createContext2(void 0);
|
|
2893
3038
|
function ShopifyResourcePickerProvider({ browser, children }) {
|
|
2894
|
-
return /* @__PURE__ */
|
|
3039
|
+
return /* @__PURE__ */ jsx9(ShopifyResourceBrowserContext.Provider, { value: browser, children });
|
|
2895
3040
|
}
|
|
2896
3041
|
var pickerSurface = { marginTop: 8, padding: 12, border: "1px solid #c9cccf", borderRadius: 8, background: "#fff", color: "#202223" };
|
|
2897
3042
|
var pickerButton = { minHeight: 32, padding: "6px 10px", border: "1px solid #8c9196", borderRadius: 6, background: "#fff", color: "#202223", font: "inherit", cursor: "pointer" };
|
|
2898
3043
|
function ResourceField({ value, onChange, kind }) {
|
|
2899
|
-
const browser =
|
|
3044
|
+
const browser = useContext2(ShopifyResourceBrowserContext);
|
|
2900
3045
|
const selected = isShopifyResourceReference(value, kind) ? value : void 0;
|
|
2901
|
-
const [open, setOpen] =
|
|
2902
|
-
const [query, setQuery] =
|
|
2903
|
-
const [items, setItems] =
|
|
2904
|
-
const [cursor, setCursor] =
|
|
2905
|
-
const [state, setState] =
|
|
2906
|
-
const search =
|
|
3046
|
+
const [open, setOpen] = useState7(false);
|
|
3047
|
+
const [query, setQuery] = useState7("");
|
|
3048
|
+
const [items, setItems] = useState7([]);
|
|
3049
|
+
const [cursor, setCursor] = useState7();
|
|
3050
|
+
const [state, setState] = useState7("idle");
|
|
3051
|
+
const search = useCallback3(async (nextQuery, nextCursor, append = false) => {
|
|
2907
3052
|
if (!browser) return;
|
|
2908
3053
|
setState("loading");
|
|
2909
3054
|
try {
|
|
@@ -2919,15 +3064,15 @@ function ResourceField({ value, onChange, kind }) {
|
|
|
2919
3064
|
const name = kind === "product" ? "product" : "collection";
|
|
2920
3065
|
return /* @__PURE__ */ jsxs8("div", { "data-shopify-resource-field": kind, children: [
|
|
2921
3066
|
selected ? /* @__PURE__ */ jsxs8("p", { style: { margin: "0 0 8px" }, children: [
|
|
2922
|
-
/* @__PURE__ */
|
|
2923
|
-
/* @__PURE__ */
|
|
2924
|
-
/* @__PURE__ */
|
|
3067
|
+
/* @__PURE__ */ jsx9("strong", { children: selected.title }),
|
|
3068
|
+
/* @__PURE__ */ jsx9("br", {}),
|
|
3069
|
+
/* @__PURE__ */ jsx9("small", { children: selected.id })
|
|
2925
3070
|
] }) : /* @__PURE__ */ jsxs8("p", { style: { margin: "0 0 8px" }, children: [
|
|
2926
3071
|
"No ",
|
|
2927
3072
|
name,
|
|
2928
3073
|
" selected."
|
|
2929
3074
|
] }),
|
|
2930
|
-
/* @__PURE__ */
|
|
3075
|
+
/* @__PURE__ */ jsx9("button", { type: "button", style: pickerButton, onClick: () => {
|
|
2931
3076
|
if (open) {
|
|
2932
3077
|
setOpen(false);
|
|
2933
3078
|
return;
|
|
@@ -2945,32 +3090,32 @@ function ResourceField({ value, onChange, kind }) {
|
|
|
2945
3090
|
"Search ",
|
|
2946
3091
|
name,
|
|
2947
3092
|
"s",
|
|
2948
|
-
/* @__PURE__ */
|
|
3093
|
+
/* @__PURE__ */ jsx9("input", { "aria-label": `Search ${name}s`, value: query, onChange: (event) => setQuery(event.currentTarget.value), style: { boxSizing: "border-box", display: "block", width: "100%", minHeight: 32, marginTop: 4, padding: "6px 8px" } })
|
|
2949
3094
|
] }),
|
|
2950
|
-
/* @__PURE__ */
|
|
3095
|
+
/* @__PURE__ */ jsx9("button", { type: "submit", disabled: state === "loading", style: { ...pickerButton, marginTop: 8 }, children: state === "loading" ? "Searching\u2026" : "Search" })
|
|
2951
3096
|
] }),
|
|
2952
|
-
state === "error" ? /* @__PURE__ */
|
|
3097
|
+
state === "error" ? /* @__PURE__ */ jsx9("p", { role: "alert", children: "The authorized resource service is unavailable. Try again later." }) : null,
|
|
2953
3098
|
state === "idle" && !items.length ? /* @__PURE__ */ jsxs8("p", { role: "status", children: [
|
|
2954
3099
|
"No ",
|
|
2955
3100
|
name,
|
|
2956
3101
|
"s found."
|
|
2957
3102
|
] }) : null,
|
|
2958
|
-
items.length ? /* @__PURE__ */
|
|
3103
|
+
items.length ? /* @__PURE__ */ jsx9("ul", { style: { display: "grid", gap: 6, margin: "12px 0", padding: 0, listStyle: "none" }, children: items.map((item) => /* @__PURE__ */ jsx9("li", { children: /* @__PURE__ */ jsxs8("button", { type: "button", style: { ...pickerButton, width: "100%", textAlign: "left" }, onClick: () => {
|
|
2959
3104
|
onChange(item);
|
|
2960
3105
|
setOpen(false);
|
|
2961
3106
|
}, children: [
|
|
2962
|
-
/* @__PURE__ */
|
|
2963
|
-
item.handle ? /* @__PURE__ */
|
|
3107
|
+
/* @__PURE__ */ jsx9("strong", { children: item.title }),
|
|
3108
|
+
item.handle ? /* @__PURE__ */ jsx9("small", { style: { display: "block" }, children: item.handle }) : null
|
|
2964
3109
|
] }) }, item.id)) }) : null,
|
|
2965
|
-
cursor ? /* @__PURE__ */
|
|
3110
|
+
cursor ? /* @__PURE__ */ jsx9("button", { type: "button", disabled: state === "loading", style: pickerButton, onClick: () => void search(query, cursor, true), children: "Load more" }) : null
|
|
2966
3111
|
] }) : null
|
|
2967
3112
|
] });
|
|
2968
3113
|
}
|
|
2969
3114
|
function ShopifyProductResourceField(props) {
|
|
2970
|
-
return /* @__PURE__ */
|
|
3115
|
+
return /* @__PURE__ */ jsx9(ResourceField, { ...props, kind: "product" });
|
|
2971
3116
|
}
|
|
2972
3117
|
function ShopifyCollectionResourceField(props) {
|
|
2973
|
-
return /* @__PURE__ */
|
|
3118
|
+
return /* @__PURE__ */ jsx9(ResourceField, { ...props, kind: "collection" });
|
|
2974
3119
|
}
|
|
2975
3120
|
|
|
2976
3121
|
// src/sales-definition.ts
|
|
@@ -3020,13 +3165,14 @@ var salesBlocks = withTemplatePolicy3([
|
|
|
3020
3165
|
{ type: "besttrack.sales.service-cards", version: 1, label: "Service cards", category: "BestTrack Sales", targets: ["web"], defaultProps: { heading: "Shop with confidence", firstTitle: "Easy returns", firstDescription: "Simple support when plans change.", secondTitle: "Secure delivery", secondDescription: "Follow every milestone in one place." }, defaultVariant: "hero", variants: [{ id: "hero", label: "Sales Hero" }, { id: "commerce", label: "Commerce" }], fields: { heading: shortText("Heading"), firstTitle: shortText("First card title"), firstDescription: longText("First card description"), secondTitle: shortText("Second card title"), secondDescription: longText("Second card description") }, validate: textProps([["heading", 120], ["firstTitle", 120], ["firstDescription", 280], ["secondTitle", 120], ["secondDescription", 280]]), render: { web: SalesServiceCardsBlock, editor: SalesServiceCardsEditor } },
|
|
3021
3166
|
{ type: "besttrack.sales.product-categories", version: 3, label: "Product categories", category: "BestTrack Sales", targets: ["web"], defaultProps: { heading: "Shop by category", collection: { id: "gid://shopify/Collection/1", kind: "collection", title: "Featured collection", handle: "featured" } }, defaultVariant: "hero", variants: [{ id: "hero", label: "Sales Hero" }, { id: "commerce", label: "Commerce" }, { id: "grid", label: "Grid", theme: { "color.surface": "#f8fafc" } }], fields: { heading: shortText("Heading"), collection: { field: "besttrack.shopify.collection", label: "Collection", group: "Resource", description: "Browse through an authorized host integration. Only a stable ID and minimal display copy are saved." } }, validate: validateCategories, render: { web: SalesProductCategoriesBlock, editor: SalesProductCategoriesEditor } },
|
|
3022
3167
|
{ type: "besttrack.sales.featured-product", version: 1, label: "Featured product", category: "BestTrack Sales", targets: ["web"], defaultProps: { heading: "Featured product", product: { id: "gid://shopify/Product/1", kind: "product", title: "Featured product", handle: "featured-product" } }, defaultVariant: "hero", variants: [{ id: "hero", label: "Sales Hero" }, { id: "commerce", label: "Commerce" }], fields: { heading: shortText("Heading"), product: { field: "besttrack.shopify.product", label: "Product", group: "Resource", description: "Browse through an authorized host integration. Current availability is resolved only at runtime." } }, validate: validateFeaturedProduct, render: { web: SalesFeaturedProductBlock, editor: SalesFeaturedProductEditor } },
|
|
3023
|
-
|
|
3024
|
-
|
|
3168
|
+
// 与另外两套模板一样保存商家选品配置;空数组表示交给独立推荐来源,不能改读查单推荐。
|
|
3169
|
+
{ type: "besttrack.sales.recommendations", version: 1, label: "Recommended products", category: "BestTrack Sales", targets: ["web"], defaultProps: { heading: "Complete your order", products: [] }, defaultVariant: "hero", variants: [{ id: "hero", label: "Sales Hero" }, { id: "commerce", label: "Commerce" }, { id: "grid", label: "Product grid", theme: { "color.surface": "#f8fafc" } }], fields: { heading: shortText("Heading"), products: { field: "besttrack.sales.products", label: "\u63A8\u8350\u5546\u54C1 (Shopify)", control: "products", group: "Content" } }, validate: textProps([["heading", 120]]), render: { web: SalesRecommendationsBlock, editor: SalesRecommendationsEditor } }
|
|
3170
|
+
], ["besttrack.sales.announcement", "besttrack.sales.query", "besttrack.sales.order-items", "besttrack.sales.other-tracking", "besttrack.sales.recommendations"]);
|
|
3025
3171
|
var salesTemplatePolicy = defineTemplatePolicy(
|
|
3026
3172
|
"besttrack.sales",
|
|
3027
3173
|
"Sales",
|
|
3028
3174
|
salesBlocks.map((block) => block.type),
|
|
3029
|
-
["besttrack.sales.announcement", "besttrack.sales.query"]
|
|
3175
|
+
["besttrack.sales.announcement", "besttrack.sales.query", "besttrack.sales.order-items", "besttrack.sales.other-tracking", "besttrack.sales.recommendations"]
|
|
3030
3176
|
);
|
|
3031
3177
|
function createSalesTemplate() {
|
|
3032
3178
|
return { id: "besttrack.sales", version: 3, name: "Sales", target: "web", source: "built-in", requiredBlocks: salesBlocks.map((block) => block.type), theme: { "color.primary": "#000000", "color.background": "#f7f5f0", "color.surface": "#ffffff", "color.text": "#0a0a0a", "color.muted": "#6b6b6b", "color.border": "#dfddd7", "font.family": "Arial, Helvetica, sans-serif", radius: "10px", spacing: "24px" }, create: () => createPageDocument3({ pageId: "besttrack-sales", target: "web", templateId: "besttrack.sales", templateVersion: 3, settings: { locale: "en", seoTitle: "Shop and track your order" }, blocks: salesBlocks.map((block, index) => ({ id: "sales-" + (index + 1), type: block.type, version: block.version, props: block.defaultProps, variant: block.defaultVariant, style: {} })) }) };
|
|
@@ -3034,13 +3180,14 @@ function createSalesTemplate() {
|
|
|
3034
3180
|
var bestTrackSalesExtension = Object.freeze({ name: "besttrack.sales", version: "0.8.0", fields: [{ type: "besttrack.sales.text", component: SalesTextField }, { type: "besttrack.shopify.collection", component: ShopifyCollectionResourceField }, { type: "besttrack.shopify.product", component: ShopifyProductResourceField }], blocks: salesBlocks, templates: [createSalesTemplate()] });
|
|
3035
3181
|
export {
|
|
3036
3182
|
BrandedRuntimeProvider,
|
|
3037
|
-
ReadyToGoRuntimeProvider,
|
|
3183
|
+
TrackingRuntimeProvider as ReadyToGoRuntimeProvider,
|
|
3038
3184
|
SHOPIFY_RECOMMEND_PATH,
|
|
3039
3185
|
SHOPIFY_TRACK_QUERY_PATH,
|
|
3040
3186
|
SalesRuntimeProvider,
|
|
3041
3187
|
ShopifyCollectionResourceField,
|
|
3042
3188
|
ShopifyProductResourceField,
|
|
3043
3189
|
ShopifyResourcePickerProvider,
|
|
3190
|
+
TrackingRuntimeProvider,
|
|
3044
3191
|
bestTrackBrandedExtension,
|
|
3045
3192
|
bestTrackPageExtension,
|
|
3046
3193
|
bestTrackSalesExtension,
|
|
@@ -3074,6 +3221,7 @@ export {
|
|
|
3074
3221
|
salesTemplatePolicy,
|
|
3075
3222
|
shouldHidePoweredBy,
|
|
3076
3223
|
syncTrackingQueryToUrl,
|
|
3224
|
+
useTrackingRuntime,
|
|
3077
3225
|
withShopifyAppProxyPrefix,
|
|
3078
3226
|
withShopifyTrackCacheBust
|
|
3079
3227
|
};
|