Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
@@ -6,6 +6,7 @@
|
||||
* leads/export.ts` so the admin-UI download and the `hivegrid-cli leads
|
||||
* export` operator-side dump are byte-compatible.
|
||||
*/
|
||||
import { neutralizeSpreadsheetFormula } from "@hivegrid/foundation/spreadsheet-safety";
|
||||
|
||||
export const LEAD_CSV_COLUMNS = [
|
||||
"id",
|
||||
@@ -38,11 +39,11 @@ export type LeadCsvRow = {
|
||||
|
||||
export function escapeCsvValue(value: unknown): string {
|
||||
if (value === null || value === undefined) return "";
|
||||
const raw = value instanceof Date ? value.toISOString() : String(value);
|
||||
if (/[",\n\r]/.test(raw)) {
|
||||
return `"${raw.replace(/"/g, '""')}"`;
|
||||
const safeValue = neutralizeSpreadsheetFormula(value instanceof Date ? value.toISOString() : String(value));
|
||||
if (/[",\n\r]/.test(safeValue)) {
|
||||
return `"${safeValue.replace(/"/g, '""')}"`;
|
||||
}
|
||||
return raw;
|
||||
return safeValue;
|
||||
}
|
||||
|
||||
export function serializeLeadsCsv(rows: ReadonlyArray<LeadCsvRow>): string {
|
||||
|
||||
Reference in new issue
Block a user