UNPKG

@contentstack/live-preview-utils

Version:

Contentstack provides the Live Preview SDK to establish a communication channel between the various Contentstack SDKs and your website, transmitting live changes to the preview pane.

37 lines (34 loc) 2.06 kB
import { ISchemaFieldMap } from './types/index.types.cjs'; import { FieldDetails } from '../components/FieldToolbar.cjs'; import { EntryPermissions } from './getEntryPermissions.cjs'; import { WorkflowStageDetails } from './getWorkflowStageDetails.cjs'; import { ResolvedVariantPermissions } from './getResolvedVariantPermissions.cjs'; import '../../cms/types/contentTypeSchema.types.cjs'; import '../types/visualBuilder.types.cjs'; import '../../cslp/types/cslp.types.cjs'; declare const DisableReason: { readonly ReadOnly: "You have only read access to this field"; readonly LocalizedEntry: "Editing this field is restricted in localized entries"; readonly ResolvedVariantPermissions: "This field does not exist in the selected variant"; readonly UnlinkedVariant: "This field is not editable as it is not linked to the selected variant."; readonly CanLinkVariant: "Click here to link a variant"; readonly UnderlinedAndClickableWord: "here"; readonly CannotLinkVariant: "Contact your stack admin or owner to link it."; readonly AudienceMode: "To edit an experience, open the Audience widget and click the Edit icon."; readonly DisabledVariant: "This field is not editable as it doesn't match the selected variant"; readonly UnlocalizedVariant: "This field is not editable as it is not localized"; readonly None: ""; readonly EntryUpdateRestricted: "You do not have permission to edit this entry"; readonly WorkflowStagePermission: ({ stageName }: { stageName: string; }) => string; readonly EntryUpdateRestrictedRoleAndWorkflowStage: ({ stageName, }: { stageName: string; }) => string; }; interface FieldDisableState { isDisabled: boolean; reason: string; } declare const isFieldDisabled: (fieldSchemaMap: ISchemaFieldMap, eventFieldDetails: FieldDetails, resolvedVariantPermissions?: ResolvedVariantPermissions, entryPermissions?: EntryPermissions, entryWorkflowStageDetails?: WorkflowStageDetails) => FieldDisableState; export { DisableReason, isFieldDisabled };