Skip to content

Commit e3fe25e

Browse files
committed
feat: ref #102071 Embed targets of the order form in chats
1 parent 7c3aae2 commit e3fe25e

File tree

3 files changed

+195
-2
lines changed

3 files changed

+195
-2
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ build: ## Builds the package
1616
$(TARGET_HEADER)
1717
$(YARN) workspaces foreach -A --topological-dev run build
1818

19+
.PHONY: build
20+
prepare: ## Builds the package
21+
$(TARGET_HEADER)
22+
$(YARN) workspaces foreach -A --topological-dev run prepare
23+
1924
.PHONY: release
2025
release: ## Bumps version and creates tag
2126
$(TARGET_HEADER)
@@ -48,4 +53,4 @@ $(call computable,CC_BLUE,$(shell tput -Txterm setaf 4 2>/dev/null))
4853
$(call computable,CC_MAGENTA,$(shell tput -Txterm setaf 5 2>/dev/null))
4954
$(call computable,CC_CYAN,$(shell tput -Txterm setaf 6 2>/dev/null))
5055
$(call computable,CC_WHITE,$(shell tput -Txterm setaf 7 2>/dev/null))
51-
$(call computable,CC_END,$(shell tput -Txterm sgr0 2>/dev/null))
56+
$(call computable,CC_END,$(shell tput -Txterm sgr0 2>/dev/null))

meta/index.ts

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,150 @@ export const targetListDocumentation: {
435435
'order/card',
436436
],
437437
},
438+
'order/mg:list.before': {
439+
description: {
440+
'en-GB': 'Widget for the block "Order items"',
441+
'es-ES': 'Widget para el bloque "Artículos del pedido"',
442+
'ru-RU': 'Виджет для блока "Состав заказа"',
443+
},
444+
location: {
445+
'en-GB': 'Section start, right above the list of order items',
446+
'es-ES': 'Inicio de la sección, justo encima de la lista de artículos del pedido',
447+
'ru-RU': 'Начало секции, над списком товарных позиций',
448+
},
449+
contexts: [
450+
'order/mg',
451+
'order/mg:settings',
452+
'user/current',
453+
'settings',
454+
],
455+
customContexts: [
456+
'order',
457+
],
458+
actions: [
459+
'order/mg',
460+
],
461+
},
462+
'order/mg:list.after': {
463+
description: {
464+
'en-GB': 'Widget for the block "Order items"',
465+
'es-ES': 'Widget para el bloque "Artículos del pedido"',
466+
'ru-RU': 'Виджет для блока "Состав заказа"',
467+
},
468+
location: {
469+
'en-GB': 'Section end, right after the list of order items and before the discount, privilege selection, etc. input fields',
470+
'es-ES': 'Fin de la sección, justo después de la lista de artículos del pedido y antes de los campos de entrada de descuento, selección de privilegios, etc.',
471+
'ru-RU': 'Конец секции, сразу после списка товарных позиций и до полей ввода скидки, выбора привилегии и т.п.',
472+
},
473+
contexts: [
474+
'order/mg',
475+
'order/mg:settings',
476+
'user/current',
477+
'settings',
478+
],
479+
customContexts: [
480+
'order',
481+
],
482+
actions: [
483+
'order/mg',
484+
],
485+
},
486+
'order/mg:delivery.before': {
487+
description: {
488+
'en-GB': 'Widget for the block "Delivery"',
489+
'es-ES': 'Widget para el bloque "Entrega"',
490+
'ru-RU': 'Виджет для блока "Доставка"',
491+
},
492+
location: {
493+
'en-GB': 'Section start, right above the input field',
494+
'es-ES': 'Inicio de la sección, justo encima del campo de entrada',
495+
'ru-RU': 'Начало секции, над полем ввода',
496+
},
497+
contexts: [
498+
'order/mg',
499+
'order/mg:settings',
500+
'user/current',
501+
'settings',
502+
],
503+
customContexts: [
504+
'order',
505+
],
506+
actions: [
507+
'order/mg',
508+
],
509+
},
510+
'order/mg:delivery.after': {
511+
description: {
512+
'en-GB': 'Widget for the block "Delivery"',
513+
'es-ES': 'Widget para el bloque "Entrega"',
514+
'ru-RU': 'Виджет для блока "Доставка"',
515+
},
516+
location: {
517+
'en-GB': 'Section end, right under the input fields',
518+
'es-ES': 'Fin de la sección, justo debajo de los campos de entrada',
519+
'ru-RU': 'Конец секции, под полями ввода',
520+
},
521+
contexts: [
522+
'order/mg',
523+
'order/mg:settings',
524+
'user/current',
525+
'settings',
526+
],
527+
customContexts: [
528+
'order',
529+
],
530+
actions: [
531+
'order/mg',
532+
],
533+
},
534+
'order/mg:payment.before': {
535+
description: {
536+
'en-GB': 'Widget for the block "Payment"',
537+
'es-ES': 'Widget para el bloque "Pago"',
538+
'ru-RU': 'Виджет для блока "Оплата"',
539+
},
540+
location: {
541+
'en-GB': 'Section start, right above the input field',
542+
'es-ES': 'Inicio de la sección, justo encima del campo de entrada',
543+
'ru-RU': 'Начало секции, над полем ввода',
544+
},
545+
contexts: [
546+
'order/mg',
547+
'order/mg:settings',
548+
'user/current',
549+
'settings',
550+
],
551+
customContexts: [
552+
'order',
553+
],
554+
actions: [
555+
'order/mg',
556+
],
557+
},
558+
'order/mg:payment.after': {
559+
description: {
560+
'en-GB': 'Widget for the block "Payment"',
561+
'es-ES': 'Widget para el bloque "Pago"',
562+
'ru-RU': 'Виджет для блока "Оплата"',
563+
},
564+
location: {
565+
'en-GB': 'Section end, after the list of payments, controls, and custom fields',
566+
'es-ES': 'Fin de la sección, después de la lista de pagos, controles y campos personalizados',
567+
'ru-RU': 'Конец секции, после списка оплат, контролов и пользовательских полей',
568+
},
569+
contexts: [
570+
'order/mg',
571+
'order/mg:settings',
572+
'user/current',
573+
'settings',
574+
],
575+
customContexts: [
576+
'order',
577+
],
578+
actions: [
579+
'order/mg',
580+
],
581+
},
438582
}
439583

440584
export const pageListDocumentation = [{
@@ -453,4 +597,12 @@ export const pageListDocumentation = [{
453597
'ru-RU': 'Страница с формой создания/редактирования заказа',
454598
} as TranslationList,
455599
targets: keysOf(targetListDocumentation).filter(target => target.startsWith('order/card:')),
600+
}, {
601+
id: 'order/mg',
602+
description: {
603+
'en-GB': 'Page with the order creation/editing form in chats',
604+
'es-ES': 'Página con el formulario de creación/edición de pedidos en los chats',
605+
'ru-RU': 'Страница с формой создания/редактирования заказа в чатах',
606+
} as TranslationList,
607+
targets: keysOf(targetListDocumentation).filter(target => target.startsWith('order/mg:')),
456608
}]

types/widget.d.ts

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,5 +127,41 @@ export type SchemaListByTarget = {
127127
| 'order/card'
128128
| 'user/current'
129129
| 'settings'
130-
>
130+
>;
131+
'order/mg:list.before': Pick<SchemaList,
132+
| 'order/mg'
133+
| 'order/mg:settings'
134+
| 'user/current'
135+
| 'settings'
136+
>;
137+
'order/mg:list.after': Pick<SchemaList,
138+
| 'order/mg'
139+
| 'order/mg:settings'
140+
| 'user/current'
141+
| 'settings'
142+
>;
143+
'order/mg:delivery.before': Pick<SchemaList,
144+
| 'order/mg'
145+
| 'order/mg:settings'
146+
| 'user/current'
147+
| 'settings'
148+
>;
149+
'order/mg:delivery.after': Pick<SchemaList,
150+
| 'order/mg'
151+
| 'order/mg:settings'
152+
| 'user/current'
153+
| 'settings'
154+
>;
155+
'order/mg:payment.before': Pick<SchemaList,
156+
| 'order/mg'
157+
| 'order/mg:settings'
158+
| 'user/current'
159+
| 'settings'
160+
>;
161+
'order/mg:payment.after': Pick<SchemaList,
162+
| 'order/mg'
163+
| 'order/mg:settings'
164+
| 'user/current'
165+
| 'settings'
166+
>;
131167
}

0 commit comments

Comments
 (0)