Files
klz-cables.com/.pnpm-store/v10/files/08/022519ad834462833851b7b78f93d5953b2ac1a6d06bf7b340ec013bbbadaa4c027c9a7419b2828a569afa396e6a3d4f5d4308fc8957f855041113ca635e5c
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

75 lines
1.9 KiB
Plaintext

'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
import { FieldDiffContainer, getHTMLDiffComponents, useConfig, useTranslation } from '@payloadcms/ui';
import { formatDate } from '@payloadcms/ui/shared';
import React from 'react';
const baseClass = 'date-diff';
export const DateDiffComponent = t0 => {
const $ = _c(7);
const {
comparisonValue: valueFrom,
field,
locale,
nestingLevel,
versionValue: valueTo
} = t0;
const {
i18n
} = useTranslation();
const {
config: t1
} = useConfig();
const {
admin: t2
} = t1;
const {
dateFormat
} = t2;
const formattedFromDate = valueFrom ? formatDate({
date: typeof valueFrom === "string" ? new Date(valueFrom) : valueFrom,
i18n,
pattern: dateFormat
}) : "";
const formattedToDate = valueTo ? formatDate({
date: typeof valueTo === "string" ? new Date(valueTo) : valueTo,
i18n,
pattern: dateFormat
}) : "";
const t3 = `<div class="${baseClass}" data-enable-match="true" data-date="${formattedFromDate}"><p>` + formattedFromDate + "</p></div>";
const t4 = `<div class="${baseClass}" data-enable-match="true" data-date="${formattedToDate}"><p>` + formattedToDate + "</p></div>";
let t5;
if ($[0] !== field.label || $[1] !== i18n || $[2] !== locale || $[3] !== nestingLevel || $[4] !== t3 || $[5] !== t4) {
const {
From,
To
} = getHTMLDiffComponents({
fromHTML: t3,
toHTML: t4,
tokenizeByCharacter: false
});
t5 = _jsx(FieldDiffContainer, {
className: baseClass,
From,
i18n,
label: {
label: field.label,
locale
},
nestingLevel,
To
});
$[0] = field.label;
$[1] = i18n;
$[2] = locale;
$[3] = nestingLevel;
$[4] = t3;
$[5] = t4;
$[6] = t5;
} else {
t5 = $[6];
}
return t5;
};
//# sourceMappingURL=index.js.map