HEX
Server: Apache
System: Linux ecngx285.inmotionhosting.com 4.18.0-553.79.1.lve.el8.x86_64 #1 SMP Wed Oct 15 17:59:35 UTC 2025 x86_64
User: zeusxp5 (3862)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: /home/zeusxp5/lrliberia.com/wp-content/themes/lifttruck/public/blocks/product-attributes/index.js
(() => {
    "use strict";
    var e = {};
    const t = window["React"];
    const r = window["wp"]["blocks"];
    const n = window["wp"]["i18n"];
    const l = window["wp"]["blockEditor"];
    const {useBlockProps: a, InspectorControls: o} = wp.blockEditor;
    const {Panel: i, PanelBody: c, PanelRow: s, SelectControl: u, ToggleControl: p} = wp.components;
    const {useState: d, useEffect: m} = wp.element;
    function b({attributes: e, setAttributes: r}) {
        const {} = e;
        const l = `wd-block-webdevia-product-atteribute`;
        const b = a({
            className: `${l}`
        });
        const [w, h] = d([]);
        m((() => {
            fetch(`${devia.home_url}/wp-json/wdmp/v1/attribute-options`).then((e => e.json())).then((e => h(e))).catch((e => console.error("Error fetching attribute options:", e)));
        }), []);
        return [ (0, t.createElement)(o, null, (0, t.createElement)(i, null, (0, t.createElement)(c, {
            title: (0, n.__)("Settings", "lifttruck"),
            initialOpen: true
        }, (0, t.createElement)(s, null, (0, t.createElement)(p, {
            label: (0, n.__)("Show Label", "lifttruck"),
            help: e.showlabel ? (0, n.__)("Show Label", "lifttruck") : (0, n.__)("Hide Label", "lifttruck"),
            checked: e.showlabel,
            onChange: e => r({
                showlabel: e
            })
        })), (0, t.createElement)(s, null, (0, t.createElement)(u, {
            label: (0, n.__)("Product Attributes", "lifttruck"),
            value: e.productattributes,
            options: w.map((e => ({
                value: e,
                label: e
            }))),
            onChange: e => r({
                productattributes: e
            })
        }))))), (0, t.createElement)("div", {
            ...b
        }, (0, t.createElement)("p", null, (0, n.__)("Attribute: ", "lifttruck") + e.productattributes)) ];
    }
    const w = JSON.parse('{"apiVersion":2,"name":"webdevia/product-attribute","version":"0.1.0","title":"Product Attribute","category":"webdevia","description":"The Product Attribute Block!","icon":"smily","attributes":{"productattributes":{"type":"string","default":""},"showlabel":{"type":"boolean","default":true}},"supports":{"__experimentalSettings":true,"anchor":true,"html":false,"align":["wide","full"],"className":true,"color":{"gradients":false,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalDefaultControls":{"fontSize":true,"fontAppearance":true,"textTransform":true}},"__unstablePasteTextInline":true,"__experimentalSlashInserter":true},"keywords":["wd","webdevia"],"textdomain":"webdevia-blocks","editorScript":"file:./index.js","viewStyle":"file:./index.css","viewScript":"file:./view.js","style":"file:./style-index.css"}');
    const {name: h, ..._} = w;
    const f = wp.element.createElement;
    const v = f("svg", {
        width: 383,
        height: 86,
        viewBox: "0 0 383 86",
        className: "wd-blocks-icon"
    }, f("path", {
        d: "M54.019 0c6.35 0 11.5 5.149 11.5 11.5v2.51c.165-.006.332-.01.5-.01h251c.167 0 .334.004.5.01V11.5c0-6.351 5.148-11.5 11.5-11.5h41.497c10.507 0 15.512 12.93 7.742 20.004L361.094 35.63a.501.501 0 0 0 0 .74l17.164 15.626C386.028 59.07 381.023 72 370.516 72h-41.497c-.168 0-.335-.004-.5-.01v2.51c0 6.351-5.149 11.5-11.5 11.5h-251c-6.352 0-11.5-5.149-11.5-11.5v-2.51c-.166.006-.333.01-.5.01H12.52C2.014 72-2.99 59.07 4.78 51.996L21.943 36.37a.5.5 0 0 0 0-.74L4.779 20.004C-2.99 12.93 2.014 0 12.521 0H54.02Zm.5 60.5v-49a.5.5 0 0 0-.5-.5H12.52a.673.673 0 0 0-.21.026.266.266 0 0 0-.076.04.569.569 0 0 0-.18.253.57.57 0 0 0-.038.31.266.266 0 0 0 .03.08.67.67 0 0 0 .137.16l17.164 15.627c5.01 4.562 5.01 12.446 0 17.008L12.185 60.13a.675.675 0 0 0-.138.16.268.268 0 0 0-.03.082.57.57 0 0 0 .038.309.568.568 0 0 0 .18.254.266.266 0 0 0 .077.039c.029.01.094.026.21.026h41.497a.5.5 0 0 0 .5-.5Zm11-35v49a.5.5 0 0 0 .5.5h251a.5.5 0 0 0 .5-.5v-49a.5.5 0 0 0-.5-.5h-251a.5.5 0 0 0-.5.5Zm263.5 35.5a.5.5 0 0 1-.5-.5v-49a.5.5 0 0 1 .5-.5h41.497a.68.68 0 0 1 .21.026c.03.01.054.023.077.04.05.036.127.118.179.253a.574.574 0 0 1 .039.31.277.277 0 0 1-.031.08.68.68 0 0 1-.137.16l-17.164 15.627c-5.011 4.562-5.011 12.446 0 17.008l17.164 15.626a.68.68 0 0 1 .137.16.277.277 0 0 1 .031.082.574.574 0 0 1-.039.309.568.568 0 0 1-.179.254.281.281 0 0 1-.077.039.68.68 0 0 1-.21.026h-41.497Z"
    }));
    (0, r.registerBlockType)(h, {
        ..._,
        icon: v,
        edit: b,
        save: e => (0, t.createElement)(l.InnerBlocks.Content, null)
    });
})();