@contentful/live-preview
Advanced tools
Comparing version 2.10.1 to 2.11.0
import { Argument } from '../types'; | ||
type ValidationResult = ({ | ||
isValid: true; | ||
sysId: string; | ||
} | { | ||
isValid: false; | ||
sysId: string | null; | ||
}) & { | ||
isGQL: boolean; | ||
isREST: boolean; | ||
}; | ||
/** | ||
@@ -6,7 +16,3 @@ * **Basic** validating of the subscribed data | ||
*/ | ||
export declare function validateDataForLiveUpdates(data: Argument): { | ||
isGQL: boolean; | ||
isREST: boolean; | ||
sysId: string | null; | ||
isValid: boolean; | ||
}; | ||
export declare function validateDataForLiveUpdates(data: Argument): ValidationResult; | ||
export {}; |
import { type DocumentNode } from 'graphql'; | ||
import { InspectorMode } from './inspectorMode'; | ||
import { LiveUpdates } from './liveUpdates'; | ||
import { SaveEvent } from './saveEvent'; | ||
import { Argument, InspectorModeTags, LivePreviewProps, SubscribeCallback } from './types'; | ||
@@ -21,2 +22,3 @@ export interface ContentfulLivePreviewInitConfig { | ||
static liveUpdates: LiveUpdates | null; | ||
static saveEvent: SaveEvent | null; | ||
static inspectorModeEnabled: boolean; | ||
@@ -27,2 +29,4 @@ static liveUpdatesEnabled: boolean; | ||
static subscribe(config: ContentfulSubscribeConfig): VoidFunction; | ||
static subscribe(event: 'save', config: Pick<ContentfulSubscribeConfig, 'callback'>): VoidFunction; | ||
static subscribe(event: 'edit', config: ContentfulSubscribeConfig): VoidFunction; | ||
static getProps({ fieldId, entryId, locale }: LivePreviewProps): InspectorModeTags; | ||
@@ -32,4 +36,8 @@ static toggleInspectorMode(): boolean; | ||
static openEntryInEditor({ fieldId, entryId, locale }: LivePreviewProps): void; | ||
/** | ||
* Returns a list of tagged entries on the page | ||
*/ | ||
static getEntryList(): string[]; | ||
} | ||
export { LIVE_PREVIEW_EDITOR_SOURCE, LIVE_PREVIEW_SDK_SOURCE } from './constants'; | ||
export * from './messages'; |
@@ -1,2 +0,2 @@ | ||
import { C as t, L as o, a as E, b as a, P as i, o as r } from "./index-2522e65b.js"; | ||
import { C as t, L as o, a as E, b as a, P as i, o as r } from "./index-67fc7a3c.js"; | ||
export { | ||
@@ -3,0 +3,0 @@ t as ContentfulLivePreview, |
@@ -69,2 +69,3 @@ import type { RequestEntitiesMessage, RequestedEntitiesMessage } from '@contentful/visual-sdk'; | ||
locale: string; | ||
event: 'edit' | 'save'; | ||
}; | ||
@@ -71,0 +72,0 @@ export type ErrorMessage = { |
import Zr, { createContext as At, useRef as mr, useMemo as $r, useEffect as jt, useState as Dt, useContext as Qr, useCallback as It } from "react"; | ||
import { c as Er, g as Ft, C as Ur, d as Lt } from "./index-2522e65b.js"; | ||
import { c as Er, g as Ft, C as Ur, d as Lt } from "./index-67fc7a3c.js"; | ||
var Mr = { exports: {} }, Me = {}; | ||
@@ -4,0 +4,0 @@ /** |
@@ -86,2 +86,3 @@ import type { Asset, Entry } from 'contentful'; | ||
gqlParams?: GraphQLParams; | ||
sysId: string; | ||
} |
{ | ||
"name": "@contentful/live-preview", | ||
"version": "2.10.1", | ||
"version": "2.11.0", | ||
"author": "Contentful GmbH", | ||
@@ -80,3 +80,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "8d765d65764176ec8962e99372b9201570adb276" | ||
"gitHead": "1408ec6089a6f2bf35d8f60b4819c7ffc6cf1d04" | ||
} |
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
732014
44
3482