Warning: chmod(): No such file or directory in /www/wwwroot/scuipturepactory.com/wp-content/mu-plugins/worksec.php on line 7
Uname:Linux iZt4n9czhka2zvqfajdlr2Z 6.8.0-63-generic #66-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 13 20:25:30 UTC 2025 x86_64

Base Dir : /www/wwwroot/scuipturepactory.com

User : www


403WebShell
403Webshell
Server IP : 47.82.179.145  /  Your IP : 216.73.217.129
Web Server : nginx/1.26.3
System : Linux iZt4n9czhka2zvqfajdlr2Z 6.8.0-63-generic #66-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 13 20:25:30 UTC 2025 x86_64
User : www ( 1001)
PHP Version : 8.3.30
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/scuipturepactory.com/wp-content/plugins.off/latepoint/blocks/src/calendar/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/scuipturepactory.com/wp-content/plugins.off/latepoint/blocks/src/calendar/edit.js
/**
 * WordPress components that create the necessary UI elements for the block
 *
 * @see https://developer.wordpress.org/block-editor/packages/packages-components/
 */
import {TextControl, SelectControl, Panel, PanelBody, PanelRow} from '@wordpress/components';
import {__} from '@wordpress/i18n';

/**
 * React hook that is used to mark the block wrapper element.
 * It provides all the necessary props like the class name.
 *
 * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops
 */
import {
    useBlockProps,
    InspectorControls,
} from '@wordpress/block-editor';
import styled from "@emotion/styled";


/**
 * The edit function describes the structure of your block in the context of the
 * editor. This represents what the editor will render when the block is used.
 *
 * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#edit
 *
 * @param {Object}   props               Properties passed to the function.
 * @param {Object}   props.attributes    Available block attributes.
 * @param {Function} props.setAttributes Function that updates individual attributes.
 *
 * @return {WPElement} Element to render.
 */
export default function Edit({attributes, setAttributes}) {
    const blockProps = useBlockProps();

    const range = (start, end) => {
        return Array.from({ length: end - start + 1 }, (_, index) => start + index);
    }

    const LatepointCalendarWrapper = styled.div`
        box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.1);
        border-radius: 4px;
        border: 1px solid #ddd;
        border-bottom-color: #bbb;
        background-color: #fff;
        padding: 20px;
        max-width: 400px;
    `;

    const rangeTypes = [
        {label: 'Month', value: 'month'},
        {label: 'Week', value: 'week'},
    ];

    const LatepointCalendar = styled.div`
        border: 1px solid #ddd;
        border-right: none;
        background: #fbfbfb;
    `;

    const LatepointBlockCaption = styled.div`
        font-weight: 500;
        margin-bottom: 10px;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 1px;
    `;

    const LCRow = styled.div`
        display: grid;
        grid-template-columns: repeat(7, 1fr);
    `;

    const LCHead = styled.div`
        border-bottom: 1px solid #ddd;
        background: #f3f3f3;
    `;

    const LCCell = styled.div`
        padding: 10px;
        text-align: center;
        border-right: 1px solid #ddd;
    `;
    const LCDate = styled.div`
        padding: 5px;
        border-radius: 4px;
        background-color: #e1e1e1;
    `;

    const LCText = styled.div`
        padding: 3px;
        border-radius: 4px;
        background-color: #ecebeb;
    `;

    const weekCells = (type) => {
        return (
            <>
                {range(1, 7).map(() => (
                    <LCCell>{type === 'date' ? <LCDate></LCDate> : <LCText></LCText>}</LCCell>
                ))}
            </>
        )
    };


    return (
        <div {...blockProps}>
            <InspectorControls>
                <Panel>
                    <PanelBody title="Latepoint Calendar Settings">
                        <TextControl
                            label="Caption"
                            value={attributes.caption || ''}
                            onChange={(value) => setAttributes({caption: value})}
                        />
                        <TextControl
                            label={__('Date', 'latepoint')}
                            value={attributes.date || ''}
                            placeholder="YYYY-MM-DD"
                            onChange={(value) => setAttributes({date: value})}
                        />
                        <TextControl
                            label="Show Agents"
                            placeholder="Comma separated agent IDs"
                            value={attributes.show_agents || ''}
                            onChange={(value) => setAttributes({show_agents: value})}
                        />
                        <TextControl
                            label="Show Services"
                            placeholder="Comma separated service IDs"
                            value={attributes.show_services || ''}
                            onChange={(value) => setAttributes({show_services: value})}
                        />
                        <TextControl
                            label="Show Locations"
                            placeholder="Comma separated location IDs"
                            value={attributes.show_locations || ''}
                            onChange={(value) => setAttributes({show_locations: value})}
                        />

                        <SelectControl
                            label={__('View', 'latepoint')}
                            value={attributes.view || 'month'}
                            onChange={(value) => setAttributes({view: value})}
                            options={rangeTypes}
                        />
                    </PanelBody>
                </Panel>
            </InspectorControls>
            <LatepointCalendarWrapper>
                <LatepointBlockCaption>{attributes.caption}</LatepointBlockCaption>
                <LatepointCalendar>
                    <LCHead>
                        <LCRow>
                            { weekCells('date') }
                        </LCRow>
                    </LCHead>

                    { range(1, 4).map(() => (
                        <LCRow>
                            { weekCells('text') }
                        </LCRow>
                    ))}

                </LatepointCalendar>

            </LatepointCalendarWrapper>

        </div>
    );
}

Youez - 2016 - github.com/yon3zu
LinuXploit