@brilo/base-blocks 0.1.36 → 0.1.37

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.
Files changed (120) hide show
  1. package/build/.tsbuildinfo +1 -1
  2. package/build/blocks/event/event-calendar-group/constants.d.ts +2 -0
  3. package/build/blocks/event/event-calendar-group/constants.d.ts.map +1 -0
  4. package/build/blocks/event/event-calendar-group/constants.js +2 -0
  5. package/build/blocks/event/event-calendar-group/edit.d.ts +6 -0
  6. package/build/blocks/event/event-calendar-group/edit.d.ts.map +1 -0
  7. package/build/blocks/event/event-calendar-group/edit.js +18 -0
  8. package/build/blocks/event/event-calendar-group/factory.d.ts +5 -0
  9. package/build/blocks/event/event-calendar-group/factory.d.ts.map +1 -0
  10. package/build/blocks/event/event-calendar-group/factory.js +25 -0
  11. package/build/blocks/event/event-calendar-group/icon.d.ts +2 -0
  12. package/build/blocks/event/event-calendar-group/icon.d.ts.map +1 -0
  13. package/build/blocks/event/event-calendar-group/icon.js +2 -0
  14. package/build/blocks/event/event-calendar-group/index.d.ts +6 -0
  15. package/build/blocks/event/event-calendar-group/index.d.ts.map +1 -0
  16. package/build/blocks/event/event-calendar-group/index.js +6 -0
  17. package/build/blocks/event/event-calendar-group/types.d.ts +12 -0
  18. package/build/blocks/event/event-calendar-group/types.d.ts.map +1 -0
  19. package/build/blocks/event/event-calendar-group/types.js +1 -0
  20. package/build/blocks/event/event-detail-content/constants.d.ts +2 -0
  21. package/build/blocks/event/event-detail-content/constants.d.ts.map +1 -0
  22. package/build/blocks/event/event-detail-content/constants.js +1 -0
  23. package/build/blocks/event/event-detail-content/edit.d.ts +6 -0
  24. package/build/blocks/event/event-detail-content/edit.d.ts.map +1 -0
  25. package/build/blocks/event/event-detail-content/edit.js +9 -0
  26. package/build/blocks/event/event-detail-content/factory.d.ts +5 -0
  27. package/build/blocks/event/event-detail-content/factory.d.ts.map +1 -0
  28. package/build/blocks/event/event-detail-content/factory.js +18 -0
  29. package/build/blocks/event/event-detail-content/icon.d.ts +2 -0
  30. package/build/blocks/event/event-detail-content/icon.d.ts.map +1 -0
  31. package/build/blocks/event/event-detail-content/icon.js +2 -0
  32. package/build/blocks/event/event-detail-content/index.d.ts +5 -0
  33. package/build/blocks/event/event-detail-content/index.d.ts.map +1 -0
  34. package/build/blocks/event/event-detail-content/index.js +5 -0
  35. package/build/blocks/event/event-detail-content/types.d.ts +6 -0
  36. package/build/blocks/event/event-detail-content/types.d.ts.map +1 -0
  37. package/build/blocks/event/event-detail-content/types.js +1 -0
  38. package/build/blocks/event/event-detail-header/constants.d.ts +2 -0
  39. package/build/blocks/event/event-detail-header/constants.d.ts.map +1 -0
  40. package/build/blocks/event/event-detail-header/constants.js +1 -0
  41. package/build/blocks/event/event-detail-header/edit.d.ts +6 -0
  42. package/build/blocks/event/event-detail-header/edit.d.ts.map +1 -0
  43. package/build/blocks/event/event-detail-header/edit.js +11 -0
  44. package/build/blocks/event/event-detail-header/factory.d.ts +5 -0
  45. package/build/blocks/event/event-detail-header/factory.d.ts.map +1 -0
  46. package/build/blocks/event/event-detail-header/factory.js +22 -0
  47. package/build/blocks/event/event-detail-header/icon.d.ts +2 -0
  48. package/build/blocks/event/event-detail-header/icon.d.ts.map +1 -0
  49. package/build/blocks/event/event-detail-header/icon.js +2 -0
  50. package/build/blocks/event/event-detail-header/index.d.ts +5 -0
  51. package/build/blocks/event/event-detail-header/index.d.ts.map +1 -0
  52. package/build/blocks/event/event-detail-header/index.js +5 -0
  53. package/build/blocks/event/event-detail-header/types.d.ts +9 -0
  54. package/build/blocks/event/event-detail-header/types.d.ts.map +1 -0
  55. package/build/blocks/event/event-detail-header/types.js +1 -0
  56. package/build/blocks/event/event-list-group/constants.d.ts +5 -0
  57. package/build/blocks/event/event-list-group/constants.d.ts.map +1 -0
  58. package/build/blocks/event/event-list-group/constants.js +5 -0
  59. package/build/blocks/event/event-list-group/edit.d.ts +6 -0
  60. package/build/blocks/event/event-list-group/edit.d.ts.map +1 -0
  61. package/build/blocks/event/event-list-group/edit.js +23 -0
  62. package/build/blocks/event/event-list-group/factory.d.ts +5 -0
  63. package/build/blocks/event/event-list-group/factory.d.ts.map +1 -0
  64. package/build/blocks/event/event-list-group/factory.js +28 -0
  65. package/build/blocks/event/event-list-group/icon.d.ts +2 -0
  66. package/build/blocks/event/event-list-group/icon.d.ts.map +1 -0
  67. package/build/blocks/event/event-list-group/icon.js +2 -0
  68. package/build/blocks/event/event-list-group/index.d.ts +8 -0
  69. package/build/blocks/event/event-list-group/index.d.ts.map +1 -0
  70. package/build/blocks/event/event-list-group/index.js +8 -0
  71. package/build/blocks/event/event-list-group/types.d.ts +30 -0
  72. package/build/blocks/event/event-list-group/types.d.ts.map +1 -0
  73. package/build/blocks/event/event-list-group/types.js +7 -0
  74. package/build/components/Event/EntitySelectModal.d.ts +27 -0
  75. package/build/components/Event/EntitySelectModal.d.ts.map +1 -0
  76. package/build/components/Event/EntitySelectModal.js +100 -0
  77. package/build/components/Event/EventSelectModal.d.ts +7 -0
  78. package/build/components/Event/EventSelectModal.d.ts.map +1 -0
  79. package/build/components/Event/EventSelectModal.js +42 -0
  80. package/build/components/Event/EventTermSelectModal.d.ts +7 -0
  81. package/build/components/Event/EventTermSelectModal.d.ts.map +1 -0
  82. package/build/components/Event/EventTermSelectModal.js +48 -0
  83. package/build/index.d.ts +8 -0
  84. package/build/index.d.ts.map +1 -1
  85. package/build/index.js +4 -0
  86. package/build/types.d.ts +4 -0
  87. package/build/types.d.ts.map +1 -1
  88. package/package.json +1 -1
  89. package/src/blocks/event/event-calendar-group/constants.ts +3 -0
  90. package/src/blocks/event/event-calendar-group/edit.tsx +60 -0
  91. package/src/blocks/event/event-calendar-group/editor.scss +13 -0
  92. package/src/blocks/event/event-calendar-group/factory.tsx +30 -0
  93. package/src/blocks/event/event-calendar-group/icon.tsx +13 -0
  94. package/src/blocks/event/event-calendar-group/index.tsx +10 -0
  95. package/src/blocks/event/event-calendar-group/types.ts +13 -0
  96. package/src/blocks/event/event-detail-content/constants.ts +1 -0
  97. package/src/blocks/event/event-detail-content/edit.tsx +24 -0
  98. package/src/blocks/event/event-detail-content/factory.tsx +22 -0
  99. package/src/blocks/event/event-detail-content/icon.tsx +9 -0
  100. package/src/blocks/event/event-detail-content/index.ts +9 -0
  101. package/src/blocks/event/event-detail-content/types.ts +5 -0
  102. package/src/blocks/event/event-detail-header/constants.ts +2 -0
  103. package/src/blocks/event/event-detail-header/edit.tsx +49 -0
  104. package/src/blocks/event/event-detail-header/factory.tsx +26 -0
  105. package/src/blocks/event/event-detail-header/icon.tsx +8 -0
  106. package/src/blocks/event/event-detail-header/index.ts +9 -0
  107. package/src/blocks/event/event-detail-header/types.ts +9 -0
  108. package/src/blocks/event/event-list-group/constants.ts +6 -0
  109. package/src/blocks/event/event-list-group/edit.tsx +84 -0
  110. package/src/blocks/event/event-list-group/editor.scss +9 -0
  111. package/src/blocks/event/event-list-group/factory.tsx +33 -0
  112. package/src/blocks/event/event-list-group/icon.tsx +27 -0
  113. package/src/blocks/event/event-list-group/index.tsx +12 -0
  114. package/src/blocks/event/event-list-group/types.ts +27 -0
  115. package/src/components/Event/EntitySelectModal.tsx +249 -0
  116. package/src/components/Event/EventSelectModal.tsx +51 -0
  117. package/src/components/Event/EventTermSelectModal.tsx +58 -0
  118. package/src/editor.scss +2 -0
  119. package/src/index.ts +36 -0
  120. package/src/types.ts +5 -0
@@ -0,0 +1,2 @@
1
+ export declare const DEFAULT_EMPTY_MESSAGE: import("@wordpress/i18n").TransformedText<"Nebyly nalezeny žádné události.">;
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-calendar-group/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,8EAAwD,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { __ } from '@wordpress/i18n';
2
+ export const DEFAULT_EMPTY_MESSAGE = __('Nebyly nalezeny žádné události.', 'brilo-blocks');
@@ -0,0 +1,6 @@
1
+ import type { EventCalendarGroupAttributes, EventCalendarGroupOptions } from './types';
2
+ export declare function createEventCalendarGroupEdit(options: EventCalendarGroupOptions): ({ attributes, setAttributes, }: {
3
+ attributes: EventCalendarGroupAttributes;
4
+ setAttributes: (a: Partial<EventCalendarGroupAttributes>) => void;
5
+ }) => import("react").JSX.Element;
6
+ //# sourceMappingURL=edit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-calendar-group/edit.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,4BAA4B,EAAE,yBAAyB,EAAC,MAAM,SAAS,CAAA;AAGpF,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,yBAAyB,oCAI1E;IACD,UAAU,EAAE,4BAA4B,CAAA;IACxC,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,4BAA4B,CAAC,KAAK,IAAI,CAAA;CAClE,iCA8CF"}
@@ -0,0 +1,18 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { InspectorControls, useBlockProps } from '@wordpress/block-editor';
3
+ import { PanelBody, ToggleControl, TextControl, __experimentalInputControl as InputControl } from '@wordpress/components';
4
+ import { __ } from '@wordpress/i18n';
5
+ import { Icon, calendar } from '@wordpress/icons';
6
+ export function createEventCalendarGroupEdit(options) {
7
+ return function Edit({ attributes, setAttributes, }) {
8
+ var _a;
9
+ const { showNow, month, selectedCategories, emptyMessage } = attributes;
10
+ const blockProps = useBlockProps({ className: 'g-event-calendar wp-block-section' });
11
+ return (_jsxs(_Fragment, { children: [_jsx(InspectorControls, { children: _jsxs(PanelBody, { title: __('Nastavení kalendáře', 'brilo-blocks'), initialOpen: true, children: [_jsx(ToggleControl, { label: __('Zobrazit aktuální měsíc', 'brilo-blocks'), checked: showNow, onChange: (value) => setAttributes({ showNow: value }) }), !showNow && (_jsx(InputControl, { label: 'Výběr měsíce a roku', type: 'month', value: month, onChange: (value) => setAttributes({ month: value }) })), _jsx(TextControl, { label: __('Zpráva při prázdném výsledku', 'brilo-blocks'), value: emptyMessage, onChange: (value) => setAttributes({ emptyMessage: value }) })] }) }), _jsxs("div", { ...blockProps, children: [_jsx(Icon, { icon: calendar }), _jsx("div", { className: "g-event-calendar__label", children: __('Kalendář událostí', 'brilo-blocks') }), _jsx("div", { className: "g-event-calendar__instructions", children: showNow
12
+ ? __('Zobrazuje události pro aktuální měsíc.', 'brilo-blocks')
13
+ : `${__('Zobrazuje události pro', 'brilo-blocks')} ${month}` }), (_a = options.renderCategoryControl) === null || _a === void 0 ? void 0 : _a.call(options, {
14
+ selectedItems: selectedCategories,
15
+ onChange: (ids) => setAttributes({ selectedCategories: ids }),
16
+ })] })] }));
17
+ };
18
+ }
@@ -0,0 +1,5 @@
1
+ import type { BlockConfiguration } from '@wordpress/blocks';
2
+ import type { EventCalendarGroupAttributes, EventCalendarGroupOptions } from './types';
3
+ export type { EventCalendarGroupAttributes, EventCalendarGroupOptions };
4
+ export declare function createEventCalendarGroupBlock(options: EventCalendarGroupOptions): BlockConfiguration<EventCalendarGroupAttributes>;
5
+ //# sourceMappingURL=factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-calendar-group/factory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAA;AAKzD,OAAO,KAAK,EAAC,4BAA4B,EAAE,yBAAyB,EAAC,MAAM,SAAS,CAAA;AAEpF,YAAY,EAAC,4BAA4B,EAAE,yBAAyB,EAAC,CAAA;AAErE,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,yBAAyB,GAAG,kBAAkB,CAAC,4BAA4B,CAAC,CAoBlI"}
@@ -0,0 +1,25 @@
1
+ import { __ } from '@wordpress/i18n';
2
+ import { DEFAULT_EMPTY_MESSAGE } from './constants';
3
+ import { createEventCalendarGroupEdit } from './edit';
4
+ import { icon as defaultIcon } from './icon';
5
+ export function createEventCalendarGroupBlock(options) {
6
+ var _a, _b, _c, _d;
7
+ const emptyMessage = (_a = options.emptyMessage) !== null && _a !== void 0 ? _a : DEFAULT_EMPTY_MESSAGE;
8
+ return {
9
+ name: options.name,
10
+ title: (_b = options.title) !== null && _b !== void 0 ? _b : __('Kalendář událostí', 'brilo-blocks'),
11
+ description: options.description,
12
+ category: (_c = options.category) !== null && _c !== void 0 ? _c : 'layout',
13
+ icon: (_d = options.icon) !== null && _d !== void 0 ? _d : { src: defaultIcon },
14
+ ...(options.parent && { parent: options.parent }),
15
+ supports: { html: false, customClassName: false },
16
+ attributes: {
17
+ showNow: { type: 'boolean', default: true },
18
+ month: { type: 'string', default: '' },
19
+ selectedCategories: { type: 'array', default: [] },
20
+ emptyMessage: { type: 'string', default: emptyMessage },
21
+ },
22
+ edit: createEventCalendarGroupEdit(options),
23
+ save: () => null,
24
+ };
25
+ }
@@ -0,0 +1,2 @@
1
+ export declare const icon: import("react").JSX.Element;
2
+ //# sourceMappingURL=icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-calendar-group/icon.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,6BAYhB,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export const icon = (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "24", height: "24", "aria-hidden": "true", focusable: "false", children: _jsx("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z" }) }));
@@ -0,0 +1,6 @@
1
+ export type { EventCalendarGroupAttributes, EventCalendarGroupOptions } from './types';
2
+ export { createEventCalendarGroupBlock } from './factory';
3
+ export { EventTermSelectModal } from '../../../components/Event/EventTermSelectModal';
4
+ import type { EventCalendarGroupOptions } from './types';
5
+ export declare const eventCalendarGroupDefaults: EventCalendarGroupOptions;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-calendar-group/index.tsx"],"names":[],"mappings":"AAAA,YAAY,EAAC,4BAA4B,EAAE,yBAAyB,EAAC,MAAM,SAAS,CAAA;AACpF,OAAO,EAAC,6BAA6B,EAAC,MAAM,WAAW,CAAA;AACvD,OAAO,EAAC,oBAAoB,EAAC,MAAM,yCAAyC,CAAA;AAE5E,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,SAAS,CAAA;AAEtD,eAAO,MAAM,0BAA0B,EAAE,yBAGxC,CAAA"}
@@ -0,0 +1,6 @@
1
+ export { createEventCalendarGroupBlock } from './factory';
2
+ export { EventTermSelectModal } from '../../../components/Event/EventTermSelectModal';
3
+ export const eventCalendarGroupDefaults = {
4
+ name: 'brilo/event-calendar-group',
5
+ parent: ['brilo/base-section'],
6
+ };
@@ -0,0 +1,12 @@
1
+ import type { BriloBlockType, SelectControlProps } from '../../../types';
2
+ export interface EventCalendarGroupAttributes extends Record<string, unknown> {
3
+ showNow: boolean;
4
+ month: string;
5
+ selectedCategories: number[];
6
+ emptyMessage: string;
7
+ }
8
+ export interface EventCalendarGroupOptions extends BriloBlockType {
9
+ emptyMessage?: string;
10
+ renderCategoryControl?: (props: SelectControlProps) => JSX.Element;
11
+ }
12
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-calendar-group/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAA;AAE/D,MAAM,WAAW,4BAA6B,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC3E,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAC5B,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,yBAA0B,SAAQ,cAAc;IAC/D,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,GAAG,CAAC,OAAO,CAAA;CACnE"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-detail-content/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAA"}
@@ -0,0 +1,6 @@
1
+ import type { EventDetailContentAttributes, EventDetailContentOptions } from './types';
2
+ export declare function createEventDetailContentEdit(_options: EventDetailContentOptions): ({ attributes: _attributes, setAttributes: _setAttributes, }: {
3
+ attributes: EventDetailContentAttributes;
4
+ setAttributes: (a: Partial<EventDetailContentAttributes>) => void;
5
+ }) => import("react").JSX.Element;
6
+ //# sourceMappingURL=edit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-detail-content/edit.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,4BAA4B,EAAE,yBAAyB,EAAC,MAAM,SAAS,CAAA;AAEpF,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,yBAAyB,iEAI3E;IACD,UAAU,EAAE,4BAA4B,CAAA;IACxC,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,4BAA4B,CAAC,KAAK,IAAI,CAAA;CAClE,iCAYF"}
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useBlockProps } from '@wordpress/block-editor';
3
+ import { __ } from '@wordpress/i18n';
4
+ export function createEventDetailContentEdit(_options) {
5
+ return function Edit({ attributes: _attributes, setAttributes: _setAttributes, }) {
6
+ const blockProps = useBlockProps({ className: 'event-detail-content wp-block-section' });
7
+ return (_jsx("div", { ...blockProps, children: _jsxs("div", { className: "event-detail-content", children: [_jsx("div", { className: "event-detail-content__label", children: __('Obsah detailu události', 'brilo-blocks') }), _jsx("div", { className: "event-detail-content__instructions", children: __('Zástupný blok pro obsah události.', 'brilo-blocks') })] }) }));
8
+ };
9
+ }
@@ -0,0 +1,5 @@
1
+ import type { BlockConfiguration } from '@wordpress/blocks';
2
+ import type { EventDetailContentAttributes, EventDetailContentOptions } from './types';
3
+ export type { EventDetailContentAttributes, EventDetailContentOptions };
4
+ export declare function createEventDetailContentBlock(options: EventDetailContentOptions): BlockConfiguration<EventDetailContentAttributes>;
5
+ //# sourceMappingURL=factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-detail-content/factory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAA;AAIzD,OAAO,KAAK,EAAC,4BAA4B,EAAE,yBAAyB,EAAC,MAAM,SAAS,CAAA;AAEpF,YAAY,EAAC,4BAA4B,EAAE,yBAAyB,EAAC,CAAA;AAErE,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,yBAAyB,GAAG,kBAAkB,CAAC,4BAA4B,CAAC,CAalI"}
@@ -0,0 +1,18 @@
1
+ import { __ } from '@wordpress/i18n';
2
+ import { createEventDetailContentEdit } from './edit';
3
+ import { icon as defaultIcon } from './icon';
4
+ export function createEventDetailContentBlock(options) {
5
+ var _a, _b, _c;
6
+ return {
7
+ name: options.name,
8
+ title: (_a = options.title) !== null && _a !== void 0 ? _a : __('Obsah detailu události', 'brilo-blocks'),
9
+ description: options.description,
10
+ category: (_b = options.category) !== null && _b !== void 0 ? _b : 'layout',
11
+ icon: (_c = options.icon) !== null && _c !== void 0 ? _c : { src: defaultIcon },
12
+ ...(options.parent && { parent: options.parent }),
13
+ supports: { html: false, customClassName: false },
14
+ attributes: {},
15
+ edit: createEventDetailContentEdit(options),
16
+ save: () => null,
17
+ };
18
+ }
@@ -0,0 +1,2 @@
1
+ export declare const icon: import("react").JSX.Element;
2
+ //# sourceMappingURL=icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-detail-content/icon.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,6BAQhB,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export const icon = (_jsxs("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("rect", { x: "3", y: "2", width: "14", height: "16", rx: "1", stroke: "black", fill: "none" }), _jsx("line", { x1: "6", y1: "6", x2: "14", y2: "6", stroke: "black" }), _jsx("line", { x1: "6", y1: "9", x2: "14", y2: "9", stroke: "black" }), _jsx("line", { x1: "6", y1: "12", x2: "14", y2: "12", stroke: "black" }), _jsx("line", { x1: "6", y1: "15", x2: "10", y2: "15", stroke: "black" })] }));
@@ -0,0 +1,5 @@
1
+ export type { EventDetailContentAttributes, EventDetailContentOptions } from './types';
2
+ export { createEventDetailContentBlock } from './factory';
3
+ import type { EventDetailContentOptions } from './types';
4
+ export declare const eventDetailContentDefaults: EventDetailContentOptions;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-detail-content/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,4BAA4B,EAAE,yBAAyB,EAAC,MAAM,SAAS,CAAA;AACpF,OAAO,EAAC,6BAA6B,EAAC,MAAM,WAAW,CAAA;AAEvD,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,SAAS,CAAA;AAEtD,eAAO,MAAM,0BAA0B,EAAE,yBAGxC,CAAA"}
@@ -0,0 +1,5 @@
1
+ export { createEventDetailContentBlock } from './factory';
2
+ export const eventDetailContentDefaults = {
3
+ name: 'brilo/event-detail-content',
4
+ parent: ['brilo/base-section'],
5
+ };
@@ -0,0 +1,6 @@
1
+ import type { BriloBlockType } from '../../../types';
2
+ export interface EventDetailContentAttributes extends Record<string, unknown> {
3
+ }
4
+ export interface EventDetailContentOptions extends BriloBlockType {
5
+ }
6
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-detail-content/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AAE3C,MAAM,WAAW,4BAA6B,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAAG;AAEhF,MAAM,WAAW,yBAA0B,SAAQ,cAAc;CAAG"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-detail-header/constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAA"}
@@ -0,0 +1,6 @@
1
+ import type { EventDetailHeaderAttributes, EventDetailHeaderOptions } from './types';
2
+ export declare function createEventDetailHeaderEdit(_options: EventDetailHeaderOptions): ({ attributes, setAttributes, }: {
3
+ attributes: EventDetailHeaderAttributes;
4
+ setAttributes: (a: Partial<EventDetailHeaderAttributes>) => void;
5
+ }) => import("react").JSX.Element;
6
+ //# sourceMappingURL=edit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-detail-header/edit.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,2BAA2B,EAAE,wBAAwB,EAAC,MAAM,SAAS,CAAA;AAElF,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,wBAAwB,oCAIzE;IACD,UAAU,EAAE,2BAA2B,CAAA;IACvC,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,KAAK,IAAI,CAAA;CACjE,iCAoCF"}
@@ -0,0 +1,11 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { InspectorControls, useBlockProps } from '@wordpress/block-editor';
3
+ import { PanelBody, ToggleControl } from '@wordpress/components';
4
+ import { __ } from '@wordpress/i18n';
5
+ export function createEventDetailHeaderEdit(_options) {
6
+ return function Edit({ attributes, setAttributes, }) {
7
+ const { showDate, showPlace, showPrice } = attributes;
8
+ const blockProps = useBlockProps({ className: 'event-detail-header wp-block-section' });
9
+ return (_jsxs(_Fragment, { children: [_jsx(InspectorControls, { children: _jsxs(PanelBody, { title: __('Nastavení hlavičky', 'brilo-blocks'), initialOpen: true, children: [_jsx(ToggleControl, { label: __('Zobrazit datum', 'brilo-blocks'), checked: showDate, onChange: (value) => setAttributes({ showDate: value }) }), _jsx(ToggleControl, { label: __('Zobrazit místo', 'brilo-blocks'), checked: showPlace, onChange: (value) => setAttributes({ showPlace: value }) }), _jsx(ToggleControl, { label: __('Zobrazit cenu', 'brilo-blocks'), checked: showPrice, onChange: (value) => setAttributes({ showPrice: value }) })] }) }), _jsx("div", { ...blockProps, children: _jsxs("div", { className: "event-detail-header", children: [_jsx("div", { className: "event-detail-header__label", children: __('Hlavička detailu události', 'brilo-blocks') }), _jsx("div", { className: "event-detail-header__instructions", children: __('Zástupný blok pro hlavičku události.', 'brilo-blocks') })] }) })] }));
10
+ };
11
+ }
@@ -0,0 +1,5 @@
1
+ import type { BlockConfiguration } from '@wordpress/blocks';
2
+ import type { EventDetailHeaderAttributes, EventDetailHeaderOptions } from './types';
3
+ export type { EventDetailHeaderAttributes, EventDetailHeaderOptions };
4
+ export declare function createEventDetailHeaderBlock(options: EventDetailHeaderOptions): BlockConfiguration<EventDetailHeaderAttributes>;
5
+ //# sourceMappingURL=factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-detail-header/factory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAA;AAIzD,OAAO,KAAK,EAAC,2BAA2B,EAAE,wBAAwB,EAAC,MAAM,SAAS,CAAA;AAElF,YAAY,EAAC,2BAA2B,EAAE,wBAAwB,EAAC,CAAA;AAEnE,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,wBAAwB,GAAG,kBAAkB,CAAC,2BAA2B,CAAC,CAiB/H"}
@@ -0,0 +1,22 @@
1
+ import { __ } from '@wordpress/i18n';
2
+ import { createEventDetailHeaderEdit } from './edit';
3
+ import { icon as defaultIcon } from './icon';
4
+ export function createEventDetailHeaderBlock(options) {
5
+ var _a, _b, _c;
6
+ return {
7
+ name: options.name,
8
+ title: (_a = options.title) !== null && _a !== void 0 ? _a : __('Hlavička detailu události', 'brilo-blocks'),
9
+ description: options.description,
10
+ category: (_b = options.category) !== null && _b !== void 0 ? _b : 'layout',
11
+ icon: (_c = options.icon) !== null && _c !== void 0 ? _c : { src: defaultIcon },
12
+ ...(options.parent && { parent: options.parent }),
13
+ supports: { html: false, customClassName: false },
14
+ attributes: {
15
+ showDate: { type: 'boolean', default: true },
16
+ showPlace: { type: 'boolean', default: true },
17
+ showPrice: { type: 'boolean', default: true },
18
+ },
19
+ edit: createEventDetailHeaderEdit(options),
20
+ save: () => null,
21
+ };
22
+ }
@@ -0,0 +1,2 @@
1
+ export declare const icon: import("react").JSX.Element;
2
+ //# sourceMappingURL=icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-detail-header/icon.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,6BAOhB,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export const icon = (_jsxs("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("rect", { x: "2", y: "3", width: "16", height: "4", rx: "1", stroke: "black", fill: "none" }), _jsx("line", { x1: "2", y1: "10", x2: "14", y2: "10", stroke: "black" }), _jsx("line", { x1: "2", y1: "13", x2: "18", y2: "13", stroke: "black" }), _jsx("line", { x1: "2", y1: "16", x2: "10", y2: "16", stroke: "black" })] }));
@@ -0,0 +1,5 @@
1
+ export type { EventDetailHeaderAttributes, EventDetailHeaderOptions } from './types';
2
+ export { createEventDetailHeaderBlock } from './factory';
3
+ import type { EventDetailHeaderOptions } from './types';
4
+ export declare const eventDetailHeaderDefaults: EventDetailHeaderOptions;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-detail-header/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,2BAA2B,EAAE,wBAAwB,EAAC,MAAM,SAAS,CAAA;AAClF,OAAO,EAAC,4BAA4B,EAAC,MAAM,WAAW,CAAA;AAEtD,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,SAAS,CAAA;AAErD,eAAO,MAAM,yBAAyB,EAAE,wBAGvC,CAAA"}
@@ -0,0 +1,5 @@
1
+ export { createEventDetailHeaderBlock } from './factory';
2
+ export const eventDetailHeaderDefaults = {
3
+ name: 'brilo/event-detail-header',
4
+ parent: ['brilo/base-section'],
5
+ };
@@ -0,0 +1,9 @@
1
+ import type { BriloBlockType } from '../../../types';
2
+ export interface EventDetailHeaderAttributes extends Record<string, unknown> {
3
+ showDate: boolean;
4
+ showPlace: boolean;
5
+ showPrice: boolean;
6
+ }
7
+ export interface EventDetailHeaderOptions extends BriloBlockType {
8
+ }
9
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-detail-header/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AAE3C,MAAM,WAAW,2BAA4B,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC1E,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,wBAAyB,SAAQ,cAAc;CAAG"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare const DEFAULT_EMPTY_MESSAGE: import("@wordpress/i18n").TransformedText<"Nebyly nalezeny žádné události.">;
2
+ export declare const EVENTS_PER_PAGE_MIN = 1;
3
+ export declare const EVENTS_PER_PAGE_MAX = 18;
4
+ export declare const EVENTS_PER_PAGE_DEFAULT = 6;
5
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-list-group/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,8EAAwD,CAAA;AAC1F,eAAO,MAAM,mBAAmB,IAAI,CAAA;AACpC,eAAO,MAAM,mBAAmB,KAAK,CAAA;AACrC,eAAO,MAAM,uBAAuB,IAAI,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { __ } from '@wordpress/i18n';
2
+ export const DEFAULT_EMPTY_MESSAGE = __('Nebyly nalezeny žádné události.', 'brilo-blocks');
3
+ export const EVENTS_PER_PAGE_MIN = 1;
4
+ export const EVENTS_PER_PAGE_MAX = 18;
5
+ export const EVENTS_PER_PAGE_DEFAULT = 6;
@@ -0,0 +1,6 @@
1
+ import type { EventListGroupAttributes, EventListGroupOptions } from './types';
2
+ export declare function createEventListGroupEdit(options: EventListGroupOptions): ({ attributes, setAttributes, }: {
3
+ attributes: EventListGroupAttributes;
4
+ setAttributes: (a: Partial<EventListGroupAttributes>) => void;
5
+ }) => import("react").JSX.Element;
6
+ //# sourceMappingURL=edit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-list-group/edit.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,wBAAwB,EAAsB,qBAAqB,EAAC,MAAM,SAAS,CAAA;AAEhG,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,qBAAqB,oCAIlE;IACD,UAAU,EAAE,wBAAwB,CAAA;IACpC,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,KAAK,IAAI,CAAA;CAC9D,iCAqEF"}
@@ -0,0 +1,23 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { InspectorControls, useBlockProps } from '@wordpress/block-editor';
3
+ import { PanelBody, RangeControl, SelectControl, ToggleControl, TextControl } from '@wordpress/components';
4
+ import { __ } from '@wordpress/i18n';
5
+ import { EVENTS_PER_PAGE_DEFAULT, EVENTS_PER_PAGE_MAX, EVENTS_PER_PAGE_MIN } from './constants';
6
+ import { EVENT_LIST_GROUP_MODES } from './types';
7
+ export function createEventListGroupEdit(options) {
8
+ return function Edit({ attributes, setAttributes, }) {
9
+ var _a, _b;
10
+ const { mode, selectedEvents, selectedCategories, emptyMessage, postsPerPage, showPagination } = attributes;
11
+ const blockProps = useBlockProps({ className: 'g-event wp-block-section' });
12
+ return (_jsxs(_Fragment, { children: [_jsx(InspectorControls, { children: _jsxs(PanelBody, { title: __('Nastavení výpisu', 'brilo-blocks'), initialOpen: true, children: [_jsx(SelectControl, { label: __('Režim', 'brilo-blocks'), value: mode, options: EVENT_LIST_GROUP_MODES.map((m) => ({ label: m.label, value: m.value })), onChange: (mode) => setAttributes({ mode: mode }) }), mode !== 'manual' && (_jsxs(_Fragment, { children: [_jsx(RangeControl, { label: __('Počet příspěvků', 'brilo-blocks'), value: postsPerPage, onChange: (value) => setAttributes({ postsPerPage: value !== null && value !== void 0 ? value : EVENTS_PER_PAGE_DEFAULT }), min: EVENTS_PER_PAGE_MIN, max: EVENTS_PER_PAGE_MAX }), mode !== 'filter' && (_jsx(ToggleControl, { label: __('Zobrazit stránkování', 'brilo-blocks'), checked: showPagination, onChange: (value) => setAttributes({ showPagination: value }) }))] })), _jsx(TextControl, { label: __('Zpráva při prázdném výsledku', 'brilo-blocks'), value: emptyMessage, onChange: (value) => setAttributes({ emptyMessage: value }) })] }) }), _jsxs("div", { ...blockProps, children: [_jsx("div", { className: "g-event__label", children: __('Seznam událostí', 'brilo-blocks') }), _jsxs("div", { className: "g-event__instructions", children: [mode === 'manual' && __('Ručně vybrané události.', 'brilo-blocks'), mode === 'upcoming' && __('Zobrazuje nadcházející události.', 'brilo-blocks'), mode === 'past' && __('Zobrazuje proběhlé události.', 'brilo-blocks'), mode === 'filter' && __('S filtrováním.', 'brilo-blocks')] }), mode !== 'manual' &&
13
+ mode !== 'filter' &&
14
+ ((_a = options.renderCategoryControl) === null || _a === void 0 ? void 0 : _a.call(options, {
15
+ selectedItems: selectedCategories,
16
+ onChange: (ids) => setAttributes({ selectedCategories: ids }),
17
+ })), mode === 'manual' &&
18
+ ((_b = options.renderEventsControl) === null || _b === void 0 ? void 0 : _b.call(options, {
19
+ selectedItems: selectedEvents,
20
+ onChange: (ids) => setAttributes({ selectedEvents: ids }),
21
+ }))] })] }));
22
+ };
23
+ }
@@ -0,0 +1,5 @@
1
+ import type { BlockConfiguration } from '@wordpress/blocks';
2
+ import type { EventListGroupAttributes, EventListGroupOptions } from './types';
3
+ export type { EventListGroupAttributes, EventListGroupOptions };
4
+ export declare function createEventListGroupBlock(options: EventListGroupOptions): BlockConfiguration<EventListGroupAttributes>;
5
+ //# sourceMappingURL=factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-list-group/factory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAA;AAKzD,OAAO,KAAK,EAAC,wBAAwB,EAAE,qBAAqB,EAAC,MAAM,SAAS,CAAA;AAE5E,YAAY,EAAC,wBAAwB,EAAE,qBAAqB,EAAC,CAAA;AAE7D,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,qBAAqB,GAAG,kBAAkB,CAAC,wBAAwB,CAAC,CAuBtH"}
@@ -0,0 +1,28 @@
1
+ import { __ } from '@wordpress/i18n';
2
+ import { DEFAULT_EMPTY_MESSAGE, EVENTS_PER_PAGE_DEFAULT } from './constants';
3
+ import { createEventListGroupEdit } from './edit';
4
+ import { icon as defaultIcon } from './icon';
5
+ export function createEventListGroupBlock(options) {
6
+ var _a, _b, _c, _d, _e;
7
+ const emptyMessage = (_a = options.emptyMessage) !== null && _a !== void 0 ? _a : DEFAULT_EMPTY_MESSAGE;
8
+ const postsPerPage = (_b = options.postsPerPage) !== null && _b !== void 0 ? _b : EVENTS_PER_PAGE_DEFAULT;
9
+ return {
10
+ name: options.name,
11
+ title: (_c = options.title) !== null && _c !== void 0 ? _c : __('Seznam událostí', 'brilo-blocks'),
12
+ description: options.description,
13
+ category: (_d = options.category) !== null && _d !== void 0 ? _d : 'layout',
14
+ icon: (_e = options.icon) !== null && _e !== void 0 ? _e : { src: defaultIcon },
15
+ ...(options.parent && { parent: options.parent }),
16
+ supports: { html: false, customClassName: false },
17
+ attributes: {
18
+ mode: { type: 'string', default: 'upcoming' },
19
+ selectedEvents: { type: 'array', default: [] },
20
+ selectedCategories: { type: 'array', default: [] },
21
+ emptyMessage: { type: 'string', default: emptyMessage },
22
+ postsPerPage: { type: 'number', default: postsPerPage },
23
+ showPagination: { type: 'boolean', default: false },
24
+ },
25
+ edit: createEventListGroupEdit(options),
26
+ save: () => null,
27
+ };
28
+ }
@@ -0,0 +1,2 @@
1
+ export declare const icon: import("react").JSX.Element;
2
+ //# sourceMappingURL=icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-list-group/icon.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,6BA0BhB,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export const icon = (_jsxs("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M4 4H9V5H4V4Z", fill: "black" }), _jsx("path", { d: "M10 4H16V5H10V4Z", fill: "black" }), _jsx("path", { d: "M12 2C12 1.44772 12.4477 1 13 1H14C14.5523 1 15 1.44772 15 2C15 2.55228 14.5523 3 14 3H13C12.4477 3 12 2.55228 12 2Z", fill: "black" }), _jsx("path", { d: "M5 2C5 1.44772 5.44772 1 6 1H10C10.5523 1 11 1.44772 11 2C11 2.55228 10.5523 3 10 3H6C5.44772 3 5 2.55228 5 2Z", fill: "black" }), _jsx("rect", { x: "11.5", y: "14.5", width: "4", height: "4", stroke: "black", fill: "none" }), _jsx("path", { d: "M17 14H20V15H17V14Z", fill: "black" }), _jsx("path", { d: "M17 16H19V17H17V16Z", fill: "black" }), _jsx("path", { d: "M18 18H20V19H18V18Z", fill: "#357AB5" }), _jsx("rect", { x: "0.5", y: "14.5", width: "4", height: "4", stroke: "black", fill: "none" }), _jsx("path", { d: "M6 14H9V15H6V14Z", fill: "black" }), _jsx("path", { d: "M6 16H8V17H6V16Z", fill: "black" }), _jsx("path", { d: "M7 18H9V19H7V18Z", fill: "#357AB5" }), _jsx("rect", { x: "11.5", y: "7.5", width: "4", height: "4", stroke: "black", fill: "none" }), _jsx("path", { d: "M17 7H20V8H17V7Z", fill: "black" }), _jsx("path", { d: "M17 9H19V10H17V9Z", fill: "black" }), _jsx("path", { d: "M18 11H20V12H18V11Z", fill: "#357AB5" }), _jsx("rect", { x: "0.5", y: "7.5", width: "4", height: "4", stroke: "black", fill: "none" }), _jsx("path", { d: "M6 7H9V8H6V7Z", fill: "black" }), _jsx("path", { d: "M6 9H8V10H6V9Z", fill: "black" }), _jsx("path", { d: "M7 11H9V12H7V11Z", fill: "#357AB5" })] }));
@@ -0,0 +1,8 @@
1
+ export type { EventListGroupAttributes, EventListGroupOptions, EventListGroupMode } from './types';
2
+ export { EVENT_LIST_GROUP_MODES } from './types';
3
+ export { createEventListGroupBlock } from './factory';
4
+ export { EventSelectModal } from '../../../components/Event/EventSelectModal';
5
+ export { EventTermSelectModal } from '../../../components/Event/EventTermSelectModal';
6
+ import type { EventListGroupOptions } from './types';
7
+ export declare const eventListGroupDefaults: EventListGroupOptions;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-list-group/index.tsx"],"names":[],"mappings":"AAAA,YAAY,EAAC,wBAAwB,EAAE,qBAAqB,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAA;AAChG,OAAO,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAC,yBAAyB,EAAC,MAAM,WAAW,CAAA;AACnD,OAAO,EAAC,gBAAgB,EAAC,MAAM,qCAAqC,CAAA;AACpE,OAAO,EAAC,oBAAoB,EAAC,MAAM,yCAAyC,CAAA;AAE5E,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,SAAS,CAAA;AAElD,eAAO,MAAM,sBAAsB,EAAE,qBAGpC,CAAA"}
@@ -0,0 +1,8 @@
1
+ export { EVENT_LIST_GROUP_MODES } from './types';
2
+ export { createEventListGroupBlock } from './factory';
3
+ export { EventSelectModal } from '../../../components/Event/EventSelectModal';
4
+ export { EventTermSelectModal } from '../../../components/Event/EventTermSelectModal';
5
+ export const eventListGroupDefaults = {
6
+ name: 'brilo/event-list-group',
7
+ parent: ['brilo/base-section'],
8
+ };
@@ -0,0 +1,30 @@
1
+ import type { BriloBlockType, SelectControlProps } from '../../../types';
2
+ export declare const EVENT_LIST_GROUP_MODES: readonly [{
3
+ readonly value: 'manual';
4
+ readonly label: import("@wordpress/i18n").TransformedText<"Výběr událostí">;
5
+ }, {
6
+ readonly value: 'upcoming';
7
+ readonly label: import("@wordpress/i18n").TransformedText<"Nadcházející">;
8
+ }, {
9
+ readonly value: 'past';
10
+ readonly label: import("@wordpress/i18n").TransformedText<"Proběhlé">;
11
+ }, {
12
+ readonly value: 'filter';
13
+ readonly label: import("@wordpress/i18n").TransformedText<"S filtrováním">;
14
+ }];
15
+ export type EventListGroupMode = (typeof EVENT_LIST_GROUP_MODES)[number]['value'];
16
+ export interface EventListGroupAttributes extends Record<string, unknown> {
17
+ mode: EventListGroupMode;
18
+ selectedEvents: number[];
19
+ selectedCategories: number[];
20
+ emptyMessage: string;
21
+ postsPerPage: number;
22
+ showPagination: boolean;
23
+ }
24
+ export interface EventListGroupOptions extends BriloBlockType {
25
+ emptyMessage?: string;
26
+ postsPerPage?: number;
27
+ renderCategoryControl?: (props: SelectControlProps) => JSX.Element;
28
+ renderEventsControl?: (props: SelectControlProps) => JSX.Element;
29
+ }
30
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/blocks/event/event-list-group/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,cAAc,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAA;AAE/D,eAAO,MAAM,sBAAsB;aAChC,KAAK,EAAE,QAAQ;aAAE,KAAK;;aACtB,KAAK,EAAE,UAAU;aAAE,KAAK;;aACxB,KAAK,EAAE,MAAM;aAAE,KAAK;;aACpB,KAAK,EAAE,QAAQ;aAAE,KAAK;EACf,CAAA;AAEV,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;AAEjF,MAAM,WAAW,wBAAyB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACvE,IAAI,EAAE,kBAAkB,CAAA;IACxB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAC5B,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,cAAc,EAAE,OAAO,CAAA;CACxB;AAED,MAAM,WAAW,qBAAsB,SAAQ,cAAc;IAC3D,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,GAAG,CAAC,OAAO,CAAA;IAClE,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,GAAG,CAAC,OAAO,CAAA;CACjE"}
@@ -0,0 +1,7 @@
1
+ import { __ } from '@wordpress/i18n';
2
+ export const EVENT_LIST_GROUP_MODES = [
3
+ { value: 'manual', label: __('Výběr událostí', 'brilo-blocks') },
4
+ { value: 'upcoming', label: __('Nadcházející', 'brilo-blocks') },
5
+ { value: 'past', label: __('Proběhlé', 'brilo-blocks') },
6
+ { value: 'filter', label: __('S filtrováním', 'brilo-blocks') },
7
+ ];
@@ -0,0 +1,27 @@
1
+ import { type Field, type View } from '@wordpress/dataviews/wp';
2
+ import React from 'react';
3
+ import type { SelectControlProps } from '../../types';
4
+ type EntityRecord = {
5
+ id: number;
6
+ };
7
+ export type EntitySelectModalConfig<T extends EntityRecord> = {
8
+ endpoint: string;
9
+ fields: Field<T>[];
10
+ defaultView: View;
11
+ getItemLabel: (item: T) => string;
12
+ matchesSearch: (item: T, needle: string) => boolean;
13
+ sortValue: (item: T, field: string) => string | number;
14
+ buttonLabel: string;
15
+ modalTitle: string;
16
+ emptyLabel: string;
17
+ className?: string;
18
+ };
19
+ /**
20
+ * Generic table-view entity picker built on @wordpress/dataviews (search, sort,
21
+ * checkbox selection, reorderable selection list). Feed it a REST endpoint +
22
+ * DataViews field config to get an `EventSelectModal`/`EventTermSelectModal`-style
23
+ * component without duplicating the DataViews wiring per entity type.
24
+ */
25
+ export declare function createEntitySelectModal<T extends EntityRecord>(config: EntitySelectModalConfig<T>): ({ selectedItems, onChange }: SelectControlProps) => React.JSX.Element;
26
+ export {};
27
+ //# sourceMappingURL=EntitySelectModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntitySelectModal.d.ts","sourceRoot":"","sources":["../../../src/components/Event/EntitySelectModal.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,KAAK,EAAE,KAAK,IAAI,EAAC,MAAM,yBAAyB,CAAA;AAIxE,OAAO,KAAqC,MAAM,OAAO,CAAA;AACzD,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAA;AAE/C,KAAK,YAAY,GAAG;IAAC,EAAE,EAAE,MAAM,CAAA;CAAC,CAAA;AA0BhC,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,YAAY,IAAI;IAC5D,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;IAClB,WAAW,EAAE,IAAI,CAAA;IACjB,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAA;IACjC,aAAa,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAA;IACnD,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAAA;IACtD,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AA2FD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,YAAY,EAAE,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAC,iCACnC,kBAAkB,uBAwGhF"}