
    +dI                     B    d dl ZddlmZ ddlmZ  G d de          ZdS )    N   )pretty_describe   )BaseViewc                   n     e Zd ZdZdZd fd	Zd Zej        j	        d             Ze
d             Z xZS )Descriptiona  
    Class for displaying a textual description of a data source.

    Parameters
    ----------
    source: intake catalog entry, or list of same
        source to describe in this object

    Attributes
    ----------
    contents: str
        string representation of the source's description
    label: str
        label to display at top of panel - contains name of source
    children: list of panel objects
        children that will be used to populate the panel when visible
    panel: panel layout object
        instance of a panel layout (row or column) that contains children
        when visible
    watchers: list of param watchers
        watchers that are set on children - cleaned up when visible
        is set to false.
    Nc                     || _         t          j        dddddd          | _         t	                      j        di | d S )	Nr   maxr      stretch_widthT)namewidth_policymarginheightsizing_modescroll )sourcepnColumnpanelsuper__init__)selfr   kwargs	__class__s      Clib/python3.11/site-packages/intake/interface/source/description.pyr   zDescription.__init__(   s[    YMaX[ix  BF  G  G  G
""6"""""    c                 r    t           j                            | j                  | _        | j        g| _        d S N)r   paneMarkdowncontents	main_panechildren)r   s    r   setupzDescription.setup-   s+    ))$-88(r   c                     t           j                            | |           | j        r&d                    | j                  | j        _        dS dS )z4When the source gets updated, update the pane objectz```yaml
{}
```N)r   r   fsetr$   formatr#   object)r   r   s     r   r   zDescription.source1   sS     	T6***> 	Q$:$A$A$-$P$PDN!!!	Q 	Qr   c                 d    | j         sdS | j                                        }t          |          S )z1String representation of the source's descriptionu`   name: ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀)_sourcer   describer   )r   r#   s     r   r#   zDescription.contents8   s5     | 	)((;''))x(((r   r    )__name__
__module____qualname____doc__r$   r   r&   r   r   setterpropertyr#   __classcell__)r   s   @r   r   r      s         0 I# # # # # #
) ) ) _Q Q Q ) ) X) ) ) ) )r   r   )r   r   utilsr   baser   r   r   r   r   <module>r7      sk        $ $ $ $ $ $      1) 1) 1) 1) 1)( 1) 1) 1) 1) 1)r   