/** * ContentStatuses Component * * Renders a collection of status indicators for a content node in Jahia's jContent application. * The component displays visual badges/chips representing various states of the content such as * publication status, locks, work-in-progress, translations, and more. * @see {@link useContentStatuses} for different status types this component can render * * @component * @example * // Basic usage with default statuses * * * @example * // Custom rendered statuses with labels disabled * * * @example * // With custom styling and status-specific props * * * @param {Object} props - Component props * @param {Object} props.node - The content node object containing all necessary metadata * @param {string} props.language - Content language code (e.g., 'en', 'fr') * @param {string} props.uilang - User interface language code for displaying tooltips * @param {boolean} [props.isDisabled=false] - Whether status badges should be disabled/non-interactive * @param {string} [props.className] - Additional CSS class name to apply to the container * @param {boolean} [props.hasLabel=true] - Whether to display text labels alongside status icons * @param {Object} [props.statusProps] - Object containing props to override status props for specific status types. * @param {Object} props...rest - Additional props for Status components * * @returns {React.JSX.Element|null} A div containing Status components, or null if no statuses are active * * @see {@link useContentStatuses} - Hook used internally to compute statuses * @see {@link Status} - Individual status component */ export function ContentStatuses({ node, isDisabled, language, uilang, renderedStatuses, className, hasLabel, statusProps, ...props }: { node: any; language: string; uilang: string; isDisabled?: boolean; className?: string; hasLabel?: boolean; statusProps?: any; }): React.JSX.Element | null; export namespace ContentStatuses { namespace propTypes { let node: PropTypes.Validator; existsInLive: PropTypes.Requireable; }>>; deleted: PropTypes.Requireable; }>>; deletedBy: PropTypes.Requireable; }>>; lastModified: PropTypes.Requireable; }>>; lastModifiedBy: PropTypes.Requireable; }>>; lastPublished: PropTypes.Requireable; }>>; lastPublishedBy: PropTypes.Requireable; }>>; lockOwner: PropTypes.Requireable; }>>; mixinTypes: PropTypes.Requireable; }>[]>; wipStatus: PropTypes.Requireable; }>>; wipLangs: PropTypes.Requireable; }>>; translationLanguages: PropTypes.Requireable; ancestors: PropTypes.Requireable; }>>; deletedBy: PropTypes.Requireable; }>>; }>[]>; }>>>; let language: PropTypes.Validator; let uilang: PropTypes.Validator; let isDisabled: PropTypes.Requireable; let renderedStatuses: PropTypes.Requireable; let className: PropTypes.Requireable; let hasLabel: PropTypes.Requireable; let statusProps: PropTypes.Requireable; } namespace defaultProps { let isDisabled_1: boolean; export { isDisabled_1 as isDisabled }; let hasLabel_1: boolean; export { hasLabel_1 as hasLabel }; let renderedStatuses_1: string[]; export { renderedStatuses_1 as renderedStatuses }; } } /** * Custom hook to compute all available status flags for a content node. * * @param {Object} params - Hook parameters * @param {Object} params.node - The content node to evaluate * @param {string} params.language - The language code to evaluate statuses for * @returns {Object} Object containing boolean flags for each possible status: * - locked: Whether the node is locked by a user * - markedForDeletion: Whether the node or its ancestor is marked for deletion * - modified: Whether the node has unpublished modifications * - published: Whether the node is published in live * - notPublished: Whether the node is not published * - warning: Whether there are publication warnings * - workInProgress: Whether the node is in work-in-progress status * - notVisible: Whether the node is not visible in the current language * - noTranslation: Whether the node lacks translation in the current language * - permissions: Whether the node has specific permissions set * - visibilityConditions: Whether the node has visibility/channel conditions * - usagesCount: Number of times the node is referenced */ export function useContentStatuses({ node, language }: { node: any; language: string; }): any; import React from 'react'; import PropTypes from 'prop-types';