@twotaps/site-utils
Advanced tools
Comparing version 0.0.28 to 0.0.29
@@ -73,6 +73,2 @@ import { Client } from "@urql/core"; | ||
} | ||
else if (field.type === TTSchemaFieldType.Text) { | ||
curFlattenedProps[field.name] = field.hasMultipleValues ? prop.value : prop.value[0]; | ||
// If the field is Schema type, recursively add | ||
} | ||
else if (field.type === TTSchemaFieldType.Schema) { | ||
@@ -189,11 +185,17 @@ let schema = schemas.find((_schema) => _schema.id === field.typeTTSchema.id); | ||
const { publishedRevision, ...rest } = page; | ||
let schema = publishedRevision.schema.reduce((accum, current) => { | ||
return ([...accum, { | ||
...current.ttschema, | ||
id: current.id, | ||
ttschemaId: current.ttschema.id, | ||
sortOrder: current.sortOrder, | ||
properties: propertyMapping(current.properties, current.ttschema.fields, current.ttschema.subSchemas), | ||
}]); | ||
}, []); | ||
let schema; | ||
if (publishedRevision) { | ||
schema = publishedRevision.schema.reduce((accum, current) => { | ||
return ([...accum, { | ||
...current.ttschema, | ||
id: current.id, | ||
ttschemaId: current.ttschema.id, | ||
sortOrder: current.sortOrder, | ||
properties: propertyMapping(current.properties, current.ttschema.fields, current.ttschema.subSchemas), | ||
}]); | ||
}, []); | ||
} | ||
else { | ||
schema = []; | ||
} | ||
return { | ||
@@ -200,0 +202,0 @@ ...rest, |
{ | ||
"name": "@twotaps/site-utils", | ||
"version": "0.0.28", | ||
"version": "0.0.29", | ||
"description": "This package provides helper code for building twotaps public sites", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
602
0
24357