@brilo/base-blocks 0.1.58 → 0.1.61

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 (255) hide show
  1. package/build/.tsbuildinfo +1 -1
  2. package/build/blocks/anchor/anchor-group/icon.js +1 -1
  3. package/build/blocks/career/career-benefits/icon.js +1 -1
  4. package/build/blocks/career/career-header/icon.js +1 -1
  5. package/build/blocks/career/job-position-group/icon.js +1 -1
  6. package/build/blocks/column/column-item/edit.d.ts.map +1 -1
  7. package/build/blocks/column/column-item/index.d.ts.map +1 -1
  8. package/build/blocks/column/column-item/index.js +1 -0
  9. package/build/blocks/compare/compare-option/edit.d.ts +1 -1
  10. package/build/blocks/compare/compare-option/edit.d.ts.map +1 -1
  11. package/build/blocks/compare/compare-option/edit.js +1 -1
  12. package/build/blocks/contact/contact-item/factory.d.ts.map +1 -1
  13. package/build/blocks/document/documents-grid/icon.js +1 -1
  14. package/build/blocks/event/event-detail-content/icon.js +1 -1
  15. package/build/blocks/event/event-detail-header/icon.js +1 -1
  16. package/build/blocks/event/event-list-group/icon.js +1 -1
  17. package/build/blocks/faq/faq-item/edit.d.ts.map +1 -1
  18. package/build/blocks/faq/faq-item/edit.js +2 -2
  19. package/build/blocks/food-menu/food-menu-group/FoodMenuPreview.d.ts.map +1 -1
  20. package/build/blocks/food-menu/food-menu-group/FoodMenuPreview.js +36 -6
  21. package/build/blocks/food-menu/food-menu-group/constants.d.ts +51 -3
  22. package/build/blocks/food-menu/food-menu-group/constants.d.ts.map +1 -1
  23. package/build/blocks/food-menu/food-menu-group/constants.js +32 -6
  24. package/build/blocks/food-menu/food-menu-group/edit.d.ts.map +1 -1
  25. package/build/blocks/food-menu/food-menu-group/edit.js +61 -2
  26. package/build/blocks/food-menu/food-menu-group/factory.d.ts.map +1 -1
  27. package/build/blocks/food-menu/food-menu-group/factory.js +77 -45
  28. package/build/blocks/food-menu/food-menu-group/index.d.ts +1 -1
  29. package/build/blocks/food-menu/food-menu-group/index.d.ts.map +1 -1
  30. package/build/blocks/food-menu/food-menu-group/types.d.ts +12 -5
  31. package/build/blocks/food-menu/food-menu-group/types.d.ts.map +1 -1
  32. package/build/blocks/food-menu/food-reservation/edit.d.ts +7 -0
  33. package/build/blocks/food-menu/food-reservation/edit.d.ts.map +1 -0
  34. package/build/blocks/food-menu/food-reservation/edit.js +69 -0
  35. package/build/blocks/food-menu/food-reservation/factory.d.ts +4 -0
  36. package/build/blocks/food-menu/food-reservation/factory.d.ts.map +1 -0
  37. package/build/blocks/food-menu/food-reservation/factory.js +24 -0
  38. package/build/blocks/food-menu/food-reservation/icon.d.ts +2 -0
  39. package/build/blocks/food-menu/food-reservation/icon.d.ts.map +1 -0
  40. package/build/blocks/food-menu/food-reservation/icon.js +2 -0
  41. package/build/blocks/food-menu/food-reservation/index.d.ts +5 -0
  42. package/build/blocks/food-menu/food-reservation/index.d.ts.map +1 -0
  43. package/build/blocks/food-menu/food-reservation/index.js +6 -0
  44. package/build/blocks/food-menu/food-reservation/types.d.ts +7 -0
  45. package/build/blocks/food-menu/food-reservation/types.d.ts.map +1 -0
  46. package/build/blocks/food-menu/food-reservation/types.js +1 -0
  47. package/build/blocks/form/form-field/types.d.ts +1 -1
  48. package/build/blocks/form/form-field/types.d.ts.map +1 -1
  49. package/build/blocks/form/form-group/index.js +1 -1
  50. package/build/blocks/gallery/gallery-group/constants.d.ts +1 -19
  51. package/build/blocks/gallery/gallery-group/constants.d.ts.map +1 -1
  52. package/build/blocks/gallery/gallery-group/constants.js +1 -8
  53. package/build/blocks/gallery/gallery-group/edit.d.ts.map +1 -1
  54. package/build/blocks/gallery/gallery-group/edit.js +3 -19
  55. package/build/blocks/gallery/gallery-item/index.js +1 -1
  56. package/build/blocks/gallery/gallery-strip-group/constants.d.ts +34 -0
  57. package/build/blocks/gallery/gallery-strip-group/constants.d.ts.map +1 -0
  58. package/build/blocks/gallery/gallery-strip-group/constants.js +17 -0
  59. package/build/blocks/gallery/gallery-strip-group/edit.d.ts +7 -0
  60. package/build/blocks/gallery/gallery-strip-group/edit.d.ts.map +1 -0
  61. package/build/blocks/gallery/gallery-strip-group/edit.js +34 -0
  62. package/build/blocks/gallery/gallery-strip-group/factory.d.ts +5 -0
  63. package/build/blocks/gallery/gallery-strip-group/factory.d.ts.map +1 -0
  64. package/build/blocks/gallery/gallery-strip-group/factory.js +28 -0
  65. package/build/blocks/gallery/gallery-strip-group/index.d.ts +5 -0
  66. package/build/blocks/gallery/gallery-strip-group/index.d.ts.map +1 -0
  67. package/build/blocks/gallery/gallery-strip-group/index.js +7 -0
  68. package/build/blocks/gallery/gallery-strip-group/types.d.ts +18 -0
  69. package/build/blocks/gallery/gallery-strip-group/types.d.ts.map +1 -0
  70. package/build/blocks/gallery/gallery-strip-group/types.js +1 -0
  71. package/build/blocks/groups/banner-group/icon.js +1 -1
  72. package/build/blocks/groups/content-group/icon.js +1 -1
  73. package/build/blocks/groups/text-and-media-group/index.d.ts.map +1 -1
  74. package/build/blocks/groups/text-and-media-group/index.js +2 -0
  75. package/build/blocks/hero/hero-group/edit.js +1 -1
  76. package/build/blocks/hero/hero-group/icon.js +1 -1
  77. package/build/blocks/hero/hero-group/types.d.ts +1 -1
  78. package/build/blocks/hero/hero-group/types.d.ts.map +1 -1
  79. package/build/blocks/hero/hero-item/edit.js +1 -1
  80. package/build/blocks/hero/hero-item/index.js +1 -1
  81. package/build/blocks/layout/box/icon.js +1 -1
  82. package/build/blocks/layout/layout-aside/edit.d.ts +1 -2
  83. package/build/blocks/layout/layout-aside/edit.d.ts.map +1 -1
  84. package/build/blocks/layout/layout-aside/edit.js +1 -1
  85. package/build/blocks/layout/layout-aside/factory.d.ts.map +1 -1
  86. package/build/blocks/layout/layout-aside/icon.d.ts +1 -2
  87. package/build/blocks/layout/layout-aside/icon.d.ts.map +1 -1
  88. package/build/blocks/layout/layout-aside/icon.js +1 -1
  89. package/build/blocks/layout/layout-content/edit.d.ts +1 -2
  90. package/build/blocks/layout/layout-content/edit.d.ts.map +1 -1
  91. package/build/blocks/layout/layout-content/edit.js +1 -1
  92. package/build/blocks/layout/layout-content/factory.d.ts.map +1 -1
  93. package/build/blocks/layout/layout-content/icon.d.ts +1 -2
  94. package/build/blocks/layout/layout-content/icon.d.ts.map +1 -1
  95. package/build/blocks/layout/layout-content/icon.js +1 -1
  96. package/build/blocks/layout/layout-content-w-aside/edit.d.ts +1 -2
  97. package/build/blocks/layout/layout-content-w-aside/edit.d.ts.map +1 -1
  98. package/build/blocks/layout/layout-content-w-aside/factory.d.ts.map +1 -1
  99. package/build/blocks/layout/layout-content-w-aside/icon.d.ts +1 -2
  100. package/build/blocks/layout/layout-content-w-aside/icon.d.ts.map +1 -1
  101. package/build/blocks/layout/layout-content-w-aside/icon.js +1 -1
  102. package/build/blocks/link/link-item/icon.js +1 -1
  103. package/build/blocks/map/map-group/edit.d.ts.map +1 -1
  104. package/build/blocks/map/map-group/edit.js +1 -1
  105. package/build/blocks/map/map-group/factory.d.ts.map +1 -1
  106. package/build/blocks/map/map-group/types.d.ts.map +1 -1
  107. package/build/blocks/newsletter/newsletter-form/edit.d.ts.map +1 -1
  108. package/build/blocks/newsletter/newsletter-form/edit.js +2 -1
  109. package/build/blocks/person/person-group/icon.js +1 -1
  110. package/build/blocks/person/person-item/constants.d.ts.map +1 -1
  111. package/build/blocks/post/post-content/icon.js +1 -1
  112. package/build/blocks/post/post-content/types.d.ts.map +1 -1
  113. package/build/blocks/post/post-slider-group/icon.js +1 -1
  114. package/build/blocks/post/posts-grid/icon.js +1 -1
  115. package/build/blocks/review/review-summary-item/constants.d.ts +3 -0
  116. package/build/blocks/review/review-summary-item/constants.d.ts.map +1 -0
  117. package/build/blocks/review/review-summary-item/constants.js +2 -0
  118. package/build/blocks/review/review-summary-item/edit.d.ts +6 -0
  119. package/build/blocks/review/review-summary-item/edit.d.ts.map +1 -0
  120. package/build/blocks/review/review-summary-item/edit.js +17 -0
  121. package/build/blocks/review/review-summary-item/factory.d.ts +5 -0
  122. package/build/blocks/review/review-summary-item/factory.d.ts.map +1 -0
  123. package/build/blocks/review/review-summary-item/factory.js +23 -0
  124. package/build/blocks/review/review-summary-item/index.d.ts +5 -0
  125. package/build/blocks/review/review-summary-item/index.d.ts.map +1 -0
  126. package/build/blocks/review/review-summary-item/index.js +5 -0
  127. package/build/blocks/review/review-summary-item/types.d.ts +11 -0
  128. package/build/blocks/review/review-summary-item/types.d.ts.map +1 -0
  129. package/build/blocks/review/review-summary-item/types.js +1 -0
  130. package/build/blocks/share/share/icon.js +1 -1
  131. package/build/blocks/signpost/signpost-group/icon.js +1 -1
  132. package/build/blocks/step/step-group/factory.d.ts.map +1 -1
  133. package/build/blocks/step/step-group/icon.js +1 -1
  134. package/build/blocks/testimonial/testimonial-group/icon.js +1 -1
  135. package/build/blocks/urgency/urgency-item/constants.d.ts +56 -0
  136. package/build/blocks/urgency/urgency-item/constants.d.ts.map +1 -0
  137. package/build/blocks/urgency/urgency-item/constants.js +32 -0
  138. package/build/blocks/urgency/urgency-item/edit.d.ts +7 -0
  139. package/build/blocks/urgency/urgency-item/edit.d.ts.map +1 -0
  140. package/build/blocks/urgency/urgency-item/edit.js +83 -0
  141. package/build/blocks/urgency/urgency-item/factory.d.ts +5 -0
  142. package/build/blocks/urgency/urgency-item/factory.d.ts.map +1 -0
  143. package/build/blocks/urgency/urgency-item/factory.js +31 -0
  144. package/build/blocks/urgency/urgency-item/index.d.ts +5 -0
  145. package/build/blocks/urgency/urgency-item/index.d.ts.map +1 -0
  146. package/build/blocks/urgency/urgency-item/index.js +5 -0
  147. package/build/blocks/urgency/urgency-item/types.d.ts +22 -0
  148. package/build/blocks/urgency/urgency-item/types.d.ts.map +1 -0
  149. package/build/blocks/urgency/urgency-item/types.js +1 -0
  150. package/build/components/GalleryImagesAppender/index.d.ts +5 -0
  151. package/build/components/GalleryImagesAppender/index.d.ts.map +1 -0
  152. package/build/components/GalleryImagesAppender/index.js +12 -0
  153. package/build/components/ImagePicker/ImagePicker.d.ts.map +1 -1
  154. package/build/components/ImagePicker/ImagePicker.js +1 -5
  155. package/build/constants.d.ts +19 -0
  156. package/build/constants.d.ts.map +1 -1
  157. package/build/constants.js +8 -0
  158. package/build/hooks/useGroupBlock.d.ts.map +1 -1
  159. package/build/hooks/useGroupBlock.js +10 -3
  160. package/build/index.d.ts +8 -0
  161. package/build/index.d.ts.map +1 -1
  162. package/build/index.js +4 -0
  163. package/package.json +4 -3
  164. package/src/blocks/anchor/anchor-group/icon.tsx +1 -1
  165. package/src/blocks/career/career-benefits/icon.tsx +1 -1
  166. package/src/blocks/career/career-header/icon.tsx +1 -1
  167. package/src/blocks/career/job-position-group/icon.tsx +1 -1
  168. package/src/blocks/column/column-item/edit.tsx +0 -1
  169. package/src/blocks/column/column-item/index.ts +1 -0
  170. package/src/blocks/compare/compare-option/edit.tsx +1 -1
  171. package/src/blocks/contact/contact-item/factory.tsx +1 -2
  172. package/src/blocks/document/documents-grid/icon.tsx +1 -1
  173. package/src/blocks/event/event-detail-content/icon.tsx +1 -1
  174. package/src/blocks/event/event-detail-header/icon.tsx +1 -1
  175. package/src/blocks/event/event-list-group/icon.tsx +1 -1
  176. package/src/blocks/faq/faq-item/edit.tsx +23 -25
  177. package/src/blocks/food-menu/food-menu-group/FoodMenuPreview.tsx +58 -9
  178. package/src/blocks/food-menu/food-menu-group/constants.ts +37 -6
  179. package/src/blocks/food-menu/food-menu-group/edit.tsx +116 -20
  180. package/src/blocks/food-menu/food-menu-group/editor.scss +35 -6
  181. package/src/blocks/food-menu/food-menu-group/factory.tsx +77 -39
  182. package/src/blocks/food-menu/food-menu-group/index.ts +2 -0
  183. package/src/blocks/food-menu/food-menu-group/types.ts +18 -5
  184. package/src/blocks/food-menu/food-reservation/edit.tsx +179 -0
  185. package/src/blocks/food-menu/food-reservation/factory.tsx +28 -0
  186. package/src/blocks/food-menu/food-reservation/icon.tsx +9 -0
  187. package/src/blocks/food-menu/food-reservation/index.ts +10 -0
  188. package/src/blocks/food-menu/food-reservation/types.ts +8 -0
  189. package/src/blocks/form/form-field/types.ts +1 -7
  190. package/src/blocks/form/form-group/index.ts +1 -1
  191. package/src/blocks/gallery/gallery-group/constants.ts +1 -8
  192. package/src/blocks/gallery/gallery-group/edit.tsx +3 -39
  193. package/src/blocks/gallery/gallery-group/editor.scss +0 -12
  194. package/src/blocks/gallery/gallery-item/index.ts +1 -1
  195. package/src/blocks/gallery/gallery-strip-group/constants.ts +22 -0
  196. package/src/blocks/gallery/gallery-strip-group/edit.tsx +112 -0
  197. package/src/blocks/gallery/gallery-strip-group/editor.scss +36 -0
  198. package/src/blocks/gallery/gallery-strip-group/factory.tsx +32 -0
  199. package/src/blocks/gallery/gallery-strip-group/index.ts +11 -0
  200. package/src/blocks/gallery/gallery-strip-group/types.ts +20 -0
  201. package/src/blocks/groups/banner-group/edit.tsx +1 -1
  202. package/src/blocks/groups/banner-group/icon.tsx +1 -1
  203. package/src/blocks/groups/content-group/icon.tsx +1 -1
  204. package/src/blocks/groups/text-and-media-group/index.ts +2 -0
  205. package/src/blocks/hero/hero-group/edit.tsx +3 -3
  206. package/src/blocks/hero/hero-group/icon.tsx +1 -1
  207. package/src/blocks/hero/hero-group/types.ts +1 -1
  208. package/src/blocks/hero/hero-item/edit.tsx +5 -5
  209. package/src/blocks/hero/hero-item/index.ts +1 -1
  210. package/src/blocks/layout/box/icon.tsx +1 -1
  211. package/src/blocks/layout/layout-aside/edit.tsx +2 -3
  212. package/src/blocks/layout/layout-aside/factory.tsx +0 -1
  213. package/src/blocks/layout/layout-aside/icon.tsx +1 -3
  214. package/src/blocks/layout/layout-content/edit.tsx +2 -3
  215. package/src/blocks/layout/layout-content/factory.tsx +0 -1
  216. package/src/blocks/layout/layout-content/icon.tsx +1 -3
  217. package/src/blocks/layout/layout-content-w-aside/edit.tsx +0 -1
  218. package/src/blocks/layout/layout-content-w-aside/factory.tsx +0 -1
  219. package/src/blocks/layout/layout-content-w-aside/icon.tsx +1 -3
  220. package/src/blocks/link/link-item/icon.tsx +1 -1
  221. package/src/blocks/map/map-group/edit.tsx +8 -3
  222. package/src/blocks/map/map-group/factory.tsx +1 -1
  223. package/src/blocks/map/map-group/types.ts +1 -1
  224. package/src/blocks/newsletter/newsletter-form/edit.tsx +5 -2
  225. package/src/blocks/person/person-group/icon.tsx +1 -1
  226. package/src/blocks/person/person-item/constants.ts +1 -1
  227. package/src/blocks/post/post-content/icon.tsx +1 -1
  228. package/src/blocks/post/post-content/types.ts +0 -1
  229. package/src/blocks/post/post-slider-group/icon.tsx +1 -1
  230. package/src/blocks/post/posts-grid/icon.tsx +1 -1
  231. package/src/blocks/review/review-summary-item/constants.ts +2 -0
  232. package/src/blocks/review/review-summary-item/edit.tsx +86 -0
  233. package/src/blocks/review/review-summary-item/editor.scss +44 -0
  234. package/src/blocks/review/review-summary-item/factory.tsx +27 -0
  235. package/src/blocks/review/review-summary-item/index.ts +9 -0
  236. package/src/blocks/review/review-summary-item/types.ts +11 -0
  237. package/src/blocks/share/share/icon.tsx +1 -1
  238. package/src/blocks/signpost/signpost-group/icon.tsx +1 -1
  239. package/src/blocks/step/step-group/factory.tsx +1 -1
  240. package/src/blocks/step/step-group/icon.tsx +1 -1
  241. package/src/blocks/testimonial/testimonial-group/icon.tsx +1 -1
  242. package/src/blocks/urgency/urgency-item/constants.ts +39 -0
  243. package/src/blocks/urgency/urgency-item/edit.tsx +319 -0
  244. package/src/blocks/urgency/urgency-item/editor.scss +99 -0
  245. package/src/blocks/urgency/urgency-item/factory.tsx +36 -0
  246. package/src/blocks/urgency/urgency-item/index.ts +9 -0
  247. package/src/blocks/urgency/urgency-item/types.ts +23 -0
  248. package/src/components/GalleryImagesAppender/editor.scss +15 -0
  249. package/src/components/GalleryImagesAppender/index.tsx +29 -0
  250. package/src/components/ImagePicker/ImagePicker.tsx +6 -6
  251. package/src/components/ItemIconControl/types.d.ts +0 -1
  252. package/src/constants.ts +9 -0
  253. package/src/editor.scss +4 -0
  254. package/src/hooks/useGroupBlock.ts +10 -2
  255. package/src/index.ts +8 -0
@@ -1,57 +1,89 @@
1
1
  import { __ } from '@wordpress/i18n';
2
- import { FOOD_MENU_GROUP_EMPTY_BEHAVIOUR, FOOD_MENU_GROUP_EMPTY_BEHAVIOURS, FOOD_MENU_GROUP_LAYOUT, FOOD_MENU_GROUP_LAYOUTS, FOOD_MENU_GROUP_MODE, FOOD_MENU_GROUP_MODES, } from './constants';
2
+ import { DEFAULT_SURFACE_SHADOWS, surfaceStyleAttribute } from '../../../components/SurfaceStyleControl';
3
+ import { withObjectDefaults } from '../../../utils/withObjectDefaults';
4
+ import { FOOD_MENU_GROUP_EMPTY_BEHAVIOUR, FOOD_MENU_GROUP_EMPTY_BEHAVIOURS, FOOD_MENU_GROUP_LAYOUT, FOOD_MENU_GROUP_LAYOUTS, FOOD_MENU_GROUP_MODE, FOOD_MENU_GROUP_MODES, FOOD_MENU_GROUP_RESERVATION_MODE, FOOD_MENU_GROUP_RESERVATION_MODES, FOOD_MENU_GROUP_TEXT_ALIGN, FOOD_MENU_GROUP_TEXT_ALIGNS, } from './constants';
3
5
  import { createFoodMenuGroupEdit } from './edit';
4
6
  import { icon as defaultIcon } from './icon';
5
7
  export function createFoodMenuGroupBlock(options) {
6
- var _a, _b, _c, _d;
8
+ var _a, _b, _c, _d, _e;
9
+ const attributes = {
10
+ mode: {
11
+ type: 'string',
12
+ default: FOOD_MENU_GROUP_MODE,
13
+ enum: FOOD_MENU_GROUP_MODES.map((option) => option.value),
14
+ },
15
+ layout: {
16
+ type: 'string',
17
+ default: FOOD_MENU_GROUP_LAYOUT,
18
+ enum: FOOD_MENU_GROUP_LAYOUTS.map((option) => option.value),
19
+ },
20
+ menuIds: {
21
+ type: 'array',
22
+ default: [],
23
+ items: { type: 'number' },
24
+ },
25
+ showPrices: {
26
+ type: 'boolean',
27
+ default: true,
28
+ },
29
+ showAllergens: {
30
+ type: 'boolean',
31
+ default: true,
32
+ },
33
+ reservationMode: {
34
+ type: 'string',
35
+ default: FOOD_MENU_GROUP_RESERVATION_MODE,
36
+ enum: FOOD_MENU_GROUP_RESERVATION_MODES.map((option) => option.value),
37
+ },
38
+ emptyBehaviour: {
39
+ type: 'string',
40
+ default: FOOD_MENU_GROUP_EMPTY_BEHAVIOUR,
41
+ enum: FOOD_MENU_GROUP_EMPTY_BEHAVIOURS.map((option) => option.value),
42
+ },
43
+ // Empty means "use the wording the server picks for this mode".
44
+ emptyText: {
45
+ type: 'string',
46
+ default: '',
47
+ },
48
+ style: surfaceStyleAttribute((_a = options.shadows) !== null && _a !== void 0 ? _a : DEFAULT_SURFACE_SHADOWS),
49
+ textAlign: {
50
+ type: 'string',
51
+ default: FOOD_MENU_GROUP_TEXT_ALIGN,
52
+ enum: FOOD_MENU_GROUP_TEXT_ALIGNS.map((align) => align.value),
53
+ },
54
+ };
55
+ const { reservationMode: _reservationMode, ...withoutReservationMode } = attributes;
7
56
  return {
8
57
  name: options.name,
9
- title: (_a = options.title) !== null && _a !== void 0 ? _a : __('Jídelní lístek', 'brilo-blocks'),
10
- description: (_b = options.description) !== null && _b !== void 0 ? _b : __('Zobrazí vybraný lístek, dnešní denní lístek nebo celý týden.', 'brilo-blocks'),
11
- category: (_c = options.category) !== null && _c !== void 0 ? _c : 'widgets',
58
+ title: (_b = options.title) !== null && _b !== void 0 ? _b : __('Jídelní lístek', 'brilo-blocks'),
59
+ description: (_c = options.description) !== null && _c !== void 0 ? _c : __('Zobrazí vybraný lístek, dnešní denní lístek nebo celý týden.', 'brilo-blocks'),
60
+ category: (_d = options.category) !== null && _d !== void 0 ? _d : 'widgets',
12
61
  ...(options.parent && { parent: options.parent }),
13
- icon: (_d = options.icon) !== null && _d !== void 0 ? _d : { src: defaultIcon },
62
+ icon: (_e = options.icon) !== null && _e !== void 0 ? _e : { src: defaultIcon },
14
63
  supports: { html: false, customClassName: false },
15
- attributes: {
16
- mode: {
17
- type: 'string',
18
- default: FOOD_MENU_GROUP_MODE,
19
- enum: [...FOOD_MENU_GROUP_MODES],
20
- },
21
- layout: {
22
- type: 'string',
23
- default: FOOD_MENU_GROUP_LAYOUT,
24
- enum: [...FOOD_MENU_GROUP_LAYOUTS],
25
- },
26
- menuIds: {
27
- type: 'array',
28
- default: [],
29
- items: { type: 'number' },
30
- },
31
- showPrices: {
32
- type: 'boolean',
33
- default: true,
34
- },
35
- showAllergens: {
36
- type: 'boolean',
37
- default: true,
64
+ attributes,
65
+ // The on/off "Umožnit rezervaci obědu" toggle became a three-way choice.
66
+ // A dynamic block is always valid, so the migration opts in through
67
+ // `isEligible`, which sees the raw comment attributes. Blocks that never
68
+ // stored the toggle had it on, which is the new default too.
69
+ deprecated: [
70
+ {
71
+ attributes: {
72
+ ...withoutReservationMode,
73
+ showReservation: {
74
+ type: 'boolean',
75
+ default: true,
76
+ },
77
+ },
78
+ isEligible: (raw) => 'showReservation' in raw && !('reservationMode' in raw),
79
+ migrate: ({ showReservation, ...rest }) => ({
80
+ ...rest,
81
+ reservationMode: false === showReservation ? 'off' : 'modal',
82
+ }),
83
+ save: () => null,
38
84
  },
39
- showReservation: {
40
- type: 'boolean',
41
- default: true,
42
- },
43
- emptyBehaviour: {
44
- type: 'string',
45
- default: FOOD_MENU_GROUP_EMPTY_BEHAVIOUR,
46
- enum: [...FOOD_MENU_GROUP_EMPTY_BEHAVIOURS],
47
- },
48
- // Empty means "use the wording the server picks for this mode".
49
- emptyText: {
50
- type: 'string',
51
- default: '',
52
- },
53
- },
54
- edit: createFoodMenuGroupEdit(options),
85
+ ],
86
+ edit: withObjectDefaults(createFoodMenuGroupEdit(options)),
55
87
  save: () => null,
56
88
  };
57
89
  }
@@ -1,4 +1,4 @@
1
- export type { FoodMenuGroupAttributes, FoodMenuGroupEmptyBehaviour, FoodMenuGroupLayout, FoodMenuGroupMode, FoodMenuGroupOptions, } from './types';
1
+ export type { FoodMenuGroupAttributes, FoodMenuGroupEmptyBehaviour, FoodMenuGroupLayout, FoodMenuGroupMode, FoodMenuGroupOptions, FoodMenuGroupReservationMode, FoodMenuGroupTextAlign, } from './types';
2
2
  export { createFoodMenuGroupBlock } from './factory';
3
3
  export { FoodMenuSelectModal } from './FoodMenuSelectModal';
4
4
  import type { FoodMenuGroupOptions } from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/blocks/food-menu/food-menu-group/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,uBAAuB,EACvB,2BAA2B,EAC3B,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,SAAS,CAAA;AAChB,OAAO,EAAC,wBAAwB,EAAC,MAAM,WAAW,CAAA;AAClD,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,SAAS,CAAA;AAEjD,eAAO,MAAM,qBAAqB,EAAE,oBAInC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/blocks/food-menu/food-menu-group/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,uBAAuB,EACvB,2BAA2B,EAC3B,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,SAAS,CAAA;AAChB,OAAO,EAAC,wBAAwB,EAAC,MAAM,WAAW,CAAA;AAClD,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,SAAS,CAAA;AAEjD,eAAO,MAAM,qBAAqB,EAAE,oBAInC,CAAA"}
@@ -1,19 +1,26 @@
1
+ import type { SurfaceShadowOption, SurfaceStyle } from '../../../components/SurfaceStyleControl';
1
2
  import type { BriloBlockType, SelectControlProps } from '../../../types';
2
- import type { FOOD_MENU_GROUP_EMPTY_BEHAVIOURS, FOOD_MENU_GROUP_LAYOUTS, FOOD_MENU_GROUP_MODES } from './constants';
3
- export type FoodMenuGroupMode = (typeof FOOD_MENU_GROUP_MODES)[number];
4
- export type FoodMenuGroupLayout = (typeof FOOD_MENU_GROUP_LAYOUTS)[number];
5
- export type FoodMenuGroupEmptyBehaviour = (typeof FOOD_MENU_GROUP_EMPTY_BEHAVIOURS)[number];
3
+ import type { FOOD_MENU_GROUP_EMPTY_BEHAVIOURS, FOOD_MENU_GROUP_LAYOUTS, FOOD_MENU_GROUP_MODES, FOOD_MENU_GROUP_RESERVATION_MODES, FOOD_MENU_GROUP_TEXT_ALIGNS } from './constants';
4
+ export type FoodMenuGroupMode = (typeof FOOD_MENU_GROUP_MODES)[number]['value'];
5
+ export type FoodMenuGroupLayout = (typeof FOOD_MENU_GROUP_LAYOUTS)[number]['value'];
6
+ export type FoodMenuGroupEmptyBehaviour = (typeof FOOD_MENU_GROUP_EMPTY_BEHAVIOURS)[number]['value'];
7
+ export type FoodMenuGroupReservationMode = (typeof FOOD_MENU_GROUP_RESERVATION_MODES)[number]['value'];
8
+ export type FoodMenuGroupTextAlign = (typeof FOOD_MENU_GROUP_TEXT_ALIGNS)[number]['value'];
6
9
  export interface FoodMenuGroupAttributes extends Record<string, unknown> {
7
10
  mode: FoodMenuGroupMode;
8
11
  layout: FoodMenuGroupLayout;
9
12
  menuIds: number[];
10
13
  showPrices: boolean;
11
14
  showAllergens: boolean;
12
- showReservation: boolean;
15
+ reservationMode: FoodMenuGroupReservationMode;
13
16
  emptyBehaviour: FoodMenuGroupEmptyBehaviour;
14
17
  emptyText: string;
18
+ style: SurfaceStyle<string>;
19
+ textAlign: FoodMenuGroupTextAlign;
15
20
  }
16
21
  export interface FoodMenuGroupOptions extends BriloBlockType {
17
22
  renderMenusControl?: (props: SelectControlProps) => JSX.Element;
23
+ /** Overrides the shared shadow presets — see `DEFAULT_SURFACE_SHADOWS`. */
24
+ shadows?: readonly SurfaceShadowOption[];
18
25
  }
19
26
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/blocks/food-menu/food-menu-group/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAA;AAC/D,OAAO,KAAK,EAAC,gCAAgC,EAAE,uBAAuB,EAAE,qBAAqB,EAAC,MAAM,aAAa,CAAA;AAEjH,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAA;AACtE,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAA;AAC1E,MAAM,MAAM,2BAA2B,GAAG,CAAC,OAAO,gCAAgC,CAAC,CAAC,MAAM,CAAC,CAAA;AAE3F,MAAM,WAAW,uBAAwB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACtE,IAAI,EAAE,iBAAiB,CAAA;IACvB,MAAM,EAAE,mBAAmB,CAAA;IAC3B,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,UAAU,EAAE,OAAO,CAAA;IACnB,aAAa,EAAE,OAAO,CAAA;IACtB,eAAe,EAAE,OAAO,CAAA;IACxB,cAAc,EAAE,2BAA2B,CAAA;IAC3C,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,GAAG,CAAC,OAAO,CAAA;CAChE"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/blocks/food-menu/food-menu-group/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mBAAmB,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAA;AACvF,OAAO,KAAK,EAAC,cAAc,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAA;AAC/D,OAAO,KAAK,EACV,gCAAgC,EAChC,uBAAuB,EACvB,qBAAqB,EACrB,iCAAiC,EACjC,2BAA2B,EAC5B,MAAM,aAAa,CAAA;AAEpB,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;AAC/E,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;AACnF,MAAM,MAAM,2BAA2B,GAAG,CAAC,OAAO,gCAAgC,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;AACpG,MAAM,MAAM,4BAA4B,GAAG,CAAC,OAAO,iCAAiC,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;AACtG,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;AAE1F,MAAM,WAAW,uBAAwB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACtE,IAAI,EAAE,iBAAiB,CAAA;IACvB,MAAM,EAAE,mBAAmB,CAAA;IAC3B,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,UAAU,EAAE,OAAO,CAAA;IACnB,aAAa,EAAE,OAAO,CAAA;IACtB,eAAe,EAAE,4BAA4B,CAAA;IAC7C,cAAc,EAAE,2BAA2B,CAAA;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,CAAA;IAC3B,SAAS,EAAE,sBAAsB,CAAA;CAClC;AAED,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,GAAG,CAAC,OAAO,CAAA;IAC/D,2EAA2E;IAC3E,OAAO,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAA;CACzC"}
@@ -0,0 +1,7 @@
1
+ import type React from 'react';
2
+ import type { FoodReservationAttributes, FoodReservationOptions } from './types';
3
+ export declare function createFoodReservationEdit(options: FoodReservationOptions): ({ attributes, setAttributes, }: {
4
+ attributes: FoodReservationAttributes;
5
+ setAttributes: (a: Partial<FoodReservationAttributes>) => void;
6
+ }) => React.JSX.Element;
7
+ //# sourceMappingURL=edit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/food-menu/food-reservation/edit.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAC,yBAAyB,EAAE,sBAAsB,EAAC,MAAM,SAAS,CAAA;AAiH9E,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,sBAAsB,oCAIpE;IACD,UAAU,EAAE,yBAAyB,CAAA;IACrC,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,KAAK,IAAI,CAAA;CAC/D,uBAkDF"}
@@ -0,0 +1,69 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import apiFetch from '@wordpress/api-fetch';
3
+ import { InspectorControls, useBlockProps } from '@wordpress/block-editor';
4
+ import { Button, ExternalLink, Notice, PanelBody, Spinner, TextareaControl } from '@wordpress/components';
5
+ import { __, sprintf } from '@wordpress/i18n';
6
+ import clsx from 'clsx';
7
+ import { useEffect, useState } from 'react';
8
+ import { icon as reservationIcon } from './icon';
9
+ // Shares the menu block's preview card styles (food-menu-group/editor.scss).
10
+ const BASE = 'brilo-food-menu-preview';
11
+ /**
12
+ * Which days the form would offer is decided on the server (deadlines,
13
+ * sold-out dishes, the site's time zone), so the preview asks the block's
14
+ * own endpoint. It describes the form instead of drawing it.
15
+ */
16
+ function useReservationPreview() {
17
+ const [data, setData] = useState(null);
18
+ const [hasError, setHasError] = useState(false);
19
+ const [attempt, setAttempt] = useState(0);
20
+ // biome-ignore lint/correctness/useExhaustiveDependencies: attempt re-runs the effect on retry
21
+ useEffect(() => {
22
+ let cancelled = false;
23
+ setHasError(false);
24
+ apiFetch({ path: '/brilo/v1/food-reservation/preview' })
25
+ .then((result) => {
26
+ if (!cancelled) {
27
+ setData(result);
28
+ }
29
+ })
30
+ .catch(() => {
31
+ if (!cancelled) {
32
+ setHasError(true);
33
+ }
34
+ });
35
+ return () => {
36
+ cancelled = true;
37
+ };
38
+ }, [attempt]);
39
+ return { data, hasError, retry: () => setAttempt((value) => value + 1) };
40
+ }
41
+ function DisabledNotice({ settingsUrl }) {
42
+ return (_jsxs(Notice, { status: "warning", isDismissible: false, children: [__('Rezervace obědů jsou v nastavení modulu vypnuté, blok se na webu nezobrazí.', 'brilo-blocks'), ' ', settingsUrl && _jsx(ExternalLink, { href: settingsUrl, children: __('Nastavení jídelního lístku', 'brilo-blocks') })] }));
43
+ }
44
+ function PreviewCard({ data, emptyText }) {
45
+ const [first] = data.days;
46
+ return (_jsxs("div", { className: `${BASE}__card`, children: [_jsxs("div", { className: `${BASE}__head`, children: [_jsxs("div", { className: `${BASE}__title`, children: [reservationIcon, _jsx("span", { children: __('Rezervace obědu', 'brilo-blocks') })] }), _jsxs("div", { className: `${BASE}__meta`, children: [_jsx("span", { className: clsx(`${BASE}__pill`, `${BASE}__pill--muted`), children: `#${data.anchor}` }), first && _jsx("span", { className: clsx(`${BASE}__pill`, `${BASE}__pill--ok`), children: __('Rezervace otevřené', 'brilo-blocks') })] })] }), _jsxs("div", { className: `${BASE}__body`, children: [first ? (_jsxs("div", { className: `${BASE}__section`, children: [_jsx("div", { className: `${BASE}__section-title`, children: __('Formulář nabídne dny', 'brilo-blocks') }), data.days.map((day, index) => (_jsxs("div", { className: clsx(`${BASE}__row`, `${BASE}__row--no-price`), children: [_jsx("span", { className: `${BASE}__unit`, children: 0 === index ? __('výchozí', 'brilo-blocks') : '' }), _jsxs("span", { className: `${BASE}__name`, children: [day.label, day.deadline && _jsx("small", { className: `${BASE}__note`, children: sprintf(__('Uzávěrka: %s', 'brilo-blocks'), day.deadline) })] })] }, day.menuId)))] })) : (_jsx("div", { className: `${BASE}__empty`, children: _jsxs("div", { children: [_jsx("b", { children: __('Teď není na který den rezervovat', 'brilo-blocks') }), sprintf(__('Na webu se ukáže věta „%s“', 'brilo-blocks'), emptyText.trim() || data.emptyMessage)] }) })), _jsx("div", { className: `${BASE}__foot`, children: _jsx("span", { children: sprintf(__('Odkaz se stránkou?menu=ID#%s předvybere den daného lístku.', 'brilo-blocks'), data.anchor) }) })] })] }));
47
+ }
48
+ export function createFoodReservationEdit(options) {
49
+ return function Edit({ attributes, setAttributes, }) {
50
+ var _a;
51
+ const { emptyText } = attributes;
52
+ const blockProps = useBlockProps({ className: clsx((_a = options.blockClassName) !== null && _a !== void 0 ? _a : 'g-food-reservation') });
53
+ const { data, hasError, retry } = useReservationPreview();
54
+ let content;
55
+ if (hasError) {
56
+ content = (_jsx("div", { className: `${BASE}__empty`, children: _jsxs("div", { children: [_jsx("b", { children: __('Náhled se nepodařilo načíst.', 'brilo-blocks') }), _jsx(Button, { variant: "secondary", size: "small", className: `${BASE}__retry`, onClick: retry, children: __('Zkusit znovu', 'brilo-blocks') })] }) }));
57
+ }
58
+ else if (!data) {
59
+ content = _jsx(Spinner, {});
60
+ }
61
+ else if (!data.enabled) {
62
+ content = _jsx(DisabledNotice, { settingsUrl: data.settingsUrl });
63
+ }
64
+ else {
65
+ content = _jsx(PreviewCard, { data: data, emptyText: emptyText });
66
+ }
67
+ return (_jsxs(_Fragment, { children: [_jsx(InspectorControls, { children: _jsx(PanelBody, { title: __('Když není co rezervovat', 'brilo-blocks'), children: _jsx(TextareaControl, { __nextHasNoMarginBottom: true, label: __('Vlastní text zprávy', 'brilo-blocks'), help: __('Když zůstane prázdné, použije se výchozí věta.', 'brilo-blocks'), rows: 2, value: emptyText, onChange: (value) => setAttributes({ emptyText: value }) }) }) }), _jsx("div", { ...blockProps, children: _jsx("div", { className: BASE, style: { '--food-menu-preview-align': 'left' }, children: content }) })] }));
68
+ };
69
+ }
@@ -0,0 +1,4 @@
1
+ import type { BlockConfiguration } from '@wordpress/blocks';
2
+ import type { FoodReservationAttributes, FoodReservationOptions } from './types';
3
+ export declare function createFoodReservationBlock(options: FoodReservationOptions): BlockConfiguration<FoodReservationAttributes>;
4
+ //# sourceMappingURL=factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/blocks/food-menu/food-reservation/factory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAA;AAIzD,OAAO,KAAK,EAAC,yBAAyB,EAAE,sBAAsB,EAAC,MAAM,SAAS,CAAA;AAE9E,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,sBAAsB,GAAG,kBAAkB,CAAC,yBAAyB,CAAC,CAqBzH"}
@@ -0,0 +1,24 @@
1
+ import { __ } from '@wordpress/i18n';
2
+ import { createFoodReservationEdit } from './edit';
3
+ import { icon as defaultIcon } from './icon';
4
+ export function createFoodReservationBlock(options) {
5
+ var _a, _b, _c, _d;
6
+ return {
7
+ name: options.name,
8
+ title: (_a = options.title) !== null && _a !== void 0 ? _a : __('Rezervace obědu', 'brilo-blocks'),
9
+ description: (_b = options.description) !== null && _b !== void 0 ? _b : __('Rezervační formulář přímo na stránce. Tlačítka „Rezervovat oběd“ na něj vedou přes kotvu #rezervace.', 'brilo-blocks'),
10
+ category: (_c = options.category) !== null && _c !== void 0 ? _c : 'widgets',
11
+ ...(options.parent && { parent: options.parent }),
12
+ icon: (_d = options.icon) !== null && _d !== void 0 ? _d : { src: defaultIcon },
13
+ // The anchor is fixed (`rezervace`), so the block takes no own HTML anchor.
14
+ supports: { html: false, customClassName: false, multiple: false },
15
+ attributes: {
16
+ emptyText: {
17
+ type: 'string',
18
+ default: '',
19
+ },
20
+ },
21
+ edit: createFoodReservationEdit(options),
22
+ save: () => null,
23
+ };
24
+ }
@@ -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/food-menu/food-reservation/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", role: "img", "aria-label": "Rezervace ob\u011Bdu", children: [_jsx("rect", { x: "3", y: "4", width: "14", height: "13", stroke: "currentColor", fill: "none" }), _jsx("line", { x1: "3", y1: "8", x2: "17", y2: "8", stroke: "currentColor" }), _jsx("line", { x1: "7", y1: "2", x2: "7", y2: "6", stroke: "currentColor" }), _jsx("line", { x1: "13", y1: "2", x2: "13", y2: "6", stroke: "currentColor" }), _jsx("polyline", { points: "7,12.5 9,14.5 13,10.5", stroke: "currentColor", fill: "none" })] }));
@@ -0,0 +1,5 @@
1
+ export type { FoodReservationAttributes, FoodReservationOptions } from './types';
2
+ export { createFoodReservationBlock } from './factory';
3
+ import type { FoodReservationOptions } from './types';
4
+ export declare const foodReservationDefaults: FoodReservationOptions;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/blocks/food-menu/food-reservation/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,yBAAyB,EAAE,sBAAsB,EAAC,MAAM,SAAS,CAAA;AAC9E,OAAO,EAAC,0BAA0B,EAAC,MAAM,WAAW,CAAA;AAEpD,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAA;AAEnD,eAAO,MAAM,uBAAuB,EAAE,sBAIrC,CAAA"}
@@ -0,0 +1,6 @@
1
+ export { createFoodReservationBlock } from './factory';
2
+ export const foodReservationDefaults = {
3
+ name: 'brilo/food-reservation',
4
+ // A section of its own, or a column next to the day's menu.
5
+ parent: ['brilo/base-section', 'brilo/column-item'],
6
+ };
@@ -0,0 +1,7 @@
1
+ import type { BriloBlockType } from '../../../types';
2
+ export interface FoodReservationAttributes extends Record<string, unknown> {
3
+ /** Empty means "use the server's sentence". */
4
+ emptyText: string;
5
+ }
6
+ export type FoodReservationOptions = BriloBlockType;
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/blocks/food-menu/food-reservation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AAE3C,MAAM,WAAW,yBAA0B,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACxE,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAA"}
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- import { type FIELD_SELECT_MODE_VALUES, type FIELD_TEXT_TYPE_VALUES, type FIELD_TYPE_VALUES, type FILE_BUTTON_VARIANT_VALUES } from './constants';
1
+ import type { FIELD_SELECT_MODE_VALUES, FIELD_TEXT_TYPE_VALUES, FIELD_TYPE_VALUES, FILE_BUTTON_VARIANT_VALUES } from './constants';
2
2
  import type { BriloBlockType } from '../../../types';
3
3
  export type FormFieldType = (typeof FIELD_TYPE_VALUES)[number];
4
4
  export type FormFieldTextType = (typeof FIELD_TEXT_TYPE_VALUES)[number];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/blocks/form/form-field/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAE7B,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,EAChC,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AAE3C,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AAC9D,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAA;AACvE,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAA;AAC3E,MAAM,MAAM,0BAA0B,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAA;AAEpF,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAC,CAAA;AAEvF,MAAM,WAAW,mBAAoB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClE,IAAI,EAAE,aAAa,CAAA;IACnB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,eAAe,EAAE,CAAA;IAC1B,UAAU,EAAE,mBAAmB,CAAA;IAC/B,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,gBAAgB,EAAE,MAAM,CAAA;IACxB,aAAa,EAAE,0BAA0B,CAAA;IACzC,aAAa,EAAE,OAAO,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,gBAAiB,SAAQ,cAAc;CAAG"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/blocks/form/form-field/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,wBAAwB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,0BAA0B,EAAC,MAAM,aAAa,CAAA;AAChI,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AAE3C,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AAC9D,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAA;AACvE,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAA;AAC3E,MAAM,MAAM,0BAA0B,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAA;AAEpF,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAC,CAAA;AAEvF,MAAM,WAAW,mBAAoB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClE,IAAI,EAAE,aAAa,CAAA;IACnB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,eAAe,EAAE,CAAA;IAC1B,UAAU,EAAE,mBAAmB,CAAA;IAC/B,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,gBAAgB,EAAE,MAAM,CAAA;IACxB,aAAa,EAAE,0BAA0B,CAAA;IACzC,aAAa,EAAE,OAAO,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,gBAAiB,SAAQ,cAAc;CAAG"}
@@ -2,7 +2,7 @@ export { createFormGroupBlock } from './factory';
2
2
  export { EXTERNAL_METHODS, INTERNAL_SUBMIT_BEHAVIORS, PROCESSING_MODES } from './constants';
3
3
  export const formGroupDefaults = {
4
4
  name: 'brilo/form-group',
5
- parent: ['brilo/base-section'],
5
+ parent: ['brilo/base-section', 'brilo/column-item', 'brilo/responsive-grid-item'],
6
6
  allowedBlocks: ['brilo/form-field'],
7
7
  template: [['brilo/form-field', { type: 'text' }]],
8
8
  };
@@ -1,21 +1,3 @@
1
1
  export declare const DEFAULT_COLUMNS: readonly [2, 3, 4, 6];
2
- export declare const DEFAULT_RATIOS: readonly [{
3
- readonly value: '4:3';
4
- readonly label: '4:3';
5
- }, {
6
- readonly value: '16:9';
7
- readonly label: '16:9';
8
- }, {
9
- readonly value: '3:2';
10
- readonly label: '3:2';
11
- }, {
12
- readonly value: '1:1';
13
- readonly label: '1:1';
14
- }, {
15
- readonly value: '2:1';
16
- readonly label: '2:1';
17
- }, {
18
- readonly value: '3:4';
19
- readonly label: '3:4';
20
- }];
2
+ export { GALLERY_RATIOS as DEFAULT_RATIOS } from '../../../constants';
21
3
  //# 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,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
+ {"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,OAAO,EAAC,cAAc,IAAI,cAAc,EAAC,MAAM,aAAa,CAAA"}
@@ -1,9 +1,2 @@
1
1
  export const DEFAULT_COLUMNS = [2, 3, 4, 6];
2
- export const DEFAULT_RATIOS = [
3
- { value: '4:3', label: '4:3' },
4
- { value: '16:9', label: '16:9' },
5
- { value: '3:2', label: '3:2' },
6
- { value: '1:1', label: '1:1' },
7
- { value: '2:1', label: '2:1' },
8
- { value: '3:4', label: '3:4' },
9
- ];
2
+ export { GALLERY_RATIOS as DEFAULT_RATIOS } from '../../../constants';
@@ -1 +1 @@
1
- {"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/gallery/gallery-group/edit.tsx"],"names":[],"mappings":"AAcA,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,iCAsFF"}
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;AAEtF,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,iCAwDF"}
@@ -1,10 +1,9 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { InspectorControls, MediaUpload } from '@wordpress/block-editor';
2
+ import { InspectorControls } from '@wordpress/block-editor';
3
3
  import { PanelBody, TextControl, __experimentalToggleGroupControl as ToggleGroupControl, __experimentalToggleGroupControlOption as ToggleGroupControlOption, } from '@wordpress/components';
4
4
  import { __ } from '@wordpress/i18n';
5
- import { useDispatch } from '@wordpress/data';
6
- import { createBlock } from '@wordpress/blocks';
7
5
  import clsx from 'clsx';
6
+ import { GalleryImagesAppender } from '../../../components/GalleryImagesAppender';
8
7
  import { ItemSpacingPanel, itemSpacingStyle } from '../../../components/ItemSpacingControl';
9
8
  import { useGroupBlock } from '../../../hooks/useGroupBlock';
10
9
  import { DEFAULT_COLUMNS, DEFAULT_RATIOS } from './constants';
@@ -15,21 +14,6 @@ export function createGalleryGroupEdit(options) {
15
14
  return function Edit({ attributes, setAttributes, clientId, }) {
16
15
  var _a, _b;
17
16
  const { columns, ratio, galleryId, spacing } = attributes;
18
- const { insertBlock } = useDispatch('core/block-editor');
19
- const addNewBlock = (imageId) => {
20
- const newBlock = createBlock(options.allowedBlocks[0], {
21
- img: {
22
- id: imageId,
23
- },
24
- });
25
- insertBlock(newBlock, undefined, clientId);
26
- };
27
- const onSelectImages = (media) => {
28
- media.forEach((item) => addNewBlock(item.id));
29
- };
30
- const CustomAppender = () => {
31
- return (_jsx(MediaUpload, { onSelect: onSelectImages, multiple: "add", allowedTypes: ['image'], render: ({ open }) => (_jsx("div", { onClick: open, className: "g-gallery__appender", children: __('Přidat obrázky', 'brilo-blocks') })) }));
32
- };
33
17
  const { blockProps, innerBlocksProps } = useGroupBlock({
34
18
  blockClassName: clsx((_a = options.blockClassName) !== null && _a !== void 0 ? _a : 'g-gallery wp-block-section'),
35
19
  containerClassName: [(_b = options.containerClassName) !== null && _b !== void 0 ? _b : 'u-grid-responsive', `--cols-${columns}`],
@@ -39,7 +23,7 @@ export function createGalleryGroupEdit(options) {
39
23
  ...itemSpacingStyle(spacing),
40
24
  },
41
25
  allowedBlocks: options.allowedBlocks,
42
- renderAppender: CustomAppender,
26
+ renderAppender: () => _jsx(GalleryImagesAppender, { clientId: clientId, itemBlock: options.allowedBlocks[0] }),
43
27
  template: options.template,
44
28
  layout: { type: 'default' },
45
29
  });
@@ -1,6 +1,6 @@
1
1
  export { createGalleryItemBlock } from './factory';
2
2
  export const galleryItemDefaults = {
3
3
  name: 'brilo/gallery-item',
4
- parent: ['brilo/gallery-group'],
4
+ parent: ['brilo/gallery-group', 'brilo/gallery-strip-group'],
5
5
  template: [],
6
6
  };
@@ -0,0 +1,34 @@
1
+ export declare const HEIGHTS: readonly [{
2
+ readonly value: 'sm';
3
+ readonly label: import("@wordpress/i18n").TransformedText<"Malá">;
4
+ }, {
5
+ readonly value: 'md';
6
+ readonly label: import("@wordpress/i18n").TransformedText<"Střední">;
7
+ }, {
8
+ readonly value: 'lg';
9
+ readonly label: import("@wordpress/i18n").TransformedText<"Velká">;
10
+ }];
11
+ export declare const SPEEDS: readonly [{
12
+ readonly value: 'slow';
13
+ readonly label: import("@wordpress/i18n").TransformedText<"Pomalu">;
14
+ }, {
15
+ readonly value: 'medium';
16
+ readonly label: import("@wordpress/i18n").TransformedText<"Středně">;
17
+ }, {
18
+ readonly value: 'fast';
19
+ readonly label: import("@wordpress/i18n").TransformedText<"Rychle">;
20
+ }];
21
+ export declare const DIRECTIONS: readonly [{
22
+ readonly value: 'left';
23
+ readonly label: import("@wordpress/i18n").TransformedText<"Doleva">;
24
+ }, {
25
+ readonly value: 'right';
26
+ readonly label: import("@wordpress/i18n").TransformedText<"Doprava">;
27
+ }];
28
+ export { GALLERY_RATIOS as DEFAULT_RATIOS } from '../../../constants';
29
+ export declare const HEIGHT_PIXELS: {
30
+ readonly sm: 160;
31
+ readonly md: 240;
32
+ readonly lg: 320;
33
+ };
34
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/blocks/gallery/gallery-strip-group/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO;aACjB,KAAK,EAAE,IAAI;aAAE,KAAK;;aAClB,KAAK,EAAE,IAAI;aAAE,KAAK;;aAClB,KAAK,EAAE,IAAI;aAAE,KAAK;EACX,CAAA;AAEV,eAAO,MAAM,MAAM;aAChB,KAAK,EAAE,MAAM;aAAE,KAAK;;aACpB,KAAK,EAAE,QAAQ;aAAE,KAAK;;aACtB,KAAK,EAAE,MAAM;aAAE,KAAK;EACb,CAAA;AAEV,eAAO,MAAM,UAAU;aACpB,KAAK,EAAE,MAAM;aAAE,KAAK;;aACpB,KAAK,EAAE,OAAO;aAAE,KAAK;EACd,CAAA;AAEV,OAAO,EAAC,cAAc,IAAI,cAAc,EAAC,MAAM,aAAa,CAAA;AAE5D,eAAO,MAAM,aAAa;aAAI,EAAE,EAAE,GAAG;aAAE,EAAE,EAAE,GAAG;aAAE,EAAE,EAAE,GAAG;CAAU,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { __ } from '@wordpress/i18n';
2
+ export const HEIGHTS = [
3
+ { value: 'sm', label: __('Malá', 'brilo-blocks') },
4
+ { value: 'md', label: __('Střední', 'brilo-blocks') },
5
+ { value: 'lg', label: __('Velká', 'brilo-blocks') },
6
+ ];
7
+ export const SPEEDS = [
8
+ { value: 'slow', label: __('Pomalu', 'brilo-blocks') },
9
+ { value: 'medium', label: __('Středně', 'brilo-blocks') },
10
+ { value: 'fast', label: __('Rychle', 'brilo-blocks') },
11
+ ];
12
+ export const DIRECTIONS = [
13
+ { value: 'left', label: __('Doleva', 'brilo-blocks') },
14
+ { value: 'right', label: __('Doprava', 'brilo-blocks') },
15
+ ];
16
+ export { GALLERY_RATIOS as DEFAULT_RATIOS } from '../../../constants';
17
+ export const HEIGHT_PIXELS = { sm: 160, md: 240, lg: 320 };
@@ -0,0 +1,7 @@
1
+ import type { GalleryStripGroupAttributes, GalleryStripGroupOptions } from './types';
2
+ export declare function createGalleryStripGroupEdit(options: GalleryStripGroupOptions): ({ attributes, setAttributes, clientId, }: {
3
+ attributes: GalleryStripGroupAttributes;
4
+ setAttributes: (a: Partial<GalleryStripGroupAttributes>) => void;
5
+ clientId: string;
6
+ }) => import("react").JSX.Element;
7
+ //# sourceMappingURL=edit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/gallery/gallery-strip-group/edit.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAEV,2BAA2B,EAC3B,wBAAwB,EAIzB,MAAM,SAAS,CAAA;AAEhB,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,wBAAwB,8CAOxE;IACD,UAAU,EAAE,2BAA2B,CAAA;IACvC,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,KAAK,IAAI,CAAA;IAChE,QAAQ,EAAE,MAAM,CAAA;CACjB,iCA+EF"}
@@ -0,0 +1,34 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { InspectorControls } from '@wordpress/block-editor';
3
+ import { PanelBody, __experimentalToggleGroupControl as ToggleGroupControl, __experimentalToggleGroupControlOption as ToggleGroupControlOption, } from '@wordpress/components';
4
+ import { __ } from '@wordpress/i18n';
5
+ import clsx from 'clsx';
6
+ import { GalleryImagesAppender } from '../../../components/GalleryImagesAppender';
7
+ import { ItemSpacingPanel, itemSpacingStyle } from '../../../components/ItemSpacingControl';
8
+ import { useGroupBlock } from '../../../hooks/useGroupBlock';
9
+ import { DEFAULT_RATIOS, DIRECTIONS, HEIGHTS, HEIGHT_PIXELS, SPEEDS } from './constants';
10
+ export function createGalleryStripGroupEdit(options) {
11
+ var _a;
12
+ const RATIOS = (_a = options.ratios) !== null && _a !== void 0 ? _a : DEFAULT_RATIOS;
13
+ return function Edit({ attributes, setAttributes, clientId, }) {
14
+ var _a, _b, _c;
15
+ const { height, ratio, speed, direction, spacing } = attributes;
16
+ const heightPx = (_a = HEIGHT_PIXELS[height]) !== null && _a !== void 0 ? _a : HEIGHT_PIXELS.md;
17
+ const [ratioWidth, ratioHeight] = ratio.split(':').map(Number);
18
+ const { blockProps, innerBlocksProps } = useGroupBlock({
19
+ blockClassName: clsx((_b = options.blockClassName) !== null && _b !== void 0 ? _b : 'g-gallery g-gallery-strip wp-block-section', `--speed-${speed}`, `--direction-${direction}`),
20
+ containerClassName: (_c = options.containerClassName) !== null && _c !== void 0 ? _c : 'g-gallery-strip__track',
21
+ containerStyle: {
22
+ '--gallery-strip-height': `${heightPx}px`,
23
+ '--gallery-strip-item-width': `${Math.round((heightPx * ratioWidth) / ratioHeight)}px`,
24
+ ...itemSpacingStyle(spacing),
25
+ },
26
+ allowedBlocks: options.allowedBlocks,
27
+ orientation: 'horizontal',
28
+ renderAppender: () => _jsx(GalleryImagesAppender, { clientId: clientId, itemBlock: options.allowedBlocks[0] }),
29
+ template: options.template,
30
+ layout: { type: 'default' },
31
+ });
32
+ return (_jsxs(_Fragment, { children: [_jsxs(InspectorControls, { children: [_jsxs(PanelBody, { title: __('Rozložení', 'brilo-blocks'), children: [_jsx(ToggleGroupControl, { isBlock: true, label: __('Výška', 'brilo-blocks'), value: height, onChange: (v) => setAttributes({ height: v }), children: HEIGHTS.map((h) => (_jsx(ToggleGroupControlOption, { value: h.value, label: h.label }, h.value))) }), _jsx(ToggleGroupControl, { isBlock: true, label: __('Poměr stran', 'brilo-blocks'), value: ratio, onChange: (v) => setAttributes({ ratio: v }), children: RATIOS.map((r) => (_jsx(ToggleGroupControlOption, { value: r.value, label: r.label }, r.value))) })] }), _jsxs(PanelBody, { title: __('Animace', 'brilo-blocks'), children: [_jsx(ToggleGroupControl, { isBlock: true, label: __('Rychlost', 'brilo-blocks'), value: speed, onChange: (v) => setAttributes({ speed: v }), children: SPEEDS.map((s) => (_jsx(ToggleGroupControlOption, { value: s.value, label: s.label }, s.value))) }), _jsx(ToggleGroupControl, { isBlock: true, label: __('Směr', 'brilo-blocks'), value: direction, onChange: (v) => setAttributes({ direction: v }), children: DIRECTIONS.map((d) => (_jsx(ToggleGroupControlOption, { value: d.value, label: d.label }, d.value))) })] }), _jsx(ItemSpacingPanel, { spacing: spacing, onChange: (v) => setAttributes({ spacing: v }) })] }), _jsx("div", { ...blockProps, children: _jsx("div", { ...innerBlocksProps }) })] }));
33
+ };
34
+ }
@@ -0,0 +1,5 @@
1
+ import type { BlockConfiguration } from '@wordpress/blocks';
2
+ import type { GalleryStripGroupAttributes, GalleryStripGroupOptions } from './types';
3
+ export type { GalleryStripGroupAttributes, GalleryStripGroupOptions };
4
+ export declare function createGalleryStripGroupBlock(options: GalleryStripGroupOptions): BlockConfiguration<GalleryStripGroupAttributes>;
5
+ //# sourceMappingURL=factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/blocks/gallery/gallery-strip-group/factory.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAA;AAKzD,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,CAqB/H"}