UNPKG

sanity-plugin-spreadsheet-wizard

Version:

Spreadsheet Wizard is a magnificient Sanity plugin that help you EXPORT & IMPORT spreadsheets. A fantastic bridge between Sanity & your spreadsheet software of choice. (Google Sheets... Excel... Numbers etc.)

47 lines (42 loc) 938 B
import config from "config:spreadsheet-wizard"; export const ACCEPTED_TYPES = [ { name: "string" }, { name: "number" }, { name: "boolean", empty: "" }, { name: "date" }, { name: "datetime" }, { name: "text", isJson: true, empty: "" }, { name: "array", isJson: true, empty: [] }, { name: "image", isJson: true, empty: {} }, { name: "slug", query: "current", structure: { type: "_slug", value: { name: "current" } }, }, ...(config?.ACCEPTED_TYPES || []), ]; export const SANITY_META_TYPES = [ { name: "_id", required: true, }, { name: "_createdAt", }, { name: "_rev", }, { name: "_type", required: true, }, { name: "_updatedAt", }, ]; export const screenTypes = { BEGIN: "begin", IMPORT: "import", EXPORT: "export", }; export const CSV_TOOLS_DELIMETER = "\t";