@open-mercato/core 0.6.7-develop.6788.1.c2a1520a30 → 0.6.7-develop.6814.1.0627c7e9f1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/dist/generated/entities/customer_deal_person_link/index.js +2 -0
- package/dist/generated/entities/customer_deal_person_link/index.js.map +2 -2
- package/dist/generated/entities/customer_user_invitation/index.js +2 -0
- package/dist/generated/entities/customer_user_invitation/index.js.map +2 -2
- package/dist/generated/entities.ids.generated.js +1 -0
- package/dist/generated/entities.ids.generated.js.map +2 -2
- package/dist/generated/entity-fields-registry.js +2 -0
- package/dist/generated/entity-fields-registry.js.map +2 -2
- package/dist/modules/business_rules/api/openmercato-call-options/route.js +85 -0
- package/dist/modules/business_rules/api/openmercato-call-options/route.js.map +7 -0
- package/dist/modules/business_rules/api/rules/route.js +71 -4
- package/dist/modules/business_rules/api/rules/route.js.map +2 -2
- package/dist/modules/business_rules/components/ActionBuilder.js +47 -4
- package/dist/modules/business_rules/components/ActionBuilder.js.map +3 -3
- package/dist/modules/business_rules/components/ActionRow.js +106 -16
- package/dist/modules/business_rules/components/ActionRow.js.map +2 -2
- package/dist/modules/business_rules/components/utils/actionValidation.js +6 -0
- package/dist/modules/business_rules/components/utils/actionValidation.js.map +2 -2
- package/dist/modules/business_rules/lib/action-executor.js +148 -0
- package/dist/modules/business_rules/lib/action-executor.js.map +2 -2
- package/dist/modules/business_rules/lib/openmercato-call-options-types.js +5 -0
- package/dist/modules/business_rules/lib/openmercato-call-options-types.js.map +7 -0
- package/dist/modules/business_rules/lib/openmercato-call-options.js +231 -0
- package/dist/modules/business_rules/lib/openmercato-call-options.js.map +7 -0
- package/dist/modules/business_rules/lib/rule-engine.js +5 -1
- package/dist/modules/business_rules/lib/rule-engine.js.map +2 -2
- package/dist/modules/communication_channels/api/post/webhook/[provider]/route.js +11 -1
- package/dist/modules/communication_channels/api/post/webhook/[provider]/route.js.map +2 -2
- package/dist/modules/communication_channels/api/post/webhooks/gmail/route.js +11 -6
- package/dist/modules/communication_channels/api/post/webhooks/gmail/route.js.map +2 -2
- package/dist/modules/configs/lib/upgrade-actions.js +12 -0
- package/dist/modules/configs/lib/upgrade-actions.js.map +2 -2
- package/dist/modules/customer_accounts/api/admin/users/[id].js +10 -1
- package/dist/modules/customer_accounts/api/admin/users/[id].js.map +2 -2
- package/dist/modules/customer_accounts/api/admin/users-invite.js +61 -4
- package/dist/modules/customer_accounts/api/admin/users-invite.js.map +2 -2
- package/dist/modules/customer_accounts/api/portal/users-invite.js +20 -2
- package/dist/modules/customer_accounts/api/portal/users-invite.js.map +2 -2
- package/dist/modules/customer_accounts/data/entities.js +3 -0
- package/dist/modules/customer_accounts/data/entities.js.map +2 -2
- package/dist/modules/customer_accounts/data/validators.js +1 -0
- package/dist/modules/customer_accounts/data/validators.js.map +2 -2
- package/dist/modules/customer_accounts/emails/CustomerInvitationEmail.js +26 -0
- package/dist/modules/customer_accounts/emails/CustomerInvitationEmail.js.map +7 -0
- package/dist/modules/customer_accounts/lib/customerEntityOwnership.js +29 -3
- package/dist/modules/customer_accounts/lib/customerEntityOwnership.js.map +2 -2
- package/dist/modules/customer_accounts/lib/customerUrl.js +19 -10
- package/dist/modules/customer_accounts/lib/customerUrl.js.map +2 -2
- package/dist/modules/customer_accounts/lib/invitationEmail.js +35 -0
- package/dist/modules/customer_accounts/lib/invitationEmail.js.map +7 -0
- package/dist/modules/customer_accounts/migrations/Migration20260723120000_customer_accounts.js +13 -0
- package/dist/modules/customer_accounts/migrations/Migration20260723120000_customer_accounts.js.map +7 -0
- package/dist/modules/customer_accounts/services/customerInvitationService.js +32 -2
- package/dist/modules/customer_accounts/services/customerInvitationService.js.map +2 -2
- package/dist/modules/customer_accounts/subscribers/autoLinkCrm.js +47 -7
- package/dist/modules/customer_accounts/subscribers/autoLinkCrm.js.map +2 -2
- package/dist/modules/customer_accounts/widgets/injection/account-status/widget.client.js +2 -2
- package/dist/modules/customer_accounts/widgets/injection/account-status/widget.client.js.map +2 -2
- package/dist/modules/customer_accounts/widgets/injection-table.js +1 -1
- package/dist/modules/customer_accounts/widgets/injection-table.js.map +2 -2
- package/dist/modules/customers/api/deals/[id]/people/route.js +4 -2
- package/dist/modules/customers/api/deals/[id]/people/route.js.map +2 -2
- package/dist/modules/customers/api/deals/[id]/route.js +7 -3
- package/dist/modules/customers/api/deals/[id]/route.js.map +2 -2
- package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js +11 -1
- package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/[id]/page.js +14 -8
- package/dist/modules/customers/backend/customers/deals/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/people-v2/[id]/page.js +21 -6
- package/dist/modules/customers/backend/customers/people-v2/[id]/page.js.map +2 -2
- package/dist/modules/customers/cli.js +17 -7
- package/dist/modules/customers/cli.js.map +2 -2
- package/dist/modules/customers/commands/deals.js +48 -10
- package/dist/modules/customers/commands/deals.js.map +2 -2
- package/dist/modules/customers/commands/people.js +2 -0
- package/dist/modules/customers/commands/people.js.map +2 -2
- package/dist/modules/customers/components/detail/CompanyDetailTabs.js +26 -6
- package/dist/modules/customers/components/detail/CompanyDetailTabs.js.map +2 -2
- package/dist/modules/customers/components/detail/DealDetailTabs.js +30 -8
- package/dist/modules/customers/components/detail/DealDetailTabs.js.map +2 -2
- package/dist/modules/customers/components/detail/PersonDetailTabs.js +30 -8
- package/dist/modules/customers/components/detail/PersonDetailTabs.js.map +2 -2
- package/dist/modules/customers/data/entities.js +8 -0
- package/dist/modules/customers/data/entities.js.map +2 -2
- package/dist/modules/customers/data/validators.js +2 -1
- package/dist/modules/customers/data/validators.js.map +2 -2
- package/dist/modules/customers/migrations/Migration20260723210000_customers.js +15 -0
- package/dist/modules/customers/migrations/Migration20260723210000_customers.js.map +7 -0
- package/dist/modules/customers/search.js +50 -29
- package/dist/modules/customers/search.js.map +2 -2
- package/dist/modules/data_sync/api/mappings/[id]/route.js +22 -9
- package/dist/modules/data_sync/api/mappings/[id]/route.js.map +2 -2
- package/dist/modules/data_sync/api/mappings/route.js +13 -4
- package/dist/modules/data_sync/api/mappings/route.js.map +2 -2
- package/dist/modules/data_sync/api/options.js +7 -2
- package/dist/modules/data_sync/api/options.js.map +2 -2
- package/dist/modules/data_sync/api/run.js +7 -2
- package/dist/modules/data_sync/api/run.js.map +2 -2
- package/dist/modules/data_sync/api/runs/[id]/cancel.js +8 -3
- package/dist/modules/data_sync/api/runs/[id]/cancel.js.map +2 -2
- package/dist/modules/data_sync/api/runs/[id]/retry.js +7 -2
- package/dist/modules/data_sync/api/runs/[id]/retry.js.map +2 -2
- package/dist/modules/data_sync/api/runs/[id]/route.js +8 -3
- package/dist/modules/data_sync/api/runs/[id]/route.js.map +2 -2
- package/dist/modules/data_sync/api/runs.js +7 -2
- package/dist/modules/data_sync/api/runs.js.map +2 -2
- package/dist/modules/data_sync/api/schedules/[id]/route.js +19 -6
- package/dist/modules/data_sync/api/schedules/[id]/route.js.map +2 -2
- package/dist/modules/data_sync/api/schedules/route.js +13 -4
- package/dist/modules/data_sync/api/schedules/route.js.map +2 -2
- package/dist/modules/data_sync/api/validate.js +9 -4
- package/dist/modules/data_sync/api/validate.js.map +2 -2
- package/dist/modules/design_system/acl.js +9 -0
- package/dist/modules/design_system/acl.js.map +7 -0
- package/dist/modules/design_system/backend/design-system/page.js +11 -0
- package/dist/modules/design_system/backend/design-system/page.js.map +7 -0
- package/dist/modules/design_system/backend/design-system/page.meta.js +15 -0
- package/dist/modules/design_system/backend/design-system/page.meta.js.map +7 -0
- package/dist/modules/design_system/gallery/components/CodeSnippet.js +52 -0
- package/dist/modules/design_system/gallery/components/CodeSnippet.js.map +7 -0
- package/dist/modules/design_system/gallery/components/EntryCard.js +63 -0
- package/dist/modules/design_system/gallery/components/EntryCard.js.map +7 -0
- package/dist/modules/design_system/gallery/components/GalleryShell.js +163 -0
- package/dist/modules/design_system/gallery/components/GalleryShell.js.map +7 -0
- package/dist/modules/design_system/gallery/components/VariantPreview.js +9 -0
- package/dist/modules/design_system/gallery/components/VariantPreview.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/banners.js +186 -0
- package/dist/modules/design_system/gallery/entries/banners.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/buttons.js +361 -0
- package/dist/modules/design_system/gallery/entries/buttons.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/charts.js +457 -0
- package/dist/modules/design_system/gallery/entries/charts.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/dates.js +306 -0
- package/dist/modules/design_system/gallery/entries/dates.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/detail.js +358 -0
- package/dist/modules/design_system/gallery/entries/detail.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/display.js +785 -0
- package/dist/modules/design_system/gallery/entries/display.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/feedback.js +658 -0
- package/dist/modules/design_system/gallery/entries/feedback.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/filters.js +505 -0
- package/dist/modules/design_system/gallery/entries/filters.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/foundations.js +453 -0
- package/dist/modules/design_system/gallery/entries/foundations.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/icons.js +140 -0
- package/dist/modules/design_system/gallery/entries/icons.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/inputs.js +1217 -0
- package/dist/modules/design_system/gallery/entries/inputs.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/messages.js +334 -0
- package/dist/modules/design_system/gallery/entries/messages.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/navigation.js +475 -0
- package/dist/modules/design_system/gallery/entries/navigation.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/notifications.js +257 -0
- package/dist/modules/design_system/gallery/entries/notifications.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/overlays.js +576 -0
- package/dist/modules/design_system/gallery/entries/overlays.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/scaffolding.js +378 -0
- package/dist/modules/design_system/gallery/entries/scaffolding.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/schedule.js +297 -0
- package/dist/modules/design_system/gallery/entries/schedule.js.map +7 -0
- package/dist/modules/design_system/gallery/registry.js +139 -0
- package/dist/modules/design_system/gallery/registry.js.map +7 -0
- package/dist/modules/design_system/gallery/types.js +1 -0
- package/dist/modules/design_system/gallery/types.js.map +7 -0
- package/dist/modules/design_system/index.js +9 -0
- package/dist/modules/design_system/index.js.map +7 -0
- package/dist/modules/design_system/setup.js +14 -0
- package/dist/modules/design_system/setup.js.map +7 -0
- package/dist/modules/entities/api/entity-settings.js +59 -9
- package/dist/modules/entities/api/entity-settings.js.map +2 -2
- package/dist/modules/entities/backend/config/settings/page.js +10 -0
- package/dist/modules/entities/backend/config/settings/page.js.map +7 -0
- package/dist/modules/entities/backend/config/settings/page.meta.js +36 -0
- package/dist/modules/entities/backend/config/settings/page.meta.js.map +7 -0
- package/dist/modules/entities/backend/entities/user/create/page.js +16 -7
- package/dist/modules/entities/backend/entities/user/create/page.js.map +2 -2
- package/dist/modules/entities/components/EntitySettingsManager.js +136 -0
- package/dist/modules/entities/components/EntitySettingsManager.js.map +7 -0
- package/dist/modules/inbox_ops/api/webhook/inbound.js +14 -10
- package/dist/modules/inbox_ops/api/webhook/inbound.js.map +2 -2
- package/dist/modules/inbox_ops/search.js +15 -4
- package/dist/modules/inbox_ops/search.js.map +2 -2
- package/dist/modules/integrations/api/[id]/credentials/route.js +11 -5
- package/dist/modules/integrations/api/[id]/credentials/route.js.map +2 -2
- package/dist/modules/integrations/api/[id]/health/route.js +6 -3
- package/dist/modules/integrations/api/[id]/health/route.js.map +2 -2
- package/dist/modules/integrations/api/[id]/route.js +6 -3
- package/dist/modules/integrations/api/[id]/route.js.map +2 -2
- package/dist/modules/integrations/api/[id]/state/route.js +6 -3
- package/dist/modules/integrations/api/[id]/state/route.js.map +2 -2
- package/dist/modules/integrations/api/[id]/version/route.js +6 -3
- package/dist/modules/integrations/api/[id]/version/route.js.map +2 -2
- package/dist/modules/integrations/api/logs/route.js +6 -3
- package/dist/modules/integrations/api/logs/route.js.map +2 -2
- package/dist/modules/integrations/api/route.js +6 -3
- package/dist/modules/integrations/api/route.js.map +2 -2
- package/dist/modules/integrations/api/umes-read.js +2 -2
- package/dist/modules/integrations/api/umes-read.js.map +2 -2
- package/dist/modules/integrations/lib/organization-scope.js +2 -9
- package/dist/modules/integrations/lib/organization-scope.js.map +2 -2
- package/dist/modules/messages/search.js +10 -5
- package/dist/modules/messages/search.js.map +2 -2
- package/dist/modules/payment_gateways/api/webhook/[provider]/route.js +11 -1
- package/dist/modules/payment_gateways/api/webhook/[provider]/route.js.map +2 -2
- package/dist/modules/payment_gateways/data/entities.js +4 -0
- package/dist/modules/payment_gateways/data/entities.js.map +2 -2
- package/dist/modules/payment_gateways/lib/gateway-service.js +12 -2
- package/dist/modules/payment_gateways/lib/gateway-service.js.map +2 -2
- package/dist/modules/payment_gateways/lib/session-idempotency.js +33 -0
- package/dist/modules/payment_gateways/lib/session-idempotency.js.map +2 -2
- package/dist/modules/payment_gateways/migrations/Migration20260803103035_payment_gateways.js +18 -0
- package/dist/modules/payment_gateways/migrations/Migration20260803103035_payment_gateways.js.map +7 -0
- package/dist/modules/payment_gateways/setup.js +47 -0
- package/dist/modules/payment_gateways/setup.js.map +2 -2
- package/dist/modules/payment_gateways/workers/session-initialization-prune.js +50 -0
- package/dist/modules/payment_gateways/workers/session-initialization-prune.js.map +7 -0
- package/dist/modules/portal/frontend/[orgSlug]/portal/invite/page.js +134 -0
- package/dist/modules/portal/frontend/[orgSlug]/portal/invite/page.js.map +7 -0
- package/dist/modules/portal/frontend/[orgSlug]/portal/invite/page.meta.js +11 -0
- package/dist/modules/portal/frontend/[orgSlug]/portal/invite/page.meta.js.map +7 -0
- package/dist/modules/portal/lib/navigation.js +7 -0
- package/dist/modules/portal/lib/navigation.js.map +7 -0
- package/dist/modules/query_index/data/entities.js +2 -1
- package/dist/modules/query_index/data/entities.js.map +2 -2
- package/dist/modules/query_index/lib/engine.js +75 -50
- package/dist/modules/query_index/lib/engine.js.map +2 -2
- package/dist/modules/query_index/lib/search-tokens.js +15 -5
- package/dist/modules/query_index/lib/search-tokens.js.map +2 -2
- package/dist/modules/query_index/migrations/Migration20260731105052_query_index.js +17 -0
- package/dist/modules/query_index/migrations/Migration20260731105052_query_index.js.map +7 -0
- package/dist/modules/shipping_carriers/api/webhook/[provider]/route.js +11 -1
- package/dist/modules/shipping_carriers/api/webhook/[provider]/route.js.map +2 -2
- package/generated/entities/customer_deal_person_link/index.ts +1 -0
- package/generated/entities/customer_user_invitation/index.ts +1 -0
- package/generated/entities.ids.generated.ts +1 -0
- package/generated/entity-fields-registry.ts +2 -0
- package/package.json +16 -16
- package/src/modules/business_rules/api/openmercato-call-options/route.ts +94 -0
- package/src/modules/business_rules/api/rules/route.ts +92 -4
- package/src/modules/business_rules/components/ActionBuilder.tsx +54 -5
- package/src/modules/business_rules/components/ActionRow.tsx +156 -18
- package/src/modules/business_rules/components/utils/actionValidation.ts +6 -0
- package/src/modules/business_rules/i18n/de.json +12 -0
- package/src/modules/business_rules/i18n/en.json +12 -0
- package/src/modules/business_rules/i18n/es.json +12 -0
- package/src/modules/business_rules/i18n/pl.json +12 -0
- package/src/modules/business_rules/lib/action-executor.ts +198 -0
- package/src/modules/business_rules/lib/openmercato-call-options-types.ts +31 -0
- package/src/modules/business_rules/lib/openmercato-call-options.ts +297 -0
- package/src/modules/business_rules/lib/rule-engine.ts +4 -0
- package/src/modules/communication_channels/api/post/webhook/[provider]/route.ts +11 -1
- package/src/modules/communication_channels/api/post/webhooks/gmail/route.ts +17 -11
- package/src/modules/configs/lib/upgrade-actions.ts +14 -0
- package/src/modules/customer_accounts/api/admin/users/[id].ts +16 -1
- package/src/modules/customer_accounts/api/admin/users-invite.ts +78 -3
- package/src/modules/customer_accounts/api/portal/users-invite.ts +22 -1
- package/src/modules/customer_accounts/data/entities.ts +3 -0
- package/src/modules/customer_accounts/data/validators.ts +1 -0
- package/src/modules/customer_accounts/emails/CustomerInvitationEmail.tsx +45 -0
- package/src/modules/customer_accounts/i18n/de.json +6 -0
- package/src/modules/customer_accounts/i18n/en.json +6 -0
- package/src/modules/customer_accounts/i18n/es.json +6 -0
- package/src/modules/customer_accounts/i18n/pl.json +6 -0
- package/src/modules/customer_accounts/lib/customerEntityOwnership.ts +68 -2
- package/src/modules/customer_accounts/lib/customerUrl.ts +27 -11
- package/src/modules/customer_accounts/lib/invitationEmail.ts +42 -0
- package/src/modules/customer_accounts/migrations/.snapshot-open-mercato.json +16 -0
- package/src/modules/customer_accounts/migrations/Migration20260723120000_customer_accounts.ts +13 -0
- package/src/modules/customer_accounts/services/customerInvitationService.ts +56 -3
- package/src/modules/customer_accounts/subscribers/autoLinkCrm.ts +75 -8
- package/src/modules/customer_accounts/widgets/injection/account-status/widget.client.tsx +2 -2
- package/src/modules/customer_accounts/widgets/injection-table.ts +4 -1
- package/src/modules/customers/api/deals/[id]/people/route.ts +3 -0
- package/src/modules/customers/api/deals/[id]/route.ts +10 -2
- package/src/modules/customers/backend/customers/companies-v2/[id]/page.tsx +12 -1
- package/src/modules/customers/backend/customers/deals/[id]/hooks/types.ts +1 -0
- package/src/modules/customers/backend/customers/deals/[id]/page.tsx +15 -9
- package/src/modules/customers/backend/customers/people-v2/[id]/page.tsx +24 -6
- package/src/modules/customers/cli.ts +17 -7
- package/src/modules/customers/commands/deals.ts +50 -9
- package/src/modules/customers/commands/people.ts +3 -0
- package/src/modules/customers/components/detail/CompanyDetailTabs.tsx +30 -7
- package/src/modules/customers/components/detail/DealDetailTabs.tsx +34 -9
- package/src/modules/customers/components/detail/PersonDetailTabs.tsx +34 -9
- package/src/modules/customers/data/entities.ts +9 -1
- package/src/modules/customers/data/validators.ts +1 -0
- package/src/modules/customers/i18n/de.json +18 -0
- package/src/modules/customers/i18n/en.json +18 -0
- package/src/modules/customers/i18n/es.json +18 -0
- package/src/modules/customers/i18n/pl.json +18 -0
- package/src/modules/customers/migrations/.snapshot-open-mercato.json +27 -1
- package/src/modules/customers/migrations/Migration20260723210000_customers.ts +15 -0
- package/src/modules/customers/search.ts +59 -27
- package/src/modules/data_sync/AGENTS.md +1 -0
- package/src/modules/data_sync/api/mappings/[id]/route.ts +22 -9
- package/src/modules/data_sync/api/mappings/route.ts +13 -4
- package/src/modules/data_sync/api/options.ts +7 -2
- package/src/modules/data_sync/api/run.ts +7 -2
- package/src/modules/data_sync/api/runs/[id]/cancel.ts +8 -3
- package/src/modules/data_sync/api/runs/[id]/retry.ts +7 -2
- package/src/modules/data_sync/api/runs/[id]/route.ts +8 -3
- package/src/modules/data_sync/api/runs.ts +7 -2
- package/src/modules/data_sync/api/schedules/[id]/route.ts +19 -6
- package/src/modules/data_sync/api/schedules/route.ts +13 -4
- package/src/modules/data_sync/api/validate.ts +9 -4
- package/src/modules/design_system/AGENTS.md +34 -0
- package/src/modules/design_system/acl.ts +5 -0
- package/src/modules/design_system/backend/design-system/page.meta.ts +11 -0
- package/src/modules/design_system/backend/design-system/page.tsx +14 -0
- package/src/modules/design_system/gallery/components/CodeSnippet.tsx +55 -0
- package/src/modules/design_system/gallery/components/EntryCard.tsx +95 -0
- package/src/modules/design_system/gallery/components/GalleryShell.tsx +206 -0
- package/src/modules/design_system/gallery/components/VariantPreview.tsx +15 -0
- package/src/modules/design_system/gallery/entries/banners.tsx +226 -0
- package/src/modules/design_system/gallery/entries/buttons.tsx +422 -0
- package/src/modules/design_system/gallery/entries/charts.tsx +518 -0
- package/src/modules/design_system/gallery/entries/dates.tsx +325 -0
- package/src/modules/design_system/gallery/entries/detail.tsx +403 -0
- package/src/modules/design_system/gallery/entries/display.tsx +893 -0
- package/src/modules/design_system/gallery/entries/feedback.tsx +746 -0
- package/src/modules/design_system/gallery/entries/filters.tsx +570 -0
- package/src/modules/design_system/gallery/entries/foundations.tsx +529 -0
- package/src/modules/design_system/gallery/entries/icons.tsx +168 -0
- package/src/modules/design_system/gallery/entries/inputs.tsx +1516 -0
- package/src/modules/design_system/gallery/entries/messages.tsx +339 -0
- package/src/modules/design_system/gallery/entries/navigation.tsx +573 -0
- package/src/modules/design_system/gallery/entries/notifications.tsx +285 -0
- package/src/modules/design_system/gallery/entries/overlays.tsx +677 -0
- package/src/modules/design_system/gallery/entries/scaffolding.tsx +430 -0
- package/src/modules/design_system/gallery/entries/schedule.tsx +307 -0
- package/src/modules/design_system/gallery/registry.ts +152 -0
- package/src/modules/design_system/gallery/types.ts +32 -0
- package/src/modules/design_system/i18n/.hardcoded-allowlist.json +71 -0
- package/src/modules/design_system/i18n/de.json +46 -0
- package/src/modules/design_system/i18n/en.json +46 -0
- package/src/modules/design_system/i18n/es.json +46 -0
- package/src/modules/design_system/i18n/pl.json +46 -0
- package/src/modules/design_system/index.ts +7 -0
- package/src/modules/design_system/setup.ts +12 -0
- package/src/modules/entities/api/entity-settings.ts +66 -22
- package/src/modules/entities/backend/config/settings/page.meta.ts +34 -0
- package/src/modules/entities/backend/config/settings/page.tsx +12 -0
- package/src/modules/entities/backend/entities/user/create/page.tsx +16 -7
- package/src/modules/entities/components/EntitySettingsManager.tsx +160 -0
- package/src/modules/entities/i18n/de.json +9 -0
- package/src/modules/entities/i18n/en.json +9 -0
- package/src/modules/entities/i18n/es.json +9 -0
- package/src/modules/entities/i18n/pl.json +9 -0
- package/src/modules/inbox_ops/api/webhook/inbound.ts +14 -12
- package/src/modules/inbox_ops/i18n/de.json +3 -0
- package/src/modules/inbox_ops/i18n/en.json +3 -0
- package/src/modules/inbox_ops/i18n/es.json +3 -0
- package/src/modules/inbox_ops/i18n/pl.json +3 -0
- package/src/modules/inbox_ops/search.ts +20 -4
- package/src/modules/integrations/api/[id]/credentials/route.ts +11 -5
- package/src/modules/integrations/api/[id]/health/route.ts +6 -3
- package/src/modules/integrations/api/[id]/route.ts +6 -3
- package/src/modules/integrations/api/[id]/state/route.ts +6 -3
- package/src/modules/integrations/api/[id]/version/route.ts +6 -3
- package/src/modules/integrations/api/logs/route.ts +6 -3
- package/src/modules/integrations/api/route.ts +6 -3
- package/src/modules/integrations/api/umes-read.ts +2 -2
- package/src/modules/integrations/lib/organization-scope.ts +5 -25
- package/src/modules/messages/i18n/de.json +2 -0
- package/src/modules/messages/i18n/en.json +2 -0
- package/src/modules/messages/i18n/es.json +2 -0
- package/src/modules/messages/i18n/pl.json +2 -0
- package/src/modules/messages/search.ts +11 -5
- package/src/modules/payment_gateways/api/webhook/[provider]/route.ts +13 -1
- package/src/modules/payment_gateways/data/entities.ts +5 -0
- package/src/modules/payment_gateways/i18n/de.json +5 -1
- package/src/modules/payment_gateways/i18n/en.json +5 -1
- package/src/modules/payment_gateways/i18n/es.json +5 -1
- package/src/modules/payment_gateways/i18n/pl.json +5 -1
- package/src/modules/payment_gateways/lib/gateway-service.ts +12 -2
- package/src/modules/payment_gateways/lib/session-idempotency.ts +36 -0
- package/src/modules/payment_gateways/migrations/.snapshot-open-mercato.json +10 -1
- package/src/modules/payment_gateways/migrations/Migration20260803103035_payment_gateways.ts +17 -0
- package/src/modules/payment_gateways/setup.ts +62 -0
- package/src/modules/payment_gateways/workers/session-initialization-prune.ts +63 -0
- package/src/modules/portal/frontend/[orgSlug]/portal/invite/page.meta.ts +9 -0
- package/src/modules/portal/frontend/[orgSlug]/portal/invite/page.tsx +164 -0
- package/src/modules/portal/i18n/de.json +18 -0
- package/src/modules/portal/i18n/en.json +18 -0
- package/src/modules/portal/i18n/es.json +18 -0
- package/src/modules/portal/i18n/pl.json +18 -0
- package/src/modules/portal/lib/navigation.ts +3 -0
- package/src/modules/query_index/data/entities.ts +7 -0
- package/src/modules/query_index/lib/engine.ts +92 -63
- package/src/modules/query_index/lib/search-tokens.ts +16 -4
- package/src/modules/query_index/migrations/.snapshot-open-mercato.json +12 -0
- package/src/modules/query_index/migrations/Migration20260731105052_query_index.ts +35 -0
- package/src/modules/shipping_carriers/api/webhook/[provider]/route.ts +11 -1
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Bell } from "lucide-react";
|
|
4
|
+
import { Button } from "@open-mercato/ui/primitives/button";
|
|
5
|
+
import { IconButton } from "@open-mercato/ui/primitives/icon-button";
|
|
6
|
+
import {
|
|
7
|
+
NotificationCountBadge,
|
|
8
|
+
NotificationItem,
|
|
9
|
+
NotificationPanel
|
|
10
|
+
} from "@open-mercato/ui/backend/notifications";
|
|
11
|
+
const galleryT = (key, fallbackOrParams, params) => {
|
|
12
|
+
const fallback = typeof fallbackOrParams === "string" ? fallbackOrParams : key;
|
|
13
|
+
const variables = (typeof fallbackOrParams === "object" ? fallbackOrParams : params) ?? {};
|
|
14
|
+
return Object.entries(variables).reduce(
|
|
15
|
+
(text, [name, value]) => text.replaceAll(`{${name}}`, String(value)),
|
|
16
|
+
fallback
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
const minutesAgo = (minutes) => new Date(Date.now() - minutes * 6e4).toISOString();
|
|
20
|
+
const noopMarkAsRead = async () => {
|
|
21
|
+
};
|
|
22
|
+
const noopDismiss = async () => {
|
|
23
|
+
};
|
|
24
|
+
const noopExecuteAction = async () => ({});
|
|
25
|
+
function mockNotification(overrides) {
|
|
26
|
+
return {
|
|
27
|
+
id: "gallery-notification",
|
|
28
|
+
type: "gallery.demo",
|
|
29
|
+
title: "Notification",
|
|
30
|
+
severity: "info",
|
|
31
|
+
status: "unread",
|
|
32
|
+
actions: [],
|
|
33
|
+
createdAt: minutesAgo(5),
|
|
34
|
+
...overrides
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const unreadInfoNotification = mockNotification({
|
|
38
|
+
id: "gallery-unread-info",
|
|
39
|
+
title: "Nightly import finished",
|
|
40
|
+
severity: "info",
|
|
41
|
+
status: "unread",
|
|
42
|
+
sourceModule: "catalog",
|
|
43
|
+
createdAt: minutesAgo(4)
|
|
44
|
+
});
|
|
45
|
+
const successWithBodyNotification = mockNotification({
|
|
46
|
+
id: "gallery-success-body",
|
|
47
|
+
title: "Order #10023 shipped",
|
|
48
|
+
body: "Carrier picked up 3 parcels. Tracking numbers were emailed to the customer.",
|
|
49
|
+
severity: "success",
|
|
50
|
+
status: "read",
|
|
51
|
+
sourceModule: "sales",
|
|
52
|
+
createdAt: minutesAgo(35)
|
|
53
|
+
});
|
|
54
|
+
const actionRequiredNotification = mockNotification({
|
|
55
|
+
id: "gallery-action-required",
|
|
56
|
+
title: "Price list awaiting approval",
|
|
57
|
+
body: "Wholesale EU price list changes 214 products.",
|
|
58
|
+
severity: "warning",
|
|
59
|
+
status: "unread",
|
|
60
|
+
sourceModule: "pricing",
|
|
61
|
+
actions: [
|
|
62
|
+
{ id: "review", label: "Review changes", variant: "outline" },
|
|
63
|
+
{ id: "approve", label: "Approve", variant: "default" }
|
|
64
|
+
],
|
|
65
|
+
createdAt: minutesAgo(90)
|
|
66
|
+
});
|
|
67
|
+
const panelNotifications = [
|
|
68
|
+
unreadInfoNotification,
|
|
69
|
+
actionRequiredNotification,
|
|
70
|
+
successWithBodyNotification
|
|
71
|
+
];
|
|
72
|
+
function DemoNotificationPanel() {
|
|
73
|
+
const [open, setOpen] = React.useState(false);
|
|
74
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
75
|
+
/* @__PURE__ */ jsx(Button, { variant: "outline", onClick: () => setOpen(true), children: "Open notification panel" }),
|
|
76
|
+
/* @__PURE__ */ jsx(
|
|
77
|
+
NotificationPanel,
|
|
78
|
+
{
|
|
79
|
+
open,
|
|
80
|
+
onOpenChange: setOpen,
|
|
81
|
+
notifications: panelNotifications,
|
|
82
|
+
unreadCount: 2,
|
|
83
|
+
onMarkAsRead: noopMarkAsRead,
|
|
84
|
+
onExecuteAction: noopExecuteAction,
|
|
85
|
+
onDismiss: noopDismiss,
|
|
86
|
+
onMarkAllRead: noopMarkAsRead,
|
|
87
|
+
t: galleryT
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
] });
|
|
91
|
+
}
|
|
92
|
+
const notificationBellEntry = {
|
|
93
|
+
id: "notification-bell",
|
|
94
|
+
title: "NotificationBell",
|
|
95
|
+
importPath: "@open-mercato/ui/backend/notifications",
|
|
96
|
+
variants: [
|
|
97
|
+
{
|
|
98
|
+
id: "presentational-mock",
|
|
99
|
+
title: "Presentational mock (live bell is SSE-wired)",
|
|
100
|
+
render: () => /* @__PURE__ */ jsxs(IconButton, { variant: "ghost", size: "sm", className: "relative", "aria-label": "3 unread notifications", children: [
|
|
101
|
+
/* @__PURE__ */ jsx(Bell, { className: "h-5 w-5" }),
|
|
102
|
+
/* @__PURE__ */ jsx(NotificationCountBadge, { count: 3 })
|
|
103
|
+
] }),
|
|
104
|
+
code: `import { NotificationBell } from '@open-mercato/ui/backend/notifications'
|
|
105
|
+
|
|
106
|
+
// Wired to the notifications API + SSE \u2014 AppShell renders one in the topbar.
|
|
107
|
+
<NotificationBell t={t} />`
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
};
|
|
111
|
+
const notificationCountBadgeEntry = {
|
|
112
|
+
id: "notification-count-badge",
|
|
113
|
+
title: "NotificationCountBadge",
|
|
114
|
+
importPath: "@open-mercato/ui/backend/notifications",
|
|
115
|
+
variants: [
|
|
116
|
+
{
|
|
117
|
+
id: "counts",
|
|
118
|
+
title: "Counts (caps at 99+)",
|
|
119
|
+
render: () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
120
|
+
/* @__PURE__ */ jsxs(IconButton, { variant: "ghost", size: "sm", className: "relative", "aria-label": "3 unread notifications", children: [
|
|
121
|
+
/* @__PURE__ */ jsx(Bell, { className: "h-5 w-5" }),
|
|
122
|
+
/* @__PURE__ */ jsx(NotificationCountBadge, { count: 3 })
|
|
123
|
+
] }),
|
|
124
|
+
/* @__PURE__ */ jsxs(IconButton, { variant: "ghost", size: "sm", className: "relative", "aria-label": "12 unread notifications", children: [
|
|
125
|
+
/* @__PURE__ */ jsx(Bell, { className: "h-5 w-5" }),
|
|
126
|
+
/* @__PURE__ */ jsx(NotificationCountBadge, { count: 12 })
|
|
127
|
+
] }),
|
|
128
|
+
/* @__PURE__ */ jsxs(IconButton, { variant: "ghost", size: "sm", className: "relative", "aria-label": "120 unread notifications", children: [
|
|
129
|
+
/* @__PURE__ */ jsx(Bell, { className: "h-5 w-5" }),
|
|
130
|
+
/* @__PURE__ */ jsx(NotificationCountBadge, { count: 120 })
|
|
131
|
+
] })
|
|
132
|
+
] }),
|
|
133
|
+
code: `import { NotificationCountBadge } from '@open-mercato/ui/backend/notifications'
|
|
134
|
+
|
|
135
|
+
// Renders nothing for count <= 0; anchors to the nearest relative parent.
|
|
136
|
+
<IconButton variant="ghost" size="sm" className="relative" aria-label="3 unread notifications">
|
|
137
|
+
<Bell className="h-5 w-5" />
|
|
138
|
+
<NotificationCountBadge count={3} />
|
|
139
|
+
</IconButton>`
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
};
|
|
143
|
+
const notificationItemEntry = {
|
|
144
|
+
id: "notification-item",
|
|
145
|
+
title: "NotificationItem",
|
|
146
|
+
importPath: "@open-mercato/ui/backend/notifications",
|
|
147
|
+
variants: [
|
|
148
|
+
{
|
|
149
|
+
id: "unread-info",
|
|
150
|
+
title: "Unread (mocked data)",
|
|
151
|
+
render: () => /* @__PURE__ */ jsx("div", { className: "w-full max-w-md", children: /* @__PURE__ */ jsx(
|
|
152
|
+
NotificationItem,
|
|
153
|
+
{
|
|
154
|
+
notification: unreadInfoNotification,
|
|
155
|
+
onMarkAsRead: noopMarkAsRead,
|
|
156
|
+
onExecuteAction: noopExecuteAction,
|
|
157
|
+
onDismiss: noopDismiss,
|
|
158
|
+
t: galleryT
|
|
159
|
+
}
|
|
160
|
+
) }),
|
|
161
|
+
code: `import { NotificationItem } from '@open-mercato/ui/backend/notifications'
|
|
162
|
+
|
|
163
|
+
<NotificationItem
|
|
164
|
+
notification={notification} // NotificationDto with status: 'unread'
|
|
165
|
+
onMarkAsRead={() => markAsRead(notification.id)}
|
|
166
|
+
onExecuteAction={(actionId) => executeAction(notification.id, actionId)}
|
|
167
|
+
onDismiss={() => dismiss(notification.id)}
|
|
168
|
+
t={t}
|
|
169
|
+
/>`
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
id: "with-body",
|
|
173
|
+
title: "Read with body bubble (mocked data)",
|
|
174
|
+
render: () => /* @__PURE__ */ jsx("div", { className: "w-full max-w-md", children: /* @__PURE__ */ jsx(
|
|
175
|
+
NotificationItem,
|
|
176
|
+
{
|
|
177
|
+
notification: successWithBodyNotification,
|
|
178
|
+
onMarkAsRead: noopMarkAsRead,
|
|
179
|
+
onExecuteAction: noopExecuteAction,
|
|
180
|
+
onDismiss: noopDismiss,
|
|
181
|
+
t: galleryT
|
|
182
|
+
}
|
|
183
|
+
) }),
|
|
184
|
+
code: `import { NotificationItem } from '@open-mercato/ui/backend/notifications'
|
|
185
|
+
|
|
186
|
+
// A notification with a body renders it as a speech-bubble under the title.
|
|
187
|
+
<NotificationItem
|
|
188
|
+
notification={notification} // NotificationDto with body text
|
|
189
|
+
onMarkAsRead={() => markAsRead(notification.id)}
|
|
190
|
+
onExecuteAction={(actionId) => executeAction(notification.id, actionId)}
|
|
191
|
+
onDismiss={() => dismiss(notification.id)}
|
|
192
|
+
t={t}
|
|
193
|
+
/>`
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
id: "with-actions",
|
|
197
|
+
title: "Action required (mocked data)",
|
|
198
|
+
render: () => /* @__PURE__ */ jsx("div", { className: "w-full max-w-md", children: /* @__PURE__ */ jsx(
|
|
199
|
+
NotificationItem,
|
|
200
|
+
{
|
|
201
|
+
notification: actionRequiredNotification,
|
|
202
|
+
onMarkAsRead: noopMarkAsRead,
|
|
203
|
+
onExecuteAction: noopExecuteAction,
|
|
204
|
+
onDismiss: noopDismiss,
|
|
205
|
+
t: galleryT
|
|
206
|
+
}
|
|
207
|
+
) }),
|
|
208
|
+
code: `import { NotificationItem } from '@open-mercato/ui/backend/notifications'
|
|
209
|
+
|
|
210
|
+
// Actions come from notification.actions; the last one renders as primary.
|
|
211
|
+
<NotificationItem
|
|
212
|
+
notification={notification} // NotificationDto with actions[]
|
|
213
|
+
onMarkAsRead={() => markAsRead(notification.id)}
|
|
214
|
+
onExecuteAction={(actionId) => executeAction(notification.id, actionId)}
|
|
215
|
+
onDismiss={() => dismiss(notification.id)}
|
|
216
|
+
t={t}
|
|
217
|
+
/>`
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
};
|
|
221
|
+
const notificationPanelEntry = {
|
|
222
|
+
id: "notification-panel",
|
|
223
|
+
title: "NotificationPanel",
|
|
224
|
+
importPath: "@open-mercato/ui/backend/notifications",
|
|
225
|
+
variants: [
|
|
226
|
+
{
|
|
227
|
+
id: "mocked-inbox",
|
|
228
|
+
title: "Mocked inbox (opens in a sheet)",
|
|
229
|
+
render: () => /* @__PURE__ */ jsx(DemoNotificationPanel, {}),
|
|
230
|
+
code: `import { NotificationPanel } from '@open-mercato/ui/backend/notifications'
|
|
231
|
+
|
|
232
|
+
const [open, setOpen] = React.useState(false)
|
|
233
|
+
|
|
234
|
+
<NotificationPanel
|
|
235
|
+
open={open}
|
|
236
|
+
onOpenChange={setOpen}
|
|
237
|
+
notifications={notifications} // NotificationDto[]
|
|
238
|
+
unreadCount={unreadCount}
|
|
239
|
+
onMarkAsRead={markAsRead}
|
|
240
|
+
onExecuteAction={executeAction}
|
|
241
|
+
onDismiss={dismiss}
|
|
242
|
+
onMarkAllRead={markAllRead}
|
|
243
|
+
t={t}
|
|
244
|
+
/>`
|
|
245
|
+
}
|
|
246
|
+
]
|
|
247
|
+
};
|
|
248
|
+
const entries = [
|
|
249
|
+
notificationBellEntry,
|
|
250
|
+
notificationCountBadgeEntry,
|
|
251
|
+
notificationItemEntry,
|
|
252
|
+
notificationPanelEntry
|
|
253
|
+
];
|
|
254
|
+
export {
|
|
255
|
+
entries
|
|
256
|
+
};
|
|
257
|
+
//# sourceMappingURL=notifications.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/modules/design_system/gallery/entries/notifications.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react'\nimport { Bell } from 'lucide-react'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport { IconButton } from '@open-mercato/ui/primitives/icon-button'\nimport {\n NotificationCountBadge,\n NotificationItem,\n NotificationPanel,\n} from '@open-mercato/ui/backend/notifications'\nimport type { NotificationDto } from '@open-mercato/shared/modules/notifications/types'\nimport type { TranslateFn } from '@open-mercato/shared/lib/i18n/context'\nimport type { GalleryEntry } from '../types'\n\n// Component titles and variant names are proper nouns from the codebase and\n// are deliberately not translated. `code` MUST contain the entry's importPath\n// (enforced by the registry-integrity test) and is always reviewed alongside\n// its sibling `render`.\n\n// All previews below run on inline mocked data \u2014 no API calls, no SSE.\n// `NotificationBell` itself is wired to `useNotifications` (SSE + API) and\n// cannot be severed from it, so its entry shows the presentational chrome\n// (bell trigger + `NotificationCountBadge`) instead of mounting the live bell.\n\nconst galleryT: TranslateFn = (key, fallbackOrParams, params) => {\n const fallback = typeof fallbackOrParams === 'string' ? fallbackOrParams : key\n const variables = (typeof fallbackOrParams === 'object' ? fallbackOrParams : params) ?? {}\n return Object.entries(variables).reduce(\n (text, [name, value]) => text.replaceAll(`{${name}}`, String(value)),\n fallback,\n )\n}\n\nconst minutesAgo = (minutes: number) => new Date(Date.now() - minutes * 60_000).toISOString()\n\nconst noopMarkAsRead = async () => {}\nconst noopDismiss = async () => {}\nconst noopExecuteAction = async () => ({})\n\nfunction mockNotification(overrides: Partial<NotificationDto>): NotificationDto {\n return {\n id: 'gallery-notification',\n type: 'gallery.demo',\n title: 'Notification',\n severity: 'info',\n status: 'unread',\n actions: [],\n createdAt: minutesAgo(5),\n ...overrides,\n }\n}\n\nconst unreadInfoNotification = mockNotification({\n id: 'gallery-unread-info',\n title: 'Nightly import finished',\n severity: 'info',\n status: 'unread',\n sourceModule: 'catalog',\n createdAt: minutesAgo(4),\n})\n\nconst successWithBodyNotification = mockNotification({\n id: 'gallery-success-body',\n title: 'Order #10023 shipped',\n body: 'Carrier picked up 3 parcels. Tracking numbers were emailed to the customer.',\n severity: 'success',\n status: 'read',\n sourceModule: 'sales',\n createdAt: minutesAgo(35),\n})\n\nconst actionRequiredNotification = mockNotification({\n id: 'gallery-action-required',\n title: 'Price list awaiting approval',\n body: 'Wholesale EU price list changes 214 products.',\n severity: 'warning',\n status: 'unread',\n sourceModule: 'pricing',\n actions: [\n { id: 'review', label: 'Review changes', variant: 'outline' },\n { id: 'approve', label: 'Approve', variant: 'default' },\n ],\n createdAt: minutesAgo(90),\n})\n\nconst panelNotifications: NotificationDto[] = [\n unreadInfoNotification,\n actionRequiredNotification,\n successWithBodyNotification,\n]\n\nfunction DemoNotificationPanel() {\n const [open, setOpen] = React.useState(false)\n return (\n <>\n <Button variant=\"outline\" onClick={() => setOpen(true)}>\n Open notification panel\n </Button>\n <NotificationPanel\n open={open}\n onOpenChange={setOpen}\n notifications={panelNotifications}\n unreadCount={2}\n onMarkAsRead={noopMarkAsRead}\n onExecuteAction={noopExecuteAction}\n onDismiss={noopDismiss}\n onMarkAllRead={noopMarkAsRead}\n t={galleryT}\n />\n </>\n )\n}\n\nconst notificationBellEntry: GalleryEntry = {\n id: 'notification-bell',\n title: 'NotificationBell',\n importPath: '@open-mercato/ui/backend/notifications',\n variants: [\n {\n id: 'presentational-mock',\n title: 'Presentational mock (live bell is SSE-wired)',\n render: () => (\n <IconButton variant=\"ghost\" size=\"sm\" className=\"relative\" aria-label=\"3 unread notifications\">\n <Bell className=\"h-5 w-5\" />\n <NotificationCountBadge count={3} />\n </IconButton>\n ),\n code: `import { NotificationBell } from '@open-mercato/ui/backend/notifications'\n\n// Wired to the notifications API + SSE \u2014 AppShell renders one in the topbar.\n<NotificationBell t={t} />`,\n },\n ],\n}\n\nconst notificationCountBadgeEntry: GalleryEntry = {\n id: 'notification-count-badge',\n title: 'NotificationCountBadge',\n importPath: '@open-mercato/ui/backend/notifications',\n variants: [\n {\n id: 'counts',\n title: 'Counts (caps at 99+)',\n render: () => (\n <>\n <IconButton variant=\"ghost\" size=\"sm\" className=\"relative\" aria-label=\"3 unread notifications\">\n <Bell className=\"h-5 w-5\" />\n <NotificationCountBadge count={3} />\n </IconButton>\n <IconButton variant=\"ghost\" size=\"sm\" className=\"relative\" aria-label=\"12 unread notifications\">\n <Bell className=\"h-5 w-5\" />\n <NotificationCountBadge count={12} />\n </IconButton>\n <IconButton variant=\"ghost\" size=\"sm\" className=\"relative\" aria-label=\"120 unread notifications\">\n <Bell className=\"h-5 w-5\" />\n <NotificationCountBadge count={120} />\n </IconButton>\n </>\n ),\n code: `import { NotificationCountBadge } from '@open-mercato/ui/backend/notifications'\n\n// Renders nothing for count <= 0; anchors to the nearest relative parent.\n<IconButton variant=\"ghost\" size=\"sm\" className=\"relative\" aria-label=\"3 unread notifications\">\n <Bell className=\"h-5 w-5\" />\n <NotificationCountBadge count={3} />\n</IconButton>`,\n },\n ],\n}\n\nconst notificationItemEntry: GalleryEntry = {\n id: 'notification-item',\n title: 'NotificationItem',\n importPath: '@open-mercato/ui/backend/notifications',\n variants: [\n {\n id: 'unread-info',\n title: 'Unread (mocked data)',\n render: () => (\n <div className=\"w-full max-w-md\">\n <NotificationItem\n notification={unreadInfoNotification}\n onMarkAsRead={noopMarkAsRead}\n onExecuteAction={noopExecuteAction}\n onDismiss={noopDismiss}\n t={galleryT}\n />\n </div>\n ),\n code: `import { NotificationItem } from '@open-mercato/ui/backend/notifications'\n\n<NotificationItem\n notification={notification} // NotificationDto with status: 'unread'\n onMarkAsRead={() => markAsRead(notification.id)}\n onExecuteAction={(actionId) => executeAction(notification.id, actionId)}\n onDismiss={() => dismiss(notification.id)}\n t={t}\n/>`,\n },\n {\n id: 'with-body',\n title: 'Read with body bubble (mocked data)',\n render: () => (\n <div className=\"w-full max-w-md\">\n <NotificationItem\n notification={successWithBodyNotification}\n onMarkAsRead={noopMarkAsRead}\n onExecuteAction={noopExecuteAction}\n onDismiss={noopDismiss}\n t={galleryT}\n />\n </div>\n ),\n code: `import { NotificationItem } from '@open-mercato/ui/backend/notifications'\n\n// A notification with a body renders it as a speech-bubble under the title.\n<NotificationItem\n notification={notification} // NotificationDto with body text\n onMarkAsRead={() => markAsRead(notification.id)}\n onExecuteAction={(actionId) => executeAction(notification.id, actionId)}\n onDismiss={() => dismiss(notification.id)}\n t={t}\n/>`,\n },\n {\n id: 'with-actions',\n title: 'Action required (mocked data)',\n render: () => (\n <div className=\"w-full max-w-md\">\n <NotificationItem\n notification={actionRequiredNotification}\n onMarkAsRead={noopMarkAsRead}\n onExecuteAction={noopExecuteAction}\n onDismiss={noopDismiss}\n t={galleryT}\n />\n </div>\n ),\n code: `import { NotificationItem } from '@open-mercato/ui/backend/notifications'\n\n// Actions come from notification.actions; the last one renders as primary.\n<NotificationItem\n notification={notification} // NotificationDto with actions[]\n onMarkAsRead={() => markAsRead(notification.id)}\n onExecuteAction={(actionId) => executeAction(notification.id, actionId)}\n onDismiss={() => dismiss(notification.id)}\n t={t}\n/>`,\n },\n ],\n}\n\nconst notificationPanelEntry: GalleryEntry = {\n id: 'notification-panel',\n title: 'NotificationPanel',\n importPath: '@open-mercato/ui/backend/notifications',\n variants: [\n {\n id: 'mocked-inbox',\n title: 'Mocked inbox (opens in a sheet)',\n render: () => <DemoNotificationPanel />,\n code: `import { NotificationPanel } from '@open-mercato/ui/backend/notifications'\n\nconst [open, setOpen] = React.useState(false)\n\n<NotificationPanel\n open={open}\n onOpenChange={setOpen}\n notifications={notifications} // NotificationDto[]\n unreadCount={unreadCount}\n onMarkAsRead={markAsRead}\n onExecuteAction={executeAction}\n onDismiss={dismiss}\n onMarkAllRead={markAllRead}\n t={t}\n/>`,\n },\n ],\n}\n\nexport const entries: GalleryEntry[] = [\n notificationBellEntry,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