@contentful/contentful-slatejs-adapter
Advanced tools
Comparing version 15.17.5 to 15.18.0
@@ -94,3 +94,2 @@ 'use strict'; | ||
var root = Object.values(Contentful.BLOCKS).includes(node.nodeType) ? 'blocks' : 'inlines'; | ||
// tslint:disable-next-line | ||
return (_c = (_b = (_a = schema === null || schema === void 0 ? void 0 : schema[root]) === null || _a === void 0 ? void 0 : _a[node.nodeType]) === null || _b === void 0 ? void 0 : _b['isVoid']) !== null && _c !== void 0 ? _c : false; | ||
@@ -185,8 +184,8 @@ }, | ||
function convertText(node) { | ||
node.text; node.data; var marks = __rest(node, ["text", "data"]); | ||
var text = node.text, data = node.data, marks = __rest(node, ["text", "data"]); | ||
return { | ||
nodeType: 'text', | ||
value: node.text, | ||
value: text, | ||
marks: getMarkList(marks), | ||
data: getDataOrDefault(node.data), | ||
data: getDataOrDefault(data), | ||
}; | ||
@@ -193,0 +192,0 @@ } |
var _a; | ||
import * as Contentful from '@contentful/rich-text-types'; | ||
import toSlatejsDocument from '../contentful-to-slatejs-adapter'; | ||
import toContentfulDocument from '../slatejs-to-contentful-adapter'; | ||
import * as contentful from './contentful-helpers'; | ||
import * as Contentful from '@contentful/rich-text-types'; | ||
var schema = { blocks: (_a = {}, _a[Contentful.BLOCKS.EMBEDDED_ENTRY] = { isVoid: true }, _a) }; | ||
@@ -7,0 +7,0 @@ describe('both adapters (roundtrippable cases)', function () { |
@@ -22,3 +22,2 @@ import { BLOCKS, TEXT_CONTAINERS } from '@contentful/rich-text-types'; | ||
var root = Object.values(BLOCKS).includes(node.nodeType) ? 'blocks' : 'inlines'; | ||
// tslint:disable-next-line | ||
return (_c = (_b = (_a = schema === null || schema === void 0 ? void 0 : schema[root]) === null || _a === void 0 ? void 0 : _a[node.nodeType]) === null || _b === void 0 ? void 0 : _b['isVoid']) !== null && _c !== void 0 ? _c : false; | ||
@@ -25,0 +24,0 @@ }, |
@@ -12,5 +12,5 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
}; | ||
import * as Contentful from '@contentful/rich-text-types'; | ||
import { getDataOrDefault } from './helpers'; | ||
import { fromJSON } from './schema'; | ||
import * as Contentful from '@contentful/rich-text-types'; | ||
export default function toContentfulDocument(_a) { | ||
@@ -56,5 +56,5 @@ var document = _a.document, schema = _a.schema; | ||
nodeType: 'text', | ||
value: node.text, | ||
value: text, | ||
marks: getMarkList(marks), | ||
data: getDataOrDefault(node.data), | ||
data: getDataOrDefault(data), | ||
}; | ||
@@ -61,0 +61,0 @@ } |
"use strict"; | ||
/* eslint-disable */ | ||
//# sourceMappingURL=slate.js.map |
@@ -0,3 +1,3 @@ | ||
import * as Contentful from '@contentful/rich-text-types'; | ||
import { SchemaJSON } from './schema'; | ||
import * as Contentful from '@contentful/rich-text-types'; | ||
import { SlateNode } from './types'; | ||
@@ -4,0 +4,0 @@ export interface ToSlatejsDocumentProperties { |
@@ -0,3 +1,3 @@ | ||
import * as Contentful from '@contentful/rich-text-types'; | ||
import { SchemaJSON } from './schema'; | ||
import * as Contentful from '@contentful/rich-text-types'; | ||
import { SlateNode } from './types'; | ||
@@ -4,0 +4,0 @@ export interface ToContentfulDocumentProperties { |
{ | ||
"name": "@contentful/contentful-slatejs-adapter", | ||
"version": "15.17.5", | ||
"version": "15.18.0", | ||
"description": "", | ||
@@ -21,3 +21,2 @@ "keywords": [], | ||
"scripts": { | ||
"lint": "tslint -t codeFrame 'src/**/*.ts' 'test/**/*.ts'", | ||
"prebuild": "rimraf dist", | ||
@@ -32,3 +31,3 @@ "build": "tsc && rollup -c --bundleConfigAsCjs rollup.config.ts", | ||
"dependencies": { | ||
"@contentful/rich-text-types": "^16.5.4" | ||
"@contentful/rich-text-types": "^16.6.0" | ||
}, | ||
@@ -52,3 +51,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "caf897d8199f4686de5db7f52eef06008fbd0f65" | ||
"gitHead": "20be31a63585be2d76e2e29c9fd6b66978e5113d" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
75926
1087