@brilo/base-blocks 0.1.14 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/.tsbuildinfo +1 -0
- package/build/blocks/column/column-group/edit.d.ts.map +1 -1
- package/build/blocks/column/column-group/edit.js +1 -1
- package/build/blocks/column/column-item/edit.d.ts.map +1 -1
- package/build/blocks/column/column-item/edit.js +1 -1
- package/build/blocks/column/column-item/factory.js +1 -1
- package/build/blocks/compare/compare-group/constants.d.ts.map +1 -1
- package/build/blocks/compare/compare-group/edit.d.ts.map +1 -1
- package/build/blocks/compare/compare-group/edit.js +1 -1
- package/build/blocks/compare/compare-item/edit.d.ts.map +1 -1
- package/build/blocks/compare/compare-option/constants.d.ts +3 -3
- package/build/blocks/compare/compare-option/constants.d.ts.map +1 -1
- package/build/blocks/compare/compare-option/edit.d.ts.map +1 -1
- package/build/blocks/compare/compare-option/edit.js +1 -1
- package/build/blocks/contact/contact-group/constants.d.ts +17 -0
- package/build/blocks/contact/contact-group/constants.d.ts.map +1 -1
- package/build/blocks/contact/contact-group/constants.js +10 -0
- package/build/blocks/contact/contact-group/edit.d.ts.map +1 -1
- package/build/blocks/contact/contact-group/edit.js +7 -5
- package/build/blocks/contact/contact-group/factory.d.ts.map +1 -1
- package/build/blocks/contact/contact-group/factory.js +5 -1
- package/build/blocks/contact/contact-group/types.d.ts +10 -1
- package/build/blocks/contact/contact-group/types.d.ts.map +1 -1
- package/build/blocks/contact/contact-item/constants.d.ts +6 -6
- package/build/blocks/contact/contact-item/constants.d.ts.map +1 -1
- package/build/blocks/contact/contact-item/edit.d.ts.map +1 -1
- package/build/blocks/contact/contact-item/edit.js +1 -1
- package/build/blocks/contact/contact-item/index.d.ts.map +1 -1
- package/build/blocks/contact/contact-item/index.js +1 -0
- package/build/blocks/core/basic-button/constants.d.ts +7 -7
- package/build/blocks/core/basic-button/constants.d.ts.map +1 -1
- package/build/blocks/core/basic-button/edit.d.ts.map +1 -1
- package/build/blocks/core/basic-button/edit.js +3 -2
- package/build/blocks/core/basic-heading/edit.d.ts.map +1 -1
- package/build/blocks/core/basic-heading/edit.js +1 -1
- package/build/blocks/core/basic-overline/edit.d.ts.map +1 -1
- package/build/blocks/faq/faq-group/constants.d.ts +6 -6
- package/build/blocks/faq/faq-group/constants.d.ts.map +1 -1
- package/build/blocks/faq/faq-group/edit.d.ts.map +1 -1
- package/build/blocks/faq/faq-group/edit.js +1 -1
- package/build/blocks/faq/faq-group/factory.js +7 -6
- package/build/blocks/faq/faq-item/edit.d.ts.map +1 -1
- package/build/blocks/faq/faq-item/edit.js +1 -1
- package/build/blocks/form/form-field/constants.d.ts +2 -2
- package/build/blocks/form/form-field/constants.d.ts.map +1 -1
- package/build/blocks/form/form-field/edit.d.ts.map +1 -1
- package/build/blocks/form/form-field/edit.js +1 -1
- package/build/blocks/form/form-group/constants.d.ts +8 -8
- package/build/blocks/form/form-group/constants.d.ts.map +1 -1
- package/build/blocks/form/form-group/edit.d.ts.map +1 -1
- package/build/blocks/form/form-group/edit.js +10 -9
- package/build/blocks/gallery/gallery-group/constants.d.ts +12 -12
- package/build/blocks/gallery/gallery-group/constants.d.ts.map +1 -1
- package/build/blocks/gallery/gallery-group/edit.d.ts.map +1 -1
- package/build/blocks/gallery/gallery-group/edit.js +1 -1
- package/build/blocks/gallery/gallery-item/edit.d.ts.map +1 -1
- package/build/blocks/gallery/gallery-item/edit.js +1 -1
- package/build/blocks/groups/banner-group/constants.d.ts +2 -2
- package/build/blocks/groups/banner-group/constants.d.ts.map +1 -1
- package/build/blocks/groups/banner-group/edit.d.ts.map +1 -1
- package/build/blocks/groups/banner-group/edit.js +1 -1
- package/build/blocks/groups/banner-group/icon.d.ts.map +1 -1
- package/build/blocks/groups/basic-header-group/constants.d.ts +3 -3
- package/build/blocks/groups/basic-header-group/constants.d.ts.map +1 -1
- package/build/blocks/groups/basic-header-group/edit.d.ts.map +1 -1
- package/build/blocks/groups/basic-header-group/edit.js +1 -1
- package/build/blocks/groups/basic-header-group/factory.js +10 -9
- package/build/blocks/groups/button-group/constants.d.ts +6 -6
- package/build/blocks/groups/button-group/constants.d.ts.map +1 -1
- package/build/blocks/groups/button-group/edit.d.ts.map +1 -1
- package/build/blocks/groups/button-group/edit.js +1 -1
- package/build/blocks/groups/button-group/factory.js +7 -6
- package/build/blocks/groups/content-group/constants.d.ts +1 -1
- package/build/blocks/groups/content-group/constants.d.ts.map +1 -1
- package/build/blocks/groups/content-group/edit.d.ts.map +1 -1
- package/build/blocks/groups/content-group/edit.js +1 -1
- package/build/blocks/groups/text-and-media-group/constants.d.ts +33 -33
- package/build/blocks/groups/text-and-media-group/constants.d.ts.map +1 -1
- package/build/blocks/groups/text-and-media-group/edit.d.ts.map +1 -1
- package/build/blocks/groups/text-and-media-group/edit.js +1 -1
- package/build/blocks/groups/text-and-media-group/factory.js +15 -14
- package/build/blocks/hero/hero-group/constants.d.ts +4 -4
- package/build/blocks/hero/hero-group/constants.d.ts.map +1 -1
- package/build/blocks/hero/hero-group/edit.d.ts.map +1 -1
- package/build/blocks/hero/hero-group/edit.js +6 -5
- package/build/blocks/hero/hero-group/icon.d.ts.map +1 -1
- package/build/blocks/hero/hero-item/constants.d.ts +9 -9
- package/build/blocks/hero/hero-item/constants.d.ts.map +1 -1
- package/build/blocks/hero/hero-item/edit.d.ts.map +1 -1
- package/build/blocks/hero/hero-item/edit.js +6 -5
- package/build/blocks/link/link-item/constants.d.ts +3 -3
- package/build/blocks/link/link-item/constants.d.ts.map +1 -1
- package/build/blocks/link/link-item/edit.d.ts.map +1 -1
- package/build/blocks/link/link-item/edit.js +1 -1
- package/build/blocks/map/map-group/constants.d.ts +4 -4
- package/build/blocks/map/map-group/constants.d.ts.map +1 -1
- package/build/blocks/map/map-group/edit.d.ts.map +1 -1
- package/build/blocks/map/map-group/edit.js +1 -1
- package/build/blocks/newsletter/newsletter-form/constants.d.ts.map +1 -1
- package/build/blocks/newsletter/newsletter-form/edit.d.ts.map +1 -1
- package/build/blocks/newsletter/newsletter-form/edit.js +1 -1
- package/build/blocks/person/person-group/constants.d.ts.map +1 -1
- package/build/blocks/person/person-group/edit.d.ts.map +1 -1
- package/build/blocks/person/person-group/edit.js +1 -1
- package/build/blocks/person/person-group/icon.d.ts.map +1 -1
- package/build/blocks/person/person-item/edit.d.ts.map +1 -1
- package/build/blocks/person/person-item/edit.js +1 -1
- package/build/blocks/post/post-slider-group/edit.d.ts.map +1 -1
- package/build/blocks/post/post-slider-group/edit.js +1 -1
- package/build/blocks/responsive-grid/responsive-grid-group/edit.d.ts.map +1 -1
- package/build/blocks/responsive-grid/responsive-grid-group/edit.js +1 -1
- package/build/blocks/responsive-grid/responsive-grid-item/edit.d.ts.map +1 -1
- package/build/blocks/sections/base-section/attributes.d.ts +9 -9
- package/build/blocks/sections/base-section/attributes.d.ts.map +1 -1
- package/build/blocks/sections/base-section/constants.d.ts +5 -5
- package/build/blocks/sections/base-section/constants.d.ts.map +1 -1
- package/build/blocks/sections/base-section/controls.js +1 -1
- package/build/blocks/sections/base-section/edit.d.ts.map +1 -1
- package/build/blocks/sections/base-section/edit.js +1 -1
- package/build/blocks/signpost/signpost-group/constants.d.ts +27 -1
- package/build/blocks/signpost/signpost-group/constants.d.ts.map +1 -1
- package/build/blocks/signpost/signpost-group/constants.js +13 -0
- package/build/blocks/signpost/signpost-group/edit.d.ts.map +1 -1
- package/build/blocks/signpost/signpost-group/edit.js +9 -5
- package/build/blocks/signpost/signpost-group/factory.d.ts.map +1 -1
- package/build/blocks/signpost/signpost-group/factory.js +36 -22
- package/build/blocks/signpost/signpost-group/index.d.ts +1 -1
- package/build/blocks/signpost/signpost-group/index.d.ts.map +1 -1
- package/build/blocks/signpost/signpost-group/types.d.ts +14 -1
- package/build/blocks/signpost/signpost-group/types.d.ts.map +1 -1
- package/build/blocks/signpost/signpost-item/constants.d.ts +2 -1
- package/build/blocks/signpost/signpost-item/constants.d.ts.map +1 -1
- package/build/blocks/signpost/signpost-item/constants.js +2 -1
- package/build/blocks/signpost/signpost-item/edit.d.ts.map +1 -1
- package/build/blocks/signpost/signpost-item/edit.js +16 -8
- package/build/blocks/signpost/signpost-item/factory.d.ts.map +1 -1
- package/build/blocks/signpost/signpost-item/factory.js +2 -1
- package/build/blocks/signpost/signpost-item/types.d.ts +9 -2
- package/build/blocks/signpost/signpost-item/types.d.ts.map +1 -1
- package/build/blocks/step/step-group/constants.d.ts +2 -2
- package/build/blocks/step/step-group/constants.d.ts.map +1 -1
- package/build/blocks/step/step-group/edit.d.ts.map +1 -1
- package/build/blocks/step/step-group/edit.js +1 -1
- package/build/blocks/step/step-item/constants.d.ts +2 -2
- package/build/blocks/step/step-item/constants.d.ts.map +1 -1
- package/build/blocks/step/step-item/edit.d.ts.map +1 -1
- package/build/blocks/step/step-item/edit.js +1 -1
- package/build/blocks/testimonial/testimonial-group/constants.d.ts +5 -5
- package/build/blocks/testimonial/testimonial-group/constants.d.ts.map +1 -1
- package/build/blocks/testimonial/testimonial-group/edit.d.ts.map +1 -1
- package/build/blocks/testimonial/testimonial-group/edit.js +1 -1
- package/build/blocks/testimonial/testimonial-item/edit.d.ts.map +1 -1
- package/build/blocks/testimonial/testimonial-item/edit.js +1 -1
- package/build/blocks/text-and-form/text-and-form-group/constants.d.ts +2 -2
- package/build/blocks/text-and-form/text-and-form-group/constants.d.ts.map +1 -1
- package/build/blocks/text-and-form/text-and-form-group/edit.d.ts.map +1 -1
- package/build/blocks/text-and-form/text-and-form-group/edit.js +3 -2
- package/build/blocks/text-and-form/text-and-form-text-column/constants.d.ts +4 -4
- package/build/blocks/text-and-form/text-and-form-text-column/constants.d.ts.map +1 -1
- package/build/blocks/text-and-form/text-and-form-text-column/edit.d.ts.map +1 -1
- package/build/blocks/text-and-form/text-and-form-text-column/edit.js +1 -1
- package/build/blocks/text-and-form/text-and-form-text-column/factory.js +9 -8
- package/build/blocks/usp/usp-group/constants.d.ts +31 -31
- package/build/blocks/usp/usp-group/constants.d.ts.map +1 -1
- package/build/blocks/usp/usp-group/edit.d.ts.map +1 -1
- package/build/blocks/usp/usp-group/edit.js +5 -3
- package/build/blocks/usp/usp-group/factory.d.ts.map +1 -1
- package/build/blocks/usp/usp-group/factory.js +21 -17
- package/build/blocks/usp/usp-group/types.d.ts +3 -0
- package/build/blocks/usp/usp-group/types.d.ts.map +1 -1
- package/build/blocks/usp/usp-item/constants.d.ts +3 -3
- package/build/blocks/usp/usp-item/constants.d.ts.map +1 -1
- package/build/blocks/usp/usp-item/edit.d.ts.map +1 -1
- package/build/blocks/usp/usp-item/edit.js +1 -1
- package/build/components/ItemIconControl/ItemIconControl.js +3 -2
- package/build/components/ItemIconControl/ItemIconPreview.js +6 -3
- package/build/constants.d.ts +12 -12
- package/build/constants.d.ts.map +1 -1
- package/build/hooks/useTenantColorPalette.d.ts +1 -1
- package/build/hooks/useTenantColorPalette.d.ts.map +1 -1
- package/package.json +15 -15
- package/src/blocks/column/column-item/factory.tsx +1 -1
- package/src/blocks/contact/contact-group/constants.ts +13 -0
- package/src/blocks/contact/contact-group/edit.tsx +54 -3
- package/src/blocks/contact/contact-group/factory.tsx +5 -1
- package/src/blocks/contact/contact-group/types.ts +12 -1
- package/src/blocks/contact/contact-item/index.ts +1 -0
- package/src/blocks/core/basic-button/edit.tsx +4 -4
- package/src/blocks/groups/banner-group/icon.tsx +1 -1
- package/src/blocks/hero/hero-group/icon.tsx +1 -1
- package/src/blocks/person/person-group/icon.tsx +1 -1
- package/src/blocks/signpost/signpost-group/constants.ts +16 -0
- package/src/blocks/signpost/signpost-group/edit.tsx +62 -3
- package/src/blocks/signpost/signpost-group/factory.tsx +36 -18
- package/src/blocks/signpost/signpost-group/index.ts +1 -1
- package/src/blocks/signpost/signpost-group/types.ts +16 -2
- package/src/blocks/signpost/signpost-item/constants.ts +2 -4
- package/src/blocks/signpost/signpost-item/edit.tsx +57 -4
- package/src/blocks/signpost/signpost-item/factory.tsx +2 -1
- package/src/blocks/signpost/signpost-item/types.ts +13 -3
- package/src/blocks/usp/usp-group/edit.tsx +40 -17
- package/src/blocks/usp/usp-group/factory.tsx +3 -0
- package/src/blocks/usp/usp-group/types.ts +3 -0
- package/src/components/ItemIconControl/ItemIconControl.tsx +1 -1
- package/src/components/ItemIconControl/ItemIconPreview.tsx +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { InspectorControls, RichText } from '@wordpress/block-editor';
|
|
3
3
|
import { FormTokenField, Notice, PanelBody, SelectControl, TextControl, ToggleControl } from '@wordpress/components';
|
|
4
4
|
import { useDispatch } from '@wordpress/data';
|
|
@@ -16,14 +16,15 @@ function generateFormId(formName) {
|
|
|
16
16
|
}
|
|
17
17
|
export function createFormGroupEdit(options) {
|
|
18
18
|
return function Edit({ attributes, setAttributes, clientId, }) {
|
|
19
|
-
var _a, _b, _c
|
|
19
|
+
var _a, _b, _c;
|
|
20
|
+
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
20
21
|
const { lockPostSaving, unlockPostSaving } = useDispatch('core/editor');
|
|
21
|
-
const processingMode = (
|
|
22
|
+
const processingMode = (_d = attributes.processingMode) !== null && _d !== void 0 ? _d : 'internal';
|
|
22
23
|
const isInternal = processingMode === 'internal';
|
|
23
24
|
const isExternal = processingMode === 'external';
|
|
24
25
|
const recipients = Array.isArray(attributes.senders) ? attributes.senders : [];
|
|
25
26
|
const isRecipientsMissing = isInternal && recipients.length === 0;
|
|
26
|
-
const isExternalUrlMissing = isExternal && ((
|
|
27
|
+
const isExternalUrlMissing = isExternal && ((_e = attributes.externalUrl) !== null && _e !== void 0 ? _e : '').trim() === '';
|
|
27
28
|
useEffect(() => {
|
|
28
29
|
const lockName = `brilo-form-group-${clientId}`;
|
|
29
30
|
if (isRecipientsMissing || isExternalUrlMissing) {
|
|
@@ -43,17 +44,17 @@ export function createFormGroupEdit(options) {
|
|
|
43
44
|
}
|
|
44
45
|
}, []);
|
|
45
46
|
const { blockProps, innerBlocksProps } = useGroupBlock({
|
|
46
|
-
blockClassName: clsx((
|
|
47
|
-
containerClassName: [(
|
|
48
|
-
allowedBlocks: (
|
|
47
|
+
blockClassName: clsx((_f = options.blockClassName) !== null && _f !== void 0 ? _f : 'g-form wp-block-section'),
|
|
48
|
+
containerClassName: [(_g = options.containerClassName) !== null && _g !== void 0 ? _g : 'g-form__fields'],
|
|
49
|
+
allowedBlocks: (_h = options.allowedBlocks) !== null && _h !== void 0 ? _h : ALLOWED_BLOCKS,
|
|
49
50
|
template: options.template,
|
|
50
51
|
orientation: 'horizontal',
|
|
51
52
|
layout: { type: 'default' },
|
|
52
53
|
});
|
|
53
|
-
return (_jsxs(_Fragment, { children: [_jsx(InspectorControls, { children: _jsxs(PanelBody, { title: __('Formulář', 'brilo-blocks'), children: [_jsx(TextControl, { label: __('ID formuláře', 'brilo-blocks'), value: (
|
|
54
|
+
return (_jsxs(_Fragment, { children: [_jsx(InspectorControls, { children: _jsxs(PanelBody, { title: __('Formulář', 'brilo-blocks'), children: [_jsx(TextControl, { label: __('ID formuláře', 'brilo-blocks'), value: (_j = attributes.formId) !== null && _j !== void 0 ? _j : '', readOnly: true, onChange: () => { }, help: __('Generuje se automaticky, slouží k jednoznačné identifikaci formuláře.', 'brilo-blocks') }), _jsx(TextControl, { label: __('Název formuláře (volitelné)', 'brilo-blocks'), value: (_k = attributes.formName) !== null && _k !== void 0 ? _k : '', placeholder: __('Např. Kontaktní formulář', 'brilo-blocks'), onChange: (formName) => setAttributes({ formName }) }), _jsx(SelectControl, { label: __('Zpracování', 'brilo-blocks'), value: processingMode, options: PROCESSING_MODES.map((m) => ({ label: m.label, value: m.value })), onChange: (mode) => setAttributes({ processingMode: mode }) }), isExternal && (_jsxs(_Fragment, { children: [_jsx(SelectControl, { label: __('Metoda odeslání', 'brilo-blocks'), value: (_l = attributes.externalMethod) !== null && _l !== void 0 ? _l : 'POST', options: EXTERNAL_METHODS.map((m) => ({ label: m.label, value: m.value })), onChange: (externalMethod) => setAttributes({ externalMethod: externalMethod }) }), _jsx(TextControl, { label: __('Externí URL', 'brilo-blocks'), value: (_m = attributes.externalUrl) !== null && _m !== void 0 ? _m : '', onChange: (externalUrl) => setAttributes({ externalUrl }) }), isExternalUrlMissing && (_jsx(Notice, { status: "warning", isDismissible: false, children: __('Pole „Externí URL“ je povinné pro externí zpracování.', 'brilo-blocks') }))] })), isInternal && (_jsxs(_Fragment, { children: [_jsx(FormTokenField, { label: __('Komu (příjemci)', 'brilo-blocks'), value: recipients, __next40pxDefaultSize: true, onChange: (senders) => setAttributes({
|
|
54
55
|
senders: (senders !== null && senders !== void 0 ? senders : [])
|
|
55
56
|
.map((item) => (typeof item === 'string' ? item.trim() : ''))
|
|
56
57
|
.filter((item) => item.length > 0),
|
|
57
|
-
}) }), isRecipientsMissing && (_jsx(Notice, { status: "warning", isDismissible: false, children: __('Pole „Komu (příjemci)“ je povinné. Vyplňte alespoň jeden e-mail příjemce.', 'brilo-blocks') })), _jsx(TextControl, { label: __('Od koho (From email)', 'brilo-blocks'), value: (
|
|
58
|
+
}) }), isRecipientsMissing && (_jsx(Notice, { status: "warning", isDismissible: false, children: __('Pole „Komu (příjemci)“ je povinné. Vyplňte alespoň jeden e-mail příjemce.', 'brilo-blocks') })), _jsx(TextControl, { label: __('Od koho (From email)', 'brilo-blocks'), value: (_o = attributes.fromEmail) !== null && _o !== void 0 ? _o : '', onChange: (fromEmail) => setAttributes({ fromEmail }) }), _jsx(TextControl, { label: __('Předmět emailu', 'brilo-blocks'), value: (_p = attributes.subject) !== null && _p !== void 0 ? _p : '', placeholder: __('Potvrzení odeslaného formuláře', 'brilo-blocks'), onChange: (subject) => setAttributes({ subject }) }), _jsx(SelectControl, { label: __('Po odeslání', 'brilo-blocks'), value: (_q = attributes.internalSubmitBehavior) !== null && _q !== void 0 ? _q : 'stay', options: INTERNAL_SUBMIT_BEHAVIORS.map((b) => ({ label: b.label, value: b.value })), onChange: (internalSubmitBehavior) => setAttributes({ internalSubmitBehavior: internalSubmitBehavior }) }), ((_r = attributes.internalSubmitBehavior) !== null && _r !== void 0 ? _r : 'stay') === 'redirect' && (_jsx(TextControl, { label: __('URL děkovné stránky', 'brilo-blocks'), value: (_s = attributes.internalRedirectUrl) !== null && _s !== void 0 ? _s : '', onChange: (internalRedirectUrl) => setAttributes({ internalRedirectUrl }) })), _jsx(TextControl, { label: __('Úspěšná zpráva', 'brilo-blocks'), value: (_t = attributes.successMessage) !== null && _t !== void 0 ? _t : '', onChange: (successMessage) => setAttributes({ successMessage }) })] })), _jsx(TextControl, { label: __('Titulek tlačítka odeslání', 'brilo-blocks'), value: (_u = (_a = attributes.submit) === null || _a === void 0 ? void 0 : _a.label) !== null && _u !== void 0 ? _u : 'Odeslat', onChange: (label) => setAttributes({ submit: { label } }) })] }) }), _jsxs("div", { ...blockProps, children: [_jsx("div", { ...innerBlocksProps }), _jsxs("div", { className: "g-form__gdpr", children: [_jsxs("div", { className: "g-form__gdpr-header", children: [_jsx("strong", { children: __('GDPR obsah', 'brilo-blocks') }), _jsx(ToggleControl, { label: __('S checkboxem?', 'brilo-blocks'), checked: (_v = (_b = attributes.gdpr) === null || _b === void 0 ? void 0 : _b.checkbox) !== null && _v !== void 0 ? _v : true, onChange: (checkbox) => { var _a; var _b; return setAttributes({ gdpr: { content: (_b = (_a = attributes.gdpr) === null || _a === void 0 ? void 0 : _a.content) !== null && _b !== void 0 ? _b : '', checkbox } }); } })] }), _jsx(RichText, { className: "g-form__gdpr-content", tagName: "div", value: (_w = (_c = attributes.gdpr) === null || _c === void 0 ? void 0 : _c.content) !== null && _w !== void 0 ? _w : '', allowedFormats: ['core/bold', 'core/link'], onChange: (content) => { var _a; var _b; return setAttributes({ gdpr: { content, checkbox: (_b = (_a = attributes.gdpr) === null || _a === void 0 ? void 0 : _a.checkbox) !== null && _b !== void 0 ? _b : true } }); }, placeholder: __('Text GDPR souhlasu…', 'brilo-blocks') })] })] })] }));
|
|
58
59
|
};
|
|
59
60
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
export declare const DEFAULT_COLUMNS: readonly [2, 3, 4, 6];
|
|
2
2
|
export declare const DEFAULT_RATIOS: readonly [{
|
|
3
|
-
readonly value:
|
|
4
|
-
readonly label:
|
|
3
|
+
readonly value: '4:3';
|
|
4
|
+
readonly label: '4:3';
|
|
5
5
|
}, {
|
|
6
|
-
readonly value:
|
|
7
|
-
readonly label:
|
|
6
|
+
readonly value: '16:9';
|
|
7
|
+
readonly label: '16:9';
|
|
8
8
|
}, {
|
|
9
|
-
readonly value:
|
|
10
|
-
readonly label:
|
|
9
|
+
readonly value: '3:2';
|
|
10
|
+
readonly label: '3:2';
|
|
11
11
|
}, {
|
|
12
|
-
readonly value:
|
|
13
|
-
readonly label:
|
|
12
|
+
readonly value: '1:1';
|
|
13
|
+
readonly label: '1:1';
|
|
14
14
|
}, {
|
|
15
|
-
readonly value:
|
|
16
|
-
readonly label:
|
|
15
|
+
readonly value: '2:1';
|
|
16
|
+
readonly label: '2:1';
|
|
17
17
|
}, {
|
|
18
|
-
readonly value:
|
|
19
|
-
readonly label:
|
|
18
|
+
readonly value: '3:4';
|
|
19
|
+
readonly label: '3:4';
|
|
20
20
|
}];
|
|
21
21
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/gallery/gallery-group/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/gallery/gallery-group/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,YAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAU,CAAA;AAEpD,eAAO,MAAM,cAAc;aACxB,KAAK,EAAE,KAAK;aAAE,KAAK,EAAE,KAAK;;aAC1B,KAAK,EAAE,MAAM;aAAE,KAAK,EAAE,MAAM;;aAC5B,KAAK,EAAE,KAAK;aAAE,KAAK,EAAE,KAAK;;aAC1B,KAAK,EAAE,KAAK;aAAE,KAAK,EAAE,KAAK;;aAC1B,KAAK,EAAE,KAAK;aAAE,KAAK,EAAE,KAAK;;aAC1B,KAAK,EAAE,KAAK;aAAE,KAAK,EAAE,KAAK;EACnB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/gallery/gallery-group/edit.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAC,sBAAsB,EAAE,mBAAmB,EAAe,MAAM,SAAS,CAAA;AAOtF,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/gallery/gallery-group/edit.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAC,sBAAsB,EAAE,mBAAmB,EAAe,MAAM,SAAS,CAAA;AAOtF,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,mBAAmB,8CAQ9D;IACD,UAAU,EAAE,sBAAsB,CAAA;IAClC,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,KAAK,IAAI,CAAA;IAC3D,QAAQ,EAAE,MAAM,CAAA;CACjB,iCAoFF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { InspectorControls, MediaUpload } from '@wordpress/block-editor';
|
|
3
3
|
import { PanelBody, TextControl, __experimentalToggleGroupControl as ToggleGroupControl, __experimentalToggleGroupControlOption as ToggleGroupControlOption, } from '@wordpress/components';
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/gallery/gallery-item/edit.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,qBAAqB,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAA;AAGtE,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/gallery/gallery-item/edit.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,qBAAqB,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAA;AAGtE,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,kBAAkB,oCAI7D;IACD,UAAU,EAAE,qBAAqB,CAAA;IACjC,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,KAAK,IAAI,CAAA;CAC3D,iCA+BF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { InspectorControls, useBlockProps } from '@wordpress/block-editor';
|
|
3
3
|
import { PanelBody } from '@wordpress/components';
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const DEFAULT_HEADING_STYLES: readonly ["h1", "h2", "h3", "h4"];
|
|
2
2
|
export declare const DEFAULT_VARIANTS: readonly [{
|
|
3
|
-
readonly value:
|
|
3
|
+
readonly value: 'default';
|
|
4
4
|
readonly label: import("@wordpress/i18n").TransformedText<"Výchozí">;
|
|
5
5
|
}, {
|
|
6
|
-
readonly value:
|
|
6
|
+
readonly value: 'full-width';
|
|
7
7
|
readonly label: import("@wordpress/i18n").TransformedText<"Na plnou šířku">;
|
|
8
8
|
}];
|
|
9
9
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/banner-group/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,mCAAiB,CAAA;AAEpD,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/banner-group/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,mCAAiB,CAAA;AAEpD,eAAO,MAAM,gBAAgB;aAEzB,KAAK,EAAE,SAAS;aAChB,KAAK;;aAGL,KAAK,EAAE,YAAY;aACnB,KAAK;EAEC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/banner-group/edit.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAC,qBAAqB,EAAE,kBAAkB,EAAyC,MAAM,SAAS,CAAA;AAG9G,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/banner-group/edit.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAC,qBAAqB,EAAE,kBAAkB,EAAyC,MAAM,SAAS,CAAA;AAG9G,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,kBAAkB,oCAO5D;IACD,UAAU,EAAE,qBAAqB,CAAA;IACjC,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,KAAK,IAAI,CAAA;CAC3D,iCA8FF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { InspectorControls, RichText } from '@wordpress/block-editor';
|
|
3
3
|
import { PanelBody, __experimentalToggleGroupControl as ToggleGroupControl, __experimentalToggleGroupControlOption as ToggleGroupControlOption, ColorPalette, ToggleControl, BaseControl, } from '@wordpress/components';
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/banner-group/icon.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,6BAYhB,
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/banner-group/icon.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,6BAYhB,CAAA"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { HEADING_LEVELS as DEFAULT_LEVELS, HEADING_STYLES as DEFAULT_STYLES } from '../../../constants';
|
|
2
2
|
export declare const DEFAULT_ALIGNMENTS: readonly [{
|
|
3
|
-
readonly value:
|
|
3
|
+
readonly value: 'left';
|
|
4
4
|
readonly label: import("@wordpress/i18n").TransformedText<"Vlevo">;
|
|
5
5
|
}, {
|
|
6
|
-
readonly value:
|
|
6
|
+
readonly value: 'center';
|
|
7
7
|
readonly label: import("@wordpress/i18n").TransformedText<"Středem">;
|
|
8
8
|
}, {
|
|
9
|
-
readonly value:
|
|
9
|
+
readonly value: 'right';
|
|
10
10
|
readonly label: import("@wordpress/i18n").TransformedText<"Vpravo">;
|
|
11
11
|
}];
|
|
12
12
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/basic-header-group/constants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,cAAc,IAAI,cAAc,EAAE,cAAc,IAAI,cAAc,EAAC,MAAM,aAAa,CAAA;AAE9F,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/basic-header-group/constants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,cAAc,IAAI,cAAc,EAAE,cAAc,IAAI,cAAc,EAAC,MAAM,aAAa,CAAA;AAE9F,eAAO,MAAM,kBAAkB;aAC5B,KAAK,EAAE,MAAM;aAAE,KAAK;;aACpB,KAAK,EAAE,QAAQ;aAAE,KAAK;;aACtB,KAAK,EAAE,OAAO;aAAE,KAAK;EACd,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/basic-header-group/edit.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAC,0BAA0B,EAAE,uBAAuB,EAAgC,MAAM,SAAS,CAAA;AAE/G,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/basic-header-group/edit.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAC,0BAA0B,EAAE,uBAAuB,EAAgC,MAAM,SAAS,CAAA;AAE/G,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,uBAAuB,oCAQtE;IACD,UAAU,EAAE,0BAA0B,CAAA;IACtC,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC,KAAK,IAAI,CAAA;CAChE,iCA4EF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { InspectorControls, RichText, useBlockProps } from '@wordpress/block-editor';
|
|
3
3
|
import { PanelBody, __experimentalToggleGroupControl as ToggleGroupControl, __experimentalToggleGroupControlOption as ToggleGroupControlOption, } from '@wordpress/components';
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
@@ -3,28 +3,29 @@ import { DEFAULT_ALIGNMENTS, DEFAULT_LEVELS, DEFAULT_STYLES } from './constants'
|
|
|
3
3
|
import { createBasicHeaderGroupEdit } from './edit';
|
|
4
4
|
import { icon as defaultIcon } from './icon';
|
|
5
5
|
export function createBasicHeaderGroupBlock(options) {
|
|
6
|
-
var _a
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
const
|
|
6
|
+
var _a;
|
|
7
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
8
|
+
const levels = (_b = options.levels) !== null && _b !== void 0 ? _b : DEFAULT_LEVELS;
|
|
9
|
+
const styles = (_c = options.styles) !== null && _c !== void 0 ? _c : DEFAULT_STYLES;
|
|
10
|
+
const alignments = (_d = options.alignments) !== null && _d !== void 0 ? _d : DEFAULT_ALIGNMENTS;
|
|
10
11
|
return {
|
|
11
12
|
name: options.name,
|
|
12
|
-
title: (
|
|
13
|
+
title: (_e = options.title) !== null && _e !== void 0 ? _e : __('Hlavička základní', 'brilo-blocks'),
|
|
13
14
|
description: options.description,
|
|
14
|
-
category: (
|
|
15
|
+
category: (_f = options.category) !== null && _f !== void 0 ? _f : 'layout',
|
|
15
16
|
...(options.parent && { parent: options.parent }),
|
|
16
|
-
icon: (
|
|
17
|
+
icon: (_g = options.icon) !== null && _g !== void 0 ? _g : defaultIcon,
|
|
17
18
|
supports: { html: false, customClassName: false },
|
|
18
19
|
attributes: {
|
|
19
20
|
heading: {
|
|
20
21
|
type: 'object',
|
|
21
|
-
default: { title: '', level: (
|
|
22
|
+
default: { title: '', level: (_h = levels[1]) !== null && _h !== void 0 ? _h : levels[0], style: (_j = styles[1]) !== null && _j !== void 0 ? _j : styles[0] },
|
|
22
23
|
},
|
|
23
24
|
overline: { type: 'object', default: { title: '' } },
|
|
24
25
|
content: { type: 'string', default: '' },
|
|
25
26
|
textAlign: {
|
|
26
27
|
type: 'string',
|
|
27
|
-
default: (_k = (
|
|
28
|
+
default: (_k = (_a = alignments[1]) === null || _a === void 0 ? void 0 : _a.value) !== null && _k !== void 0 ? _k : alignments[0].value,
|
|
28
29
|
enum: alignments.map((a) => a.value),
|
|
29
30
|
},
|
|
30
31
|
},
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export declare const DEFAULT_ALIGNMENTS: readonly [{
|
|
2
|
-
readonly value:
|
|
2
|
+
readonly value: 'left';
|
|
3
3
|
readonly label: import("@wordpress/i18n").TransformedText<"Vlevo">;
|
|
4
|
-
readonly icon:
|
|
4
|
+
readonly icon: 'align-left';
|
|
5
5
|
}, {
|
|
6
|
-
readonly value:
|
|
6
|
+
readonly value: 'center';
|
|
7
7
|
readonly label: import("@wordpress/i18n").TransformedText<"Na střed">;
|
|
8
|
-
readonly icon:
|
|
8
|
+
readonly icon: 'align-center';
|
|
9
9
|
}, {
|
|
10
|
-
readonly value:
|
|
10
|
+
readonly value: 'right';
|
|
11
11
|
readonly label: import("@wordpress/i18n").TransformedText<"Vpravo">;
|
|
12
|
-
readonly icon:
|
|
12
|
+
readonly icon: 'align-right';
|
|
13
13
|
}];
|
|
14
14
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/button-group/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/button-group/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB;aAC5B,KAAK,EAAE,MAAM;aAAE,KAAK;aAA+B,IAAI,EAAE,YAAY;;aACrE,KAAK,EAAE,QAAQ;aAAE,KAAK;aAAkC,IAAI,EAAE,cAAc;;aAC5E,KAAK,EAAE,OAAO;aAAE,KAAK;aAAgC,IAAI,EAAE,aAAa;EACjE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/button-group/edit.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAuB,qBAAqB,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAA;AAE5F,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/button-group/edit.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAuB,qBAAqB,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAA;AAE5F,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,kBAAkB,oCAM5D;IACD,UAAU,EAAE,qBAAqB,CAAA;IACjC,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,KAAK,IAAI,CAAA;CAC3D,iCA+BF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { InspectorControls } from '@wordpress/block-editor';
|
|
3
3
|
import { PanelBody, __experimentalToggleGroupControl as ToggleGroupControl, __experimentalToggleGroupControlOption as ToggleGroupControlOption, } from '@wordpress/components';
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
@@ -4,20 +4,21 @@ import { __ } from '@wordpress/i18n';
|
|
|
4
4
|
import { DEFAULT_ALIGNMENTS } from './constants';
|
|
5
5
|
import { createButtonGroupEdit } from './edit';
|
|
6
6
|
export function createButtonGroupBlock(options) {
|
|
7
|
-
var _a
|
|
8
|
-
|
|
7
|
+
var _a;
|
|
8
|
+
var _b, _c, _d, _e, _f;
|
|
9
|
+
const alignments = (_b = options.alignments) !== null && _b !== void 0 ? _b : DEFAULT_ALIGNMENTS;
|
|
9
10
|
return {
|
|
10
11
|
name: options.name,
|
|
11
|
-
title: (
|
|
12
|
+
title: (_c = options.title) !== null && _c !== void 0 ? _c : __('Skupina tlačítek', 'brilo-blocks'),
|
|
12
13
|
description: options.description,
|
|
13
|
-
category: (
|
|
14
|
+
category: (_d = options.category) !== null && _d !== void 0 ? _d : 'layout',
|
|
14
15
|
...(options.parent && { parent: options.parent }),
|
|
15
|
-
icon: (
|
|
16
|
+
icon: (_e = options.icon) !== null && _e !== void 0 ? _e : 'button',
|
|
16
17
|
supports: { html: false, customClassName: false },
|
|
17
18
|
attributes: {
|
|
18
19
|
alignment: {
|
|
19
20
|
type: 'string',
|
|
20
|
-
default: (_f = (
|
|
21
|
+
default: (_f = (_a = alignments[1]) === null || _a === void 0 ? void 0 : _a.value) !== null && _f !== void 0 ? _f : alignments[0].value,
|
|
21
22
|
enum: alignments.map((a) => a.value),
|
|
22
23
|
},
|
|
23
24
|
},
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SIZES: readonly [
|
|
1
|
+
export declare const SIZES: readonly ['8', '12'];
|
|
2
2
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/content-group/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/content-group/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,YAAI,GAAG,EAAE,IAAI,CAAU,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/content-group/edit.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAC,sBAAsB,EAAE,mBAAmB,EAAmB,MAAM,SAAS,CAAA;AAE1F,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/content-group/edit.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAC,sBAAsB,EAAE,mBAAmB,EAAmB,MAAM,SAAS,CAAA;AAE1F,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,mBAAmB,oCAI9D;IACD,UAAU,EAAE,sBAAsB,CAAA;IAClC,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,KAAK,IAAI,CAAA;CAC5D,iCA+BF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { InspectorControls } from '@wordpress/block-editor';
|
|
3
3
|
import { PanelBody, __experimentalToggleGroupControl as ToggleGroupControl, __experimentalToggleGroupControlOption as ToggleGroupControlOption, } from '@wordpress/components';
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
@@ -1,74 +1,74 @@
|
|
|
1
1
|
export { CONTENT_SIZES as DEFAULT_CONTENT_SIZES, HEADING_LEVELS } from '../../../constants';
|
|
2
2
|
export declare const DEFAULT_RATIOS: readonly [{
|
|
3
|
-
readonly value:
|
|
4
|
-
readonly label:
|
|
3
|
+
readonly value: '3:2';
|
|
4
|
+
readonly label: '3:2';
|
|
5
5
|
}, {
|
|
6
|
-
readonly value:
|
|
7
|
-
readonly label:
|
|
6
|
+
readonly value: '4:3';
|
|
7
|
+
readonly label: '4:3';
|
|
8
8
|
}, {
|
|
9
|
-
readonly value:
|
|
10
|
-
readonly label:
|
|
9
|
+
readonly value: '16:9';
|
|
10
|
+
readonly label: '16:9';
|
|
11
11
|
}, {
|
|
12
|
-
readonly value:
|
|
13
|
-
readonly label:
|
|
12
|
+
readonly value: '1:1';
|
|
13
|
+
readonly label: '1:1';
|
|
14
14
|
}, {
|
|
15
|
-
readonly value:
|
|
16
|
-
readonly label:
|
|
15
|
+
readonly value: '2:1';
|
|
16
|
+
readonly label: '2:1';
|
|
17
17
|
}, {
|
|
18
|
-
readonly value:
|
|
19
|
-
readonly label:
|
|
18
|
+
readonly value: '3:4';
|
|
19
|
+
readonly label: '3:4';
|
|
20
20
|
}, {
|
|
21
|
-
readonly value:
|
|
22
|
-
readonly label:
|
|
21
|
+
readonly value: 'auto';
|
|
22
|
+
readonly label: 'Auto';
|
|
23
23
|
}];
|
|
24
24
|
export declare const CHIP_POSITIONS: readonly [{
|
|
25
|
-
readonly value:
|
|
25
|
+
readonly value: 'top-left';
|
|
26
26
|
readonly label: import("@wordpress/i18n").TransformedText<"Vlevo nahoře">;
|
|
27
27
|
}, {
|
|
28
|
-
readonly value:
|
|
28
|
+
readonly value: 'top-right';
|
|
29
29
|
readonly label: import("@wordpress/i18n").TransformedText<"Vpravo nahoře">;
|
|
30
30
|
}, {
|
|
31
|
-
readonly value:
|
|
31
|
+
readonly value: 'bottom-left';
|
|
32
32
|
readonly label: import("@wordpress/i18n").TransformedText<"Vlevo dole">;
|
|
33
33
|
}, {
|
|
34
|
-
readonly value:
|
|
34
|
+
readonly value: 'bottom-right';
|
|
35
35
|
readonly label: import("@wordpress/i18n").TransformedText<"Vpravo dole">;
|
|
36
36
|
}];
|
|
37
37
|
export declare const DEFAULT_CHIP_VARIANTS: readonly [{
|
|
38
|
-
readonly value:
|
|
38
|
+
readonly value: 'primary';
|
|
39
39
|
readonly label: import("@wordpress/i18n").TransformedText<"Primární">;
|
|
40
40
|
}, {
|
|
41
|
-
readonly value:
|
|
41
|
+
readonly value: 'secondary';
|
|
42
42
|
readonly label: import("@wordpress/i18n").TransformedText<"Sekundární">;
|
|
43
43
|
}, {
|
|
44
|
-
readonly value:
|
|
44
|
+
readonly value: 'neutral';
|
|
45
45
|
readonly label: import("@wordpress/i18n").TransformedText<"Neutrální">;
|
|
46
46
|
}];
|
|
47
47
|
export declare const DEFAULT_MEDIA_POSITIONS: readonly [{
|
|
48
|
-
readonly value:
|
|
48
|
+
readonly value: 'left';
|
|
49
49
|
readonly label: import("@wordpress/i18n").TransformedText<"Vlevo">;
|
|
50
50
|
}, {
|
|
51
|
-
readonly value:
|
|
51
|
+
readonly value: 'right';
|
|
52
52
|
readonly label: import("@wordpress/i18n").TransformedText<"Vpravo">;
|
|
53
53
|
}];
|
|
54
54
|
export declare const DEFAULT_HEADING_STYLES: readonly [{
|
|
55
|
-
readonly value:
|
|
56
|
-
readonly label:
|
|
55
|
+
readonly value: 'h1';
|
|
56
|
+
readonly label: 'H1 styl';
|
|
57
57
|
}, {
|
|
58
|
-
readonly value:
|
|
59
|
-
readonly label:
|
|
58
|
+
readonly value: 'h2';
|
|
59
|
+
readonly label: 'H2 styl';
|
|
60
60
|
}, {
|
|
61
|
-
readonly value:
|
|
62
|
-
readonly label:
|
|
61
|
+
readonly value: 'h3';
|
|
62
|
+
readonly label: 'H3 styl';
|
|
63
63
|
}, {
|
|
64
|
-
readonly value:
|
|
65
|
-
readonly label:
|
|
64
|
+
readonly value: 'h4';
|
|
65
|
+
readonly label: 'H4 styl';
|
|
66
66
|
}];
|
|
67
67
|
export declare const DEFAULT_GRID_STYLES: readonly [{
|
|
68
|
-
readonly value:
|
|
68
|
+
readonly value: '1-1';
|
|
69
69
|
readonly label: import("@wordpress/i18n").TransformedText<"Půl na půl">;
|
|
70
70
|
}, {
|
|
71
|
-
readonly value:
|
|
71
|
+
readonly value: '2-1';
|
|
72
72
|
readonly label: import("@wordpress/i18n").TransformedText<"2/3 + 1/3">;
|
|
73
73
|
}];
|
|
74
74
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/text-and-media-group/constants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,aAAa,IAAI,qBAAqB,EAAE,cAAc,EAAC,MAAM,aAAa,CAAA;AAElF,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/text-and-media-group/constants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,aAAa,IAAI,qBAAqB,EAAE,cAAc,EAAC,MAAM,aAAa,CAAA;AAElF,eAAO,MAAM,cAAc;aACxB,KAAK,EAAE,KAAK;aAAE,KAAK,EAAE,KAAK;;aAC1B,KAAK,EAAE,KAAK;aAAE,KAAK,EAAE,KAAK;;aAC1B,KAAK,EAAE,MAAM;aAAE,KAAK,EAAE,MAAM;;aAC5B,KAAK,EAAE,KAAK;aAAE,KAAK,EAAE,KAAK;;aAC1B,KAAK,EAAE,KAAK;aAAE,KAAK,EAAE,KAAK;;aAC1B,KAAK,EAAE,KAAK;aAAE,KAAK,EAAE,KAAK;;aAC1B,KAAK,EAAE,MAAM;aAAE,KAAK,EAAE,MAAM;EACrB,CAAA;AAEV,eAAO,MAAM,cAAc;aACxB,KAAK,EAAE,UAAU;aAAE,KAAK;;aACxB,KAAK,EAAE,WAAW;aAAE,KAAK;;aACzB,KAAK,EAAE,aAAa;aAAE,KAAK;;aAC3B,KAAK,EAAE,cAAc;aAAE,KAAK;EACrB,CAAA;AAEV,eAAO,MAAM,qBAAqB;aAC/B,KAAK,EAAE,SAAS;aAAE,KAAK;;aACvB,KAAK,EAAE,WAAW;aAAE,KAAK;;aACzB,KAAK,EAAE,SAAS;aAAE,KAAK;EAChB,CAAA;AAEV,eAAO,MAAM,uBAAuB;aACjC,KAAK,EAAE,MAAM;aAAE,KAAK;;aACpB,KAAK,EAAE,OAAO;aAAE,KAAK;EACd,CAAA;AAEV,eAAO,MAAM,sBAAsB;aAChC,KAAK,EAAE,IAAI;aAAE,KAAK,EAAE,SAAS;;aAC7B,KAAK,EAAE,IAAI;aAAE,KAAK,EAAE,SAAS;;aAC7B,KAAK,EAAE,IAAI;aAAE,KAAK,EAAE,SAAS;;aAC7B,KAAK,EAAE,IAAI;aAAE,KAAK,EAAE,SAAS;EACtB,CAAA;AAEV,eAAO,MAAM,mBAAmB;aAC7B,KAAK,EAAE,KAAK;aAAE,KAAK;;aACnB,KAAK,EAAE,KAAK;aAAE,KAAK;EACZ,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/text-and-media-group/edit.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EASV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,SAAS,CAAA;AAEhB,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/groups/text-and-media-group/edit.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EASV,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,SAAS,CAAA;AAEhB,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,wBAAwB,oCAWxE;IACD,UAAU,EAAE,2BAA2B,CAAA;IACvC,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,KAAK,IAAI,CAAA;CACjE,iCA8LF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { BlockControls, InspectorControls, RichText } from '@wordpress/block-editor';
|
|
3
3
|
import { PanelBody, TextControl, __experimentalToggleGroupControl as ToggleGroupControl, __experimentalToggleGroupControlOption as ToggleGroupControlOption, ToolbarButton, ToolbarGroup, } from '@wordpress/components';
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
@@ -5,32 +5,33 @@ import { DEFAULT_CHIP_VARIANTS, DEFAULT_CONTENT_SIZES, DEFAULT_GRID_STYLES, DEFA
|
|
|
5
5
|
import { createTextAndMediaGroupEdit } from './edit';
|
|
6
6
|
import { icon as defaultIcon } from './icon';
|
|
7
7
|
export function createTextAndMediaGroupBlock(options) {
|
|
8
|
-
var _a, _b, _c, _d
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
8
|
+
var _a, _b, _c, _d;
|
|
9
|
+
var _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
10
|
+
const ratios = (_e = options.ratios) !== null && _e !== void 0 ? _e : DEFAULT_RATIOS;
|
|
11
|
+
const mediaPositions = (_f = options.mediaPositions) !== null && _f !== void 0 ? _f : DEFAULT_MEDIA_POSITIONS;
|
|
12
|
+
const gridStyles = (_g = options.gridStyles) !== null && _g !== void 0 ? _g : DEFAULT_GRID_STYLES;
|
|
13
|
+
const headingStyles = (_h = options.headingStyles) !== null && _h !== void 0 ? _h : DEFAULT_HEADING_STYLES;
|
|
14
|
+
const contentSizes = (_j = options.contentSizes) !== null && _j !== void 0 ? _j : DEFAULT_CONTENT_SIZES;
|
|
15
|
+
const chipVariants = (_k = options.chipVariants) !== null && _k !== void 0 ? _k : DEFAULT_CHIP_VARIANTS;
|
|
15
16
|
return {
|
|
16
17
|
name: options.name,
|
|
17
|
-
title: (
|
|
18
|
+
title: (_l = options.title) !== null && _l !== void 0 ? _l : __('Text a média', 'brilo-blocks'),
|
|
18
19
|
description: options.description,
|
|
19
|
-
category: (
|
|
20
|
+
category: (_m = options.category) !== null && _m !== void 0 ? _m : 'layout',
|
|
20
21
|
...(options.parent && { parent: options.parent }),
|
|
21
|
-
icon: (
|
|
22
|
+
icon: (_o = options.icon) !== null && _o !== void 0 ? _o : { src: defaultIcon },
|
|
22
23
|
supports: { html: false, customClassName: false },
|
|
23
24
|
attributes: {
|
|
24
25
|
header: {
|
|
25
26
|
type: 'object',
|
|
26
27
|
default: {
|
|
27
|
-
heading: { title: '', level: HEADING_LEVELS[1], style: (
|
|
28
|
+
heading: { title: '', level: HEADING_LEVELS[1], style: (_p = (_a = headingStyles[1]) === null || _a === void 0 ? void 0 : _a.value) !== null && _p !== void 0 ? _p : headingStyles[0].value },
|
|
28
29
|
overline: { title: '' },
|
|
29
30
|
},
|
|
30
31
|
},
|
|
31
32
|
mediaPosition: {
|
|
32
33
|
type: 'string',
|
|
33
|
-
default: (
|
|
34
|
+
default: (_q = (_b = mediaPositions[1]) === null || _b === void 0 ? void 0 : _b.value) !== null && _q !== void 0 ? _q : mediaPositions[0].value,
|
|
34
35
|
enum: mediaPositions.map((p) => p.value),
|
|
35
36
|
},
|
|
36
37
|
img: {
|
|
@@ -44,7 +45,7 @@ export function createTextAndMediaGroupBlock(options) {
|
|
|
44
45
|
},
|
|
45
46
|
ratio: {
|
|
46
47
|
type: 'string',
|
|
47
|
-
default: (
|
|
48
|
+
default: (_r = (_c = ratios[2]) === null || _c === void 0 ? void 0 : _c.value) !== null && _r !== void 0 ? _r : ratios[0].value,
|
|
48
49
|
enum: ratios.map((r) => r.value),
|
|
49
50
|
},
|
|
50
51
|
gridStyle: {
|
|
@@ -52,7 +53,7 @@ export function createTextAndMediaGroupBlock(options) {
|
|
|
52
53
|
default: gridStyles[0].value,
|
|
53
54
|
enum: gridStyles.map((g) => g.value),
|
|
54
55
|
},
|
|
55
|
-
content: { type: 'object', default: { size: (_s = (
|
|
56
|
+
content: { type: 'object', default: { size: (_s = (_d = contentSizes[1]) === null || _d === void 0 ? void 0 : _d.value) !== null && _s !== void 0 ? _s : contentSizes[0].value } },
|
|
56
57
|
},
|
|
57
58
|
edit: createTextAndMediaGroupEdit(options),
|
|
58
59
|
save: () => _jsx(InnerBlocks.Content, {}),
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export declare const VARIANTS: readonly [{
|
|
2
|
-
readonly value:
|
|
2
|
+
readonly value: 'default';
|
|
3
3
|
readonly label: import("@wordpress/i18n").TransformedText<"Výchozí">;
|
|
4
4
|
}, {
|
|
5
|
-
readonly value:
|
|
5
|
+
readonly value: 'full-width';
|
|
6
6
|
readonly label: import("@wordpress/i18n").TransformedText<"Na plnou šířku">;
|
|
7
7
|
}];
|
|
8
8
|
export declare const EFFECTS: readonly [{
|
|
9
|
-
readonly value:
|
|
9
|
+
readonly value: 'creative';
|
|
10
10
|
readonly label: import("@wordpress/i18n").TransformedText<"Slide">;
|
|
11
11
|
}, {
|
|
12
|
-
readonly value:
|
|
12
|
+
readonly value: 'fade';
|
|
13
13
|
readonly label: import("@wordpress/i18n").TransformedText<"Fade">;
|
|
14
14
|
}];
|
|
15
15
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/hero/hero-group/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/hero/hero-group/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ;aAEjB,KAAK,EAAE,SAAS;aAChB,KAAK;;aAGL,KAAK,EAAE,YAAY;aACnB,KAAK;EAEC,CAAA;AAEV,eAAO,MAAM,OAAO;aAEhB,KAAK,EAAE,UAAU;aACjB,KAAK;;aAGL,KAAK,EAAE,MAAM;aACb,KAAK;EAEC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/hero/hero-group/edit.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAA;AAarD,OAAO,KAAK,EAAS,mBAAmB,EAAE,gBAAgB,EAAU,MAAM,SAAS,CAAA;AAEnF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/hero/hero-group/edit.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAA;AAarD,OAAO,KAAK,EAAS,mBAAmB,EAAE,gBAAgB,EAAU,MAAM,SAAS,CAAA;AAEnF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,WAI/B,cAAc,CAAC,mBAAmB,CAAC,iCA6DhE"}
|