@open-mercato/core 0.6.7-develop.6862.1.c11a64ce0a → 0.6.7
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 +2 -2
- package/AGENTS.md +3 -3
- package/agentic/standalone-guide.md +0 -13
- package/dist/bootstrap.js +1 -16
- package/dist/bootstrap.js.map +2 -2
- package/dist/generated/entities/customer_deal_person_link/index.js +0 -2
- package/dist/generated/entities/customer_deal_person_link/index.js.map +2 -2
- package/dist/generated/entities/customer_user_invitation/index.js +0 -2
- package/dist/generated/entities/customer_user_invitation/index.js.map +2 -2
- package/dist/generated/entities/gateway_payment_operation/index.js +0 -2
- package/dist/generated/entities/gateway_payment_operation/index.js.map +2 -2
- package/dist/generated/entities/gateway_transaction/index.js +0 -2
- package/dist/generated/entities/gateway_transaction/index.js.map +2 -2
- package/dist/generated/entities/organization/index.js +0 -2
- package/dist/generated/entities/organization/index.js.map +2 -2
- package/dist/generated/entities/resources_resource/index.js +0 -2
- package/dist/generated/entities/resources_resource/index.js.map +2 -2
- package/dist/generated/entities.ids.generated.js +1 -3
- package/dist/generated/entities.ids.generated.js.map +2 -2
- package/dist/generated/entity-fields-registry.js +0 -23
- package/dist/generated/entity-fields-registry.js.map +2 -2
- package/dist/helpers/integration/salesFixtures.js +2 -31
- package/dist/helpers/integration/salesFixtures.js.map +2 -2
- package/dist/helpers/integration/salesUi.js +0 -5
- package/dist/helpers/integration/salesUi.js.map +2 -2
- package/dist/modules/api_keys/backend/api-keys/page.js +1 -2
- package/dist/modules/api_keys/backend/api-keys/page.js.map +2 -2
- package/dist/modules/attachments/api/route.js +10 -120
- package/dist/modules/attachments/api/route.js.map +2 -2
- package/dist/modules/attachments/data/entities.js +1 -67
- package/dist/modules/attachments/data/entities.js.map +2 -2
- package/dist/modules/attachments/di.js +1 -7
- package/dist/modules/attachments/di.js.map +2 -2
- package/dist/modules/attachments/fields/attachment.js +1 -1
- package/dist/modules/attachments/fields/attachment.js.map +2 -2
- package/dist/modules/attachments/lib/drivers/index.js.map +1 -1
- package/dist/modules/attachments/lib/drivers/localDriver.js +6 -19
- package/dist/modules/attachments/lib/drivers/localDriver.js.map +2 -2
- package/dist/modules/attachments/lib/upload-limits.js +0 -33
- package/dist/modules/attachments/lib/upload-limits.js.map +2 -2
- package/dist/modules/audit_logs/api/audit-logs/access/route.js +1 -5
- package/dist/modules/audit_logs/api/audit-logs/access/route.js.map +2 -2
- package/dist/modules/audit_logs/api/audit-logs/actions/export/route.js +1 -5
- package/dist/modules/audit_logs/api/audit-logs/actions/export/route.js.map +2 -2
- package/dist/modules/audit_logs/api/audit-logs/actions/route.js +1 -5
- package/dist/modules/audit_logs/api/audit-logs/actions/route.js.map +2 -2
- package/dist/modules/audit_logs/components/AccessLogsTable.js +1 -2
- package/dist/modules/audit_logs/components/AccessLogsTable.js.map +2 -2
- package/dist/modules/audit_logs/components/AuditLogsActions.js +1 -2
- package/dist/modules/audit_logs/components/AuditLogsActions.js.map +2 -2
- package/dist/modules/auth/api/admin/nav.js +4 -17
- package/dist/modules/auth/api/admin/nav.js.map +2 -2
- package/dist/modules/auth/api/profile/route.js +2 -8
- package/dist/modules/auth/api/profile/route.js.map +2 -2
- package/dist/modules/auth/api/users/route.js +19 -8
- package/dist/modules/auth/api/users/route.js.map +2 -2
- package/dist/modules/auth/backend/auth/profile/page.js.map +2 -2
- package/dist/modules/auth/backend/profile/change-password/page.js.map +2 -2
- package/dist/modules/auth/backend/roles/page.js +1 -2
- package/dist/modules/auth/backend/roles/page.js.map +2 -2
- package/dist/modules/auth/backend/settings/page.js +9 -14
- package/dist/modules/auth/backend/settings/page.js.map +2 -2
- package/dist/modules/auth/backend/users/page.js +1 -2
- package/dist/modules/auth/backend/users/page.js.map +2 -2
- package/dist/modules/auth/cli.js +1 -1
- package/dist/modules/auth/cli.js.map +2 -2
- package/dist/modules/auth/components/UserConsentsPanel.js +9 -9
- package/dist/modules/auth/components/UserConsentsPanel.js.map +2 -2
- package/dist/modules/auth/frontend/login.js +5 -6
- package/dist/modules/auth/frontend/login.js.map +2 -2
- package/dist/modules/auth/frontend/reset.js +2 -2
- package/dist/modules/auth/frontend/reset.js.map +2 -2
- package/dist/modules/auth/lib/backendChrome.js +29 -45
- package/dist/modules/auth/lib/backendChrome.js.map +2 -2
- package/dist/modules/auth/lib/setup-app.js +2 -17
- package/dist/modules/auth/lib/setup-app.js.map +2 -2
- package/dist/modules/auth/lib/tenantAccess.js +0 -7
- package/dist/modules/auth/lib/tenantAccess.js.map +2 -2
- package/dist/modules/auth/services/rbacService.js +44 -29
- package/dist/modules/auth/services/rbacService.js.map +2 -2
- package/dist/modules/business_rules/api/rules/route.js +4 -71
- package/dist/modules/business_rules/api/rules/route.js.map +2 -2
- package/dist/modules/business_rules/backend/rules/page.js +1 -2
- package/dist/modules/business_rules/backend/rules/page.js.map +2 -2
- package/dist/modules/business_rules/components/ActionBuilder.js +4 -47
- package/dist/modules/business_rules/components/ActionBuilder.js.map +3 -3
- package/dist/modules/business_rules/components/ActionRow.js +16 -106
- package/dist/modules/business_rules/components/ActionRow.js.map +2 -2
- package/dist/modules/business_rules/components/ConditionRow.js +4 -8
- package/dist/modules/business_rules/components/ConditionRow.js.map +2 -2
- package/dist/modules/business_rules/components/utils/actionValidation.js +0 -6
- package/dist/modules/business_rules/components/utils/actionValidation.js.map +2 -2
- package/dist/modules/business_rules/lib/action-executor.js +0 -148
- package/dist/modules/business_rules/lib/action-executor.js.map +2 -2
- package/dist/modules/business_rules/lib/rule-engine.js +1 -5
- package/dist/modules/business_rules/lib/rule-engine.js.map +2 -2
- package/dist/modules/catalog/backend/catalog/products/[id]/page.js +5 -6
- package/dist/modules/catalog/backend/catalog/products/[id]/page.js.map +2 -2
- package/dist/modules/catalog/backend/catalog/products/create/page.js +6 -7
- package/dist/modules/catalog/backend/catalog/products/create/page.js.map +2 -2
- package/dist/modules/catalog/components/PriceKindSettings.js +3 -3
- package/dist/modules/catalog/components/PriceKindSettings.js.map +2 -2
- package/dist/modules/catalog/components/categories/CategoriesDataTable.js +1 -2
- package/dist/modules/catalog/components/categories/CategoriesDataTable.js.map +2 -2
- package/dist/modules/catalog/components/products/ProductCategorizeSection.js +3 -3
- package/dist/modules/catalog/components/products/ProductCategorizeSection.js.map +2 -2
- package/dist/modules/catalog/components/products/ProductMediaManager.js +1 -1
- package/dist/modules/catalog/components/products/ProductMediaManager.js.map +2 -2
- package/dist/modules/catalog/components/products/ProductsDataTable.js +2 -3
- package/dist/modules/catalog/components/products/ProductsDataTable.js.map +2 -2
- package/dist/modules/catalog/components/products/VariantBuilder.js +5 -5
- package/dist/modules/catalog/components/products/VariantBuilder.js.map +2 -2
- package/dist/modules/catalog/events.js +0 -1
- package/dist/modules/catalog/events.js.map +2 -2
- package/dist/modules/catalog/widgets/injection/product-seo/widget.js +1 -1
- package/dist/modules/catalog/widgets/injection/product-seo/widget.js.map +2 -2
- package/dist/modules/communication_channels/api/post/test-seed/route.js +2 -52
- package/dist/modules/communication_channels/api/post/test-seed/route.js.map +2 -2
- package/dist/modules/communication_channels/api/post/webhook/[provider]/route.js +1 -11
- 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 +6 -11
- package/dist/modules/communication_channels/api/post/webhooks/gmail/route.js.map +2 -2
- package/dist/modules/communication_channels/backend/communication_channels/channels/page.js +1 -2
- package/dist/modules/communication_channels/backend/communication_channels/channels/page.js.map +2 -2
- package/dist/modules/communication_channels/backend/profile/communication-channels/page.js +3 -4
- package/dist/modules/communication_channels/backend/profile/communication-channels/page.js.map +2 -2
- package/dist/modules/communication_channels/data/enrichers.js +4 -4
- package/dist/modules/communication_channels/data/enrichers.js.map +2 -2
- package/dist/modules/communication_channels/lib/access-control.js +2 -2
- package/dist/modules/communication_channels/lib/access-control.js.map +2 -2
- package/dist/modules/configs/backend/config/system-status/page.js +1 -2
- package/dist/modules/configs/backend/config/system-status/page.js.map +2 -2
- package/dist/modules/configs/lib/upgrade-actions.js +0 -12
- package/dist/modules/configs/lib/upgrade-actions.js.map +2 -2
- package/dist/modules/currencies/backend/currencies/page.js +1 -2
- package/dist/modules/currencies/backend/currencies/page.js.map +2 -2
- package/dist/modules/currencies/backend/exchange-rates/page.js +1 -2
- package/dist/modules/currencies/backend/exchange-rates/page.js.map +2 -2
- package/dist/modules/currencies/di.js +0 -4
- package/dist/modules/currencies/di.js.map +2 -2
- package/dist/modules/customer_accounts/api/admin/users/[id].js +1 -10
- package/dist/modules/customer_accounts/api/admin/users/[id].js.map +2 -2
- package/dist/modules/customer_accounts/api/admin/users-invite.js +4 -63
- package/dist/modules/customer_accounts/api/admin/users-invite.js.map +2 -2
- package/dist/modules/customer_accounts/api/invitations/accept.js +2 -1
- package/dist/modules/customer_accounts/api/invitations/accept.js.map +2 -2
- package/dist/modules/customer_accounts/api/login.js +2 -4
- package/dist/modules/customer_accounts/api/login.js.map +2 -2
- package/dist/modules/customer_accounts/api/magic-link/verify.js +2 -4
- package/dist/modules/customer_accounts/api/magic-link/verify.js.map +2 -2
- package/dist/modules/customer_accounts/api/portal/feature-check.js +4 -5
- package/dist/modules/customer_accounts/api/portal/feature-check.js.map +2 -2
- package/dist/modules/customer_accounts/api/portal/nav.js +4 -6
- package/dist/modules/customer_accounts/api/portal/nav.js.map +2 -2
- package/dist/modules/customer_accounts/api/portal/profile.js +1 -5
- package/dist/modules/customer_accounts/api/portal/profile.js.map +2 -2
- package/dist/modules/customer_accounts/api/portal/sessions-refresh.js +3 -3
- package/dist/modules/customer_accounts/api/portal/sessions-refresh.js.map +2 -2
- package/dist/modules/customer_accounts/api/portal/users-invite.js +2 -22
- package/dist/modules/customer_accounts/api/portal/users-invite.js.map +2 -2
- package/dist/modules/customer_accounts/backend/customer_accounts/roles/page.js +1 -2
- package/dist/modules/customer_accounts/backend/customer_accounts/roles/page.js.map +2 -2
- package/dist/modules/customer_accounts/backend/customer_accounts/users/page.js +1 -2
- package/dist/modules/customer_accounts/backend/customer_accounts/users/page.js.map +2 -2
- package/dist/modules/customer_accounts/data/entities.js +0 -3
- package/dist/modules/customer_accounts/data/entities.js.map +2 -2
- package/dist/modules/customer_accounts/data/validators.js +0 -1
- package/dist/modules/customer_accounts/data/validators.js.map +2 -2
- package/dist/modules/customer_accounts/lib/customerAuth.js +2 -7
- package/dist/modules/customer_accounts/lib/customerAuth.js.map +2 -2
- package/dist/modules/customer_accounts/lib/customerAuthServer.js +1 -2
- package/dist/modules/customer_accounts/lib/customerAuthServer.js.map +2 -2
- package/dist/modules/customer_accounts/lib/customerEntityOwnership.js +3 -29
- package/dist/modules/customer_accounts/lib/customerEntityOwnership.js.map +2 -2
- package/dist/modules/customer_accounts/lib/customerUrl.js +10 -19
- package/dist/modules/customer_accounts/lib/customerUrl.js.map +2 -2
- package/dist/modules/customer_accounts/services/customerInvitationService.js +2 -32
- package/dist/modules/customer_accounts/services/customerInvitationService.js.map +2 -2
- package/dist/modules/customer_accounts/services/customerRbacService.js +3 -12
- package/dist/modules/customer_accounts/services/customerRbacService.js.map +2 -2
- package/dist/modules/customer_accounts/setup.js +0 -6
- package/dist/modules/customer_accounts/setup.js.map +2 -2
- package/dist/modules/customer_accounts/subscribers/autoLinkCrm.js +7 -47
- 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/portal-ai-assistant-trigger/widget.client.js +1 -1
- package/dist/modules/customer_accounts/widgets/injection/portal-ai-assistant-trigger/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/analytics.js +1 -4
- package/dist/modules/customers/analytics.js.map +2 -2
- package/dist/modules/customers/api/companies/[id]/route.js +4 -3
- package/dist/modules/customers/api/companies/[id]/route.js.map +2 -2
- package/dist/modules/customers/api/deals/[id]/people/route.js +2 -4
- package/dist/modules/customers/api/deals/[id]/people/route.js.map +2 -2
- package/dist/modules/customers/api/deals/[id]/route.js +3 -7
- package/dist/modules/customers/api/deals/[id]/route.js.map +2 -2
- package/dist/modules/customers/api/deals/aggregate/route.js +4 -5
- package/dist/modules/customers/api/deals/aggregate/route.js.map +2 -2
- package/dist/modules/customers/api/deals/summary/route.js +119 -14
- package/dist/modules/customers/api/deals/summary/route.js.map +2 -2
- package/dist/modules/customers/api/people/[id]/companies/enriched/route.js +2 -3
- package/dist/modules/customers/api/people/[id]/companies/enriched/route.js.map +2 -2
- package/dist/modules/customers/api/utils.js +18 -12
- package/dist/modules/customers/api/utils.js.map +2 -2
- package/dist/modules/customers/backend/customers/companies/[id]/page.js +1 -2
- package/dist/modules/customers/backend/customers/companies/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/companies/page.js +1 -2
- package/dist/modules/customers/backend/customers/companies/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js +5 -16
- package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/[id]/page.js +11 -18
- package/dist/modules/customers/backend/customers/deals/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/page.js +1 -2
- package/dist/modules/customers/backend/customers/deals/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/pipeline/components/QuickDealDialog.js +3 -17
- package/dist/modules/customers/backend/customers/deals/pipeline/components/QuickDealDialog.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/pipeline/page.js +1 -7
- package/dist/modules/customers/backend/customers/deals/pipeline/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/people/[id]/page.js +1 -2
- package/dist/modules/customers/backend/customers/people/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/people/page.js +1 -2
- package/dist/modules/customers/backend/customers/people/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/people-v2/[id]/page.js +10 -26
- package/dist/modules/customers/backend/customers/people-v2/[id]/page.js.map +2 -2
- package/dist/modules/customers/cli.js +11 -28
- package/dist/modules/customers/cli.js.map +2 -2
- package/dist/modules/customers/commands/deals.js +10 -48
- package/dist/modules/customers/commands/deals.js.map +2 -2
- package/dist/modules/customers/commands/people.js +0 -2
- package/dist/modules/customers/commands/people.js.map +2 -2
- package/dist/modules/customers/components/CustomerTodosTable.js +1 -2
- package/dist/modules/customers/components/CustomerTodosTable.js.map +2 -2
- package/dist/modules/customers/components/detail/ActiveDealCard.js +1 -2
- package/dist/modules/customers/components/detail/ActiveDealCard.js.map +2 -2
- package/dist/modules/customers/components/detail/ActivitiesDayStrip.js +3 -2
- package/dist/modules/customers/components/detail/ActivitiesDayStrip.js.map +2 -2
- package/dist/modules/customers/components/detail/CompanyDetailTabs.js +6 -26
- package/dist/modules/customers/components/detail/CompanyDetailTabs.js.map +2 -2
- package/dist/modules/customers/components/detail/CompanyKpiBar.js +5 -6
- package/dist/modules/customers/components/detail/CompanyKpiBar.js.map +2 -2
- package/dist/modules/customers/components/detail/ConfirmDealLostDialog.js +1 -1
- package/dist/modules/customers/components/detail/ConfirmDealLostDialog.js.map +1 -1
- package/dist/modules/customers/components/detail/DealDetailTabs.js +8 -30
- package/dist/modules/customers/components/detail/DealDetailTabs.js.map +2 -2
- package/dist/modules/customers/components/detail/DealForm.js +1 -2
- package/dist/modules/customers/components/detail/DealForm.js.map +2 -2
- package/dist/modules/customers/components/detail/DealsSection.js +1 -1
- package/dist/modules/customers/components/detail/DealsSection.js.map +2 -2
- package/dist/modules/customers/components/detail/PersonDetailTabs.js +8 -30
- package/dist/modules/customers/components/detail/PersonDetailTabs.js.map +2 -2
- package/dist/modules/customers/components/detail/ScheduleActivityDialog.js +216 -231
- package/dist/modules/customers/components/detail/ScheduleActivityDialog.js.map +2 -2
- package/dist/modules/customers/components/detail/dashboard/helpers.js +3 -4
- package/dist/modules/customers/components/detail/dashboard/helpers.js.map +2 -2
- package/dist/modules/customers/components/formConfig.js +10 -14
- package/dist/modules/customers/components/formConfig.js.map +2 -2
- package/dist/modules/customers/data/entities.js +0 -8
- package/dist/modules/customers/data/entities.js.map +2 -2
- package/dist/modules/customers/data/validators.js +2 -5
- package/dist/modules/customers/data/validators.js.map +2 -2
- package/dist/modules/customers/lib/calendar/format.js +4 -8
- package/dist/modules/customers/lib/calendar/format.js.map +2 -2
- package/dist/modules/customers/lib/visibilityFilter.js +4 -6
- package/dist/modules/customers/lib/visibilityFilter.js.map +2 -2
- package/dist/modules/customers/search.js +29 -50
- package/dist/modules/customers/search.js.map +2 -2
- package/dist/modules/dashboards/api/layout/[itemId]/route.js +3 -6
- package/dist/modules/dashboards/api/layout/[itemId]/route.js.map +2 -2
- package/dist/modules/dashboards/api/layout/route.js +9 -22
- package/dist/modules/dashboards/api/layout/route.js.map +2 -2
- package/dist/modules/dashboards/api/roles/widgets/route.js +3 -9
- package/dist/modules/dashboards/api/roles/widgets/route.js.map +2 -2
- package/dist/modules/dashboards/api/users/widgets/route.js +3 -9
- package/dist/modules/dashboards/api/users/widgets/route.js.map +2 -2
- package/dist/modules/dashboards/api/widgets/catalog.js +3 -6
- package/dist/modules/dashboards/api/widgets/catalog.js.map +2 -2
- package/dist/modules/dashboards/api/widgets/data/batch/route.js +3 -12
- package/dist/modules/dashboards/api/widgets/data/batch/route.js.map +2 -2
- package/dist/modules/dashboards/api/widgets/data/route.js +3 -28
- package/dist/modules/dashboards/api/widgets/data/route.js.map +2 -2
- package/dist/modules/dashboards/api/widgets/data/schema.js +18 -28
- package/dist/modules/dashboards/api/widgets/data/schema.js.map +2 -2
- package/dist/modules/dashboards/lib/access.js +3 -5
- package/dist/modules/dashboards/lib/access.js.map +2 -2
- package/dist/modules/dashboards/lib/aggregations.js +46 -113
- package/dist/modules/dashboards/lib/aggregations.js.map +2 -2
- package/dist/modules/dashboards/lib/formatters.js +11 -84
- package/dist/modules/dashboards/lib/formatters.js.map +2 -2
- package/dist/modules/dashboards/services/widgetDataService.js +14 -316
- package/dist/modules/dashboards/services/widgetDataService.js.map +2 -2
- package/dist/modules/dashboards/widgets/dashboard/aov-kpi/widget.client.js +3 -9
- package/dist/modules/dashboards/widgets/dashboard/aov-kpi/widget.client.js.map +2 -2
- package/dist/modules/dashboards/widgets/dashboard/pipeline-summary/config.js +2 -52
- package/dist/modules/dashboards/widgets/dashboard/pipeline-summary/config.js.map +2 -2
- package/dist/modules/dashboards/widgets/dashboard/pipeline-summary/widget.client.js +30 -52
- package/dist/modules/dashboards/widgets/dashboard/pipeline-summary/widget.client.js.map +2 -2
- package/dist/modules/dashboards/widgets/dashboard/pipeline-summary/widget.js +2 -2
- package/dist/modules/dashboards/widgets/dashboard/pipeline-summary/widget.js.map +2 -2
- package/dist/modules/dashboards/widgets/dashboard/revenue-kpi/widget.client.js +3 -9
- package/dist/modules/dashboards/widgets/dashboard/revenue-kpi/widget.client.js.map +2 -2
- package/dist/modules/dashboards/widgets/dashboard/revenue-trend/widget.client.js +3 -8
- package/dist/modules/dashboards/widgets/dashboard/revenue-trend/widget.client.js.map +2 -2
- package/dist/modules/dashboards/widgets/dashboard/sales-by-region/widget.client.js +18 -26
- package/dist/modules/dashboards/widgets/dashboard/sales-by-region/widget.client.js.map +2 -2
- package/dist/modules/dashboards/widgets/dashboard/top-customers/widget.client.js +14 -22
- package/dist/modules/dashboards/widgets/dashboard/top-customers/widget.client.js.map +2 -2
- package/dist/modules/dashboards/widgets/dashboard/top-products/widget.client.js +4 -10
- package/dist/modules/dashboards/widgets/dashboard/top-products/widget.client.js.map +2 -2
- package/dist/modules/data_sync/api/mappings/[id]/route.js +9 -22
- package/dist/modules/data_sync/api/mappings/[id]/route.js.map +2 -2
- package/dist/modules/data_sync/api/mappings/route.js +4 -13
- package/dist/modules/data_sync/api/mappings/route.js.map +2 -2
- package/dist/modules/data_sync/api/options.js +2 -7
- package/dist/modules/data_sync/api/options.js.map +2 -2
- package/dist/modules/data_sync/api/run.js +2 -7
- package/dist/modules/data_sync/api/run.js.map +2 -2
- package/dist/modules/data_sync/api/runs/[id]/cancel.js +3 -8
- package/dist/modules/data_sync/api/runs/[id]/cancel.js.map +2 -2
- package/dist/modules/data_sync/api/runs/[id]/retry.js +2 -7
- package/dist/modules/data_sync/api/runs/[id]/retry.js.map +2 -2
- package/dist/modules/data_sync/api/runs/[id]/route.js +3 -8
- package/dist/modules/data_sync/api/runs/[id]/route.js.map +2 -2
- package/dist/modules/data_sync/api/runs.js +2 -7
- package/dist/modules/data_sync/api/runs.js.map +2 -2
- package/dist/modules/data_sync/api/schedules/[id]/route.js +6 -19
- package/dist/modules/data_sync/api/schedules/[id]/route.js.map +2 -2
- package/dist/modules/data_sync/api/schedules/route.js +4 -13
- package/dist/modules/data_sync/api/schedules/route.js.map +2 -2
- package/dist/modules/data_sync/api/validate.js +4 -9
- package/dist/modules/data_sync/api/validate.js.map +2 -2
- package/dist/modules/data_sync/backend/data-sync/page.js +1 -2
- package/dist/modules/data_sync/backend/data-sync/page.js.map +2 -2
- package/dist/modules/data_sync/lib/queue.js +1 -16
- package/dist/modules/data_sync/lib/queue.js.map +2 -2
- package/dist/modules/data_sync/lib/start-run.js +1 -2
- package/dist/modules/data_sync/lib/start-run.js.map +2 -2
- package/dist/modules/data_sync/lib/sync-engine.js +2 -35
- package/dist/modules/data_sync/lib/sync-engine.js.map +2 -2
- package/dist/modules/data_sync/lib/sync-run-service.js +2 -70
- package/dist/modules/data_sync/lib/sync-run-service.js.map +2 -2
- package/dist/modules/data_sync/workers/sync-export.js +2 -9
- package/dist/modules/data_sync/workers/sync-export.js.map +2 -2
- package/dist/modules/data_sync/workers/sync-import.js +2 -9
- package/dist/modules/data_sync/workers/sync-import.js.map +2 -2
- package/dist/modules/dictionaries/api/[dictionaryId]/entries/route.js +12 -34
- package/dist/modules/dictionaries/api/[dictionaryId]/entries/route.js.map +2 -2
- package/dist/modules/dictionaries/api/openapi.js +2 -15
- package/dist/modules/dictionaries/api/openapi.js.map +2 -2
- package/dist/modules/dictionaries/components/DictionaryEntrySelect.js +1 -1
- package/dist/modules/dictionaries/components/DictionaryEntrySelect.js.map +2 -2
- package/dist/modules/dictionaries/components/hooks/useDictionaryEntries.js +29 -30
- package/dist/modules/dictionaries/components/hooks/useDictionaryEntries.js.map +2 -2
- package/dist/modules/dictionaries/data/validators.js +0 -7
- package/dist/modules/dictionaries/data/validators.js.map +2 -2
- package/dist/modules/dictionaries/lib/clientEntries.js +3 -4
- package/dist/modules/dictionaries/lib/clientEntries.js.map +2 -2
- package/dist/modules/directory/api/organization-branding/route.js +3 -10
- package/dist/modules/directory/api/organization-branding/route.js.map +2 -2
- package/dist/modules/directory/api/organization-switcher/route.js +20 -84
- package/dist/modules/directory/api/organization-switcher/route.js.map +2 -2
- package/dist/modules/directory/api/organizations/route.js +0 -7
- package/dist/modules/directory/api/organizations/route.js.map +3 -3
- package/dist/modules/directory/api/tenants/route.js +2 -8
- package/dist/modules/directory/api/tenants/route.js.map +2 -2
- package/dist/modules/directory/backend/directory/branding/page.js +8 -31
- package/dist/modules/directory/backend/directory/branding/page.js.map +2 -2
- package/dist/modules/directory/backend/directory/organizations/[id]/edit/page.js +16 -7
- package/dist/modules/directory/backend/directory/organizations/[id]/edit/page.js.map +2 -2
- package/dist/modules/directory/backend/directory/organizations/page.js +1 -2
- package/dist/modules/directory/backend/directory/organizations/page.js.map +2 -2
- package/dist/modules/directory/backend/directory/tenants/page.js +1 -2
- package/dist/modules/directory/backend/directory/tenants/page.js.map +2 -2
- package/dist/modules/directory/commands/organizations.js +1 -8
- package/dist/modules/directory/commands/organizations.js.map +2 -2
- package/dist/modules/directory/commands/tenants.js +0 -6
- package/dist/modules/directory/commands/tenants.js.map +2 -2
- package/dist/modules/directory/data/entities.js +0 -4
- package/dist/modules/directory/data/entities.js.map +2 -2
- package/dist/modules/directory/data/validators.js +0 -2
- package/dist/modules/directory/data/validators.js.map +2 -2
- package/dist/modules/directory/subscribers/invalidateOrgScopeCache.js +1 -5
- package/dist/modules/directory/subscribers/invalidateOrgScopeCache.js.map +2 -2
- package/dist/modules/directory/utils/organizationScope.js +3 -11
- package/dist/modules/directory/utils/organizationScope.js.map +2 -2
- package/dist/modules/entities/api/definitions.js +3 -53
- package/dist/modules/entities/api/definitions.js.map +2 -2
- package/dist/modules/entities/api/entities.js +2 -21
- package/dist/modules/entities/api/entities.js.map +2 -2
- package/dist/modules/entities/api/entity-settings.js +9 -59
- package/dist/modules/entities/api/entity-settings.js.map +2 -2
- package/dist/modules/entities/api/records.js +24 -3
- package/dist/modules/entities/api/records.js.map +2 -2
- package/dist/modules/entities/api/relations/options.js +16 -11
- package/dist/modules/entities/api/relations/options.js.map +2 -2
- package/dist/modules/entities/api/sidebar-entities.js +12 -34
- package/dist/modules/entities/api/sidebar-entities.js.map +2 -2
- package/dist/modules/entities/backend/entities/user/[entityId]/records/page.js +4 -23
- package/dist/modules/entities/backend/entities/user/[entityId]/records/page.js.map +2 -2
- package/dist/modules/entities/backend/entities/user/create/page.js +7 -16
- package/dist/modules/entities/backend/entities/user/create/page.js.map +2 -2
- package/dist/modules/entities/cli.js +19 -193
- package/dist/modules/entities/cli.js.map +2 -2
- package/dist/modules/entities/components/SystemEntitiesTable.js +1 -2
- package/dist/modules/entities/components/SystemEntitiesTable.js.map +2 -2
- package/dist/modules/entities/components/UserEntitiesTable.js +1 -2
- package/dist/modules/entities/components/UserEntitiesTable.js.map +2 -2
- package/dist/modules/entities/lib/entityAcl.js +9 -87
- package/dist/modules/entities/lib/entityAcl.js.map +3 -3
- package/dist/modules/feature_toggles/components/FeatureGuard.js +2 -3
- package/dist/modules/feature_toggles/components/FeatureGuard.js.map +2 -2
- package/dist/modules/feature_toggles/components/hooks/useFeatureFlagBoolean.js +2 -5
- package/dist/modules/feature_toggles/components/hooks/useFeatureFlagBoolean.js.map +2 -2
- package/dist/modules/feature_toggles/components/hooks/useFeatureFlagJson.js +2 -5
- package/dist/modules/feature_toggles/components/hooks/useFeatureFlagJson.js.map +2 -2
- package/dist/modules/feature_toggles/components/hooks/useFeatureFlagNumber.js +2 -5
- package/dist/modules/feature_toggles/components/hooks/useFeatureFlagNumber.js.map +2 -2
- package/dist/modules/feature_toggles/components/hooks/useFeatureFlagString.js +2 -5
- package/dist/modules/feature_toggles/components/hooks/useFeatureFlagString.js.map +2 -2
- package/dist/modules/inbox_ops/ai-tools.js +2 -5
- package/dist/modules/inbox_ops/ai-tools.js.map +2 -2
- package/dist/modules/inbox_ops/api/proposals/[id]/actions/[actionId]/route.js +1 -14
- package/dist/modules/inbox_ops/api/proposals/[id]/actions/[actionId]/route.js.map +2 -2
- package/dist/modules/inbox_ops/api/proposals/route.js +1 -16
- package/dist/modules/inbox_ops/api/proposals/route.js.map +2 -2
- package/dist/modules/inbox_ops/api/webhook/inbound.js +10 -14
- package/dist/modules/inbox_ops/api/webhook/inbound.js.map +2 -2
- package/dist/modules/inbox_ops/backend/inbox-ops/log/page.js +6 -6
- package/dist/modules/inbox_ops/backend/inbox-ops/log/page.js.map +2 -2
- package/dist/modules/inbox_ops/components/proposals/EditActionDialog.js +20 -25
- package/dist/modules/inbox_ops/components/proposals/EditActionDialog.js.map +2 -2
- package/dist/modules/inbox_ops/search.js +4 -15
- package/dist/modules/inbox_ops/search.js.map +2 -2
- package/dist/modules/integrations/api/[id]/credentials/route.js +5 -11
- package/dist/modules/integrations/api/[id]/credentials/route.js.map +2 -2
- package/dist/modules/integrations/api/[id]/health/route.js +3 -6
- package/dist/modules/integrations/api/[id]/health/route.js.map +2 -2
- package/dist/modules/integrations/api/[id]/route.js +3 -6
- package/dist/modules/integrations/api/[id]/route.js.map +2 -2
- package/dist/modules/integrations/api/[id]/state/route.js +3 -6
- package/dist/modules/integrations/api/[id]/state/route.js.map +2 -2
- package/dist/modules/integrations/api/[id]/version/route.js +3 -6
- package/dist/modules/integrations/api/[id]/version/route.js.map +2 -2
- package/dist/modules/integrations/api/logs/route.js +3 -6
- package/dist/modules/integrations/api/logs/route.js.map +2 -2
- package/dist/modules/integrations/api/route.js +3 -6
- 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/backend/integrations/[id]/page.js +4 -2
- package/dist/modules/integrations/backend/integrations/[id]/page.js.map +2 -2
- package/dist/modules/integrations/lib/organization-scope.js +9 -2
- package/dist/modules/integrations/lib/organization-scope.js.map +2 -2
- package/dist/modules/integrations/widgets/injection/external-ids/widget.client.js +5 -0
- package/dist/modules/integrations/widgets/injection/external-ids/widget.client.js.map +2 -2
- package/dist/modules/messages/api/[id]/route.js +0 -15
- package/dist/modules/messages/api/[id]/route.js.map +2 -2
- package/dist/modules/messages/api/route.js +8 -77
- package/dist/modules/messages/api/route.js.map +2 -2
- package/dist/modules/messages/components/ComposeMessagePageClient.js +1 -2
- package/dist/modules/messages/components/ComposeMessagePageClient.js.map +2 -2
- package/dist/modules/messages/components/MessageDetailPageClient.js +2 -3
- package/dist/modules/messages/components/MessageDetailPageClient.js.map +2 -2
- package/dist/modules/messages/components/MessagesInboxPageClient.js +1 -2
- package/dist/modules/messages/components/MessagesInboxPageClient.js.map +2 -2
- package/dist/modules/messages/components/message-detail/panels/dialogs.js +1 -1
- package/dist/modules/messages/components/message-detail/panels/dialogs.js.map +1 -1
- package/dist/modules/messages/lib/routeHelpers.js +3 -1
- package/dist/modules/messages/lib/routeHelpers.js.map +2 -2
- package/dist/modules/messages/lib/searchLookup.js +16 -8
- package/dist/modules/messages/lib/searchLookup.js.map +2 -2
- package/dist/modules/messages/search.js +5 -10
- package/dist/modules/messages/search.js.map +2 -2
- package/dist/modules/notifications/api/route.js +4 -83
- package/dist/modules/notifications/api/route.js.map +2 -2
- package/dist/modules/notifications/api/unread-count/route.js +6 -25
- package/dist/modules/notifications/api/unread-count/route.js.map +2 -2
- package/dist/modules/notifications/di.js +1 -1
- package/dist/modules/notifications/di.js.map +2 -2
- package/dist/modules/notifications/events.js +2 -4
- package/dist/modules/notifications/events.js.map +2 -2
- package/dist/modules/notifications/lib/notificationRecipients.js +7 -6
- package/dist/modules/notifications/lib/notificationRecipients.js.map +2 -2
- package/dist/modules/notifications/lib/notificationService.js +4 -48
- package/dist/modules/notifications/lib/notificationService.js.map +2 -2
- package/dist/modules/notifications/lib/routeHelpers.js +2 -16
- package/dist/modules/notifications/lib/routeHelpers.js.map +2 -2
- package/dist/modules/payment_gateways/api/capture/route.js +1 -1
- package/dist/modules/payment_gateways/api/capture/route.js.map +2 -2
- package/dist/modules/payment_gateways/api/sessions/route.js +3 -6
- package/dist/modules/payment_gateways/api/sessions/route.js.map +2 -2
- package/dist/modules/payment_gateways/api/webhook/[provider]/route.js +1 -11
- package/dist/modules/payment_gateways/api/webhook/[provider]/route.js.map +2 -2
- package/dist/modules/payment_gateways/backend/payment-gateways/page.js +2 -3
- package/dist/modules/payment_gateways/backend/payment-gateways/page.js.map +2 -2
- package/dist/modules/payment_gateways/data/entities.js +0 -11
- package/dist/modules/payment_gateways/data/entities.js.map +2 -2
- package/dist/modules/payment_gateways/di.js +1 -17
- package/dist/modules/payment_gateways/di.js.map +2 -2
- package/dist/modules/payment_gateways/lib/gateway-service.js +14 -93
- package/dist/modules/payment_gateways/lib/gateway-service.js.map +2 -2
- package/dist/modules/payment_gateways/lib/payment-operation-idempotency.js +0 -1
- package/dist/modules/payment_gateways/lib/payment-operation-idempotency.js.map +2 -2
- package/dist/modules/payment_gateways/lib/session-idempotency.js +0 -33
- package/dist/modules/payment_gateways/lib/session-idempotency.js.map +2 -2
- package/dist/modules/payment_gateways/setup.js +0 -47
- package/dist/modules/payment_gateways/setup.js.map +2 -2
- package/dist/modules/planner/components/AvailabilityRulesEditor.js +4 -4
- package/dist/modules/planner/components/AvailabilityRulesEditor.js.map +2 -2
- package/dist/modules/planner/components/unavailabilityReasons.js +3 -3
- package/dist/modules/planner/components/unavailabilityReasons.js.map +2 -2
- package/dist/modules/portal/frontend/[orgSlug]/portal/dashboard/page.js +3 -3
- package/dist/modules/portal/frontend/[orgSlug]/portal/dashboard/page.js.map +2 -2
- package/dist/modules/portal/frontend/[orgSlug]/portal/login/page.js +3 -3
- package/dist/modules/portal/frontend/[orgSlug]/portal/login/page.js.map +2 -2
- package/dist/modules/portal/frontend/[orgSlug]/portal/page.js +3 -3
- package/dist/modules/portal/frontend/[orgSlug]/portal/page.js.map +2 -2
- package/dist/modules/portal/frontend/[orgSlug]/portal/profile/page.js +3 -3
- package/dist/modules/portal/frontend/[orgSlug]/portal/profile/page.js.map +2 -2
- package/dist/modules/portal/frontend/[orgSlug]/portal/reset-password/page.js +3 -3
- package/dist/modules/portal/frontend/[orgSlug]/portal/reset-password/page.js.map +2 -2
- package/dist/modules/portal/frontend/[orgSlug]/portal/signup/page.js +3 -3
- package/dist/modules/portal/frontend/[orgSlug]/portal/signup/page.js.map +2 -2
- package/dist/modules/progress/lib/progressService.js +0 -2
- package/dist/modules/progress/lib/progressService.js.map +2 -2
- package/dist/modules/progress/lib/progressServiceImpl.js +104 -322
- package/dist/modules/progress/lib/progressServiceImpl.js.map +2 -2
- package/dist/modules/query_index/api/openapi.js +1 -13
- package/dist/modules/query_index/api/openapi.js.map +2 -2
- package/dist/modules/query_index/api/reindex.js +0 -10
- package/dist/modules/query_index/api/reindex.js.map +2 -2
- package/dist/modules/query_index/api/status.js +105 -165
- package/dist/modules/query_index/api/status.js.map +2 -2
- package/dist/modules/query_index/cli.js +1 -125
- package/dist/modules/query_index/cli.js.map +2 -2
- package/dist/modules/query_index/components/QueryIndexesTable.js +42 -130
- package/dist/modules/query_index/components/QueryIndexesTable.js.map +2 -2
- package/dist/modules/query_index/data/entities.js +1 -2
- package/dist/modules/query_index/data/entities.js.map +2 -2
- package/dist/modules/query_index/di.js +0 -3
- package/dist/modules/query_index/di.js.map +2 -2
- package/dist/modules/query_index/lib/batch.js +4 -11
- package/dist/modules/query_index/lib/batch.js.map +2 -2
- package/dist/modules/query_index/lib/coverage.js +9 -21
- package/dist/modules/query_index/lib/coverage.js.map +2 -2
- package/dist/modules/query_index/lib/document.js +5 -12
- package/dist/modules/query_index/lib/document.js.map +2 -2
- package/dist/modules/query_index/lib/engine.js +48 -105
- package/dist/modules/query_index/lib/engine.js.map +2 -2
- package/dist/modules/query_index/lib/indexer.js +19 -95
- package/dist/modules/query_index/lib/indexer.js.map +2 -2
- package/dist/modules/query_index/lib/reindexer.js +37 -43
- package/dist/modules/query_index/lib/reindexer.js.map +2 -2
- package/dist/modules/query_index/lib/search-tokens.js +15 -34
- package/dist/modules/query_index/lib/search-tokens.js.map +2 -2
- package/dist/modules/query_index/lib/subscriber-scope.js +3 -2
- package/dist/modules/query_index/lib/subscriber-scope.js.map +2 -2
- package/dist/modules/query_index/subscribers/coverage_refresh.js +0 -4
- package/dist/modules/query_index/subscribers/coverage_refresh.js.map +2 -2
- package/dist/modules/query_index/subscribers/delete_one.js +1 -53
- package/dist/modules/query_index/subscribers/delete_one.js.map +3 -3
- package/dist/modules/query_index/subscribers/upsert_one.js +0 -60
- package/dist/modules/query_index/subscribers/upsert_one.js.map +3 -3
- package/dist/modules/resources/api/resources.js +0 -2
- package/dist/modules/resources/api/resources.js.map +2 -2
- package/dist/modules/resources/backend/resources/resource-types/page.js +1 -2
- package/dist/modules/resources/backend/resources/resource-types/page.js.map +2 -2
- package/dist/modules/resources/backend/resources/resources/[id]/page.js +2 -3
- package/dist/modules/resources/backend/resources/resources/[id]/page.js.map +2 -2
- package/dist/modules/resources/backend/resources/resources/page.js +1 -2
- package/dist/modules/resources/backend/resources/resources/page.js.map +2 -2
- package/dist/modules/resources/commands/resources.js +0 -9
- package/dist/modules/resources/commands/resources.js.map +2 -2
- package/dist/modules/resources/components/detail/dictionaries.js +3 -3
- package/dist/modules/resources/components/detail/dictionaries.js.map +2 -2
- package/dist/modules/resources/data/entities.js +0 -3
- package/dist/modules/resources/data/entities.js.map +2 -2
- package/dist/modules/resources/data/validators.js +2 -6
- package/dist/modules/resources/data/validators.js.map +2 -2
- package/dist/modules/resources/lib/seeds.js +9 -16
- package/dist/modules/resources/lib/seeds.js.map +2 -2
- package/dist/modules/sales/analytics.js +3 -7
- package/dist/modules/sales/analytics.js.map +2 -2
- package/dist/modules/sales/api/document-history/route.js +1 -2
- package/dist/modules/sales/api/document-history/route.js.map +2 -2
- package/dist/modules/sales/api/documents/factory.js +3 -14
- package/dist/modules/sales/api/documents/factory.js.map +2 -2
- package/dist/modules/sales/backend/sales/documents/[id]/page.js +3 -11
- package/dist/modules/sales/backend/sales/documents/[id]/page.js.map +2 -2
- package/dist/modules/sales/backend/sales/documents/create/page.js +14 -11
- package/dist/modules/sales/backend/sales/documents/create/page.js.map +2 -2
- package/dist/modules/sales/commands/documents.js +23 -184
- package/dist/modules/sales/commands/documents.js.map +2 -2
- package/dist/modules/sales/components/documents/ItemsSection.js +10 -20
- package/dist/modules/sales/components/documents/ItemsSection.js.map +2 -2
- package/dist/modules/sales/components/documents/LineItemDialog.js +5 -12
- package/dist/modules/sales/components/documents/LineItemDialog.js.map +2 -2
- package/dist/modules/sales/components/documents/SalesDocumentForm.js +2 -48
- package/dist/modules/sales/components/documents/SalesDocumentForm.js.map +2 -2
- package/dist/modules/sales/components/documents/SalesDocumentsTable.js +1 -4
- package/dist/modules/sales/components/documents/SalesDocumentsTable.js.map +2 -2
- package/dist/modules/sales/components/useSalesChannelsEnabled.js +35 -2
- package/dist/modules/sales/components/useSalesChannelsEnabled.js.map +2 -2
- package/dist/modules/sales/data/validators.js +5 -32
- package/dist/modules/sales/data/validators.js.map +2 -2
- package/dist/modules/sales/di.js +0 -7
- package/dist/modules/sales/di.js.map +2 -2
- package/dist/modules/sales/events.js +0 -1
- package/dist/modules/sales/events.js.map +2 -2
- package/dist/modules/sales/lib/historyHelpers.js +1 -69
- package/dist/modules/sales/lib/historyHelpers.js.map +2 -2
- package/dist/modules/sales/widgets/injection/document-history/widget.client.js +2 -51
- package/dist/modules/sales/widgets/injection/document-history/widget.client.js.map +2 -2
- package/dist/modules/sales/workflows.js +7 -10
- package/dist/modules/sales/workflows.js.map +2 -2
- package/dist/modules/shipping_carriers/api/webhook/[provider]/route.js +1 -11
- package/dist/modules/shipping_carriers/api/webhook/[provider]/route.js.map +2 -2
- package/dist/modules/shipping_carriers/lib/shipment-wizard/components/PackageEditor.js +1 -1
- package/dist/modules/shipping_carriers/lib/shipment-wizard/components/PackageEditor.js.map +1 -1
- package/dist/modules/staff/api/interceptors.js +3 -5
- package/dist/modules/staff/api/interceptors.js.map +2 -2
- package/dist/modules/staff/api/leave-requests.js +42 -45
- package/dist/modules/staff/api/leave-requests.js.map +2 -2
- package/dist/modules/staff/components/detail/dictionaries.js +3 -3
- package/dist/modules/staff/components/detail/dictionaries.js.map +2 -2
- package/dist/modules/sync_excel/api/upload/route.js +2 -15
- package/dist/modules/sync_excel/api/upload/route.js.map +2 -2
- package/dist/modules/wms/components/backend/ReleaseReservationDialog.js +1 -1
- package/dist/modules/wms/components/backend/ReleaseReservationDialog.js.map +1 -1
- package/dist/modules/wms/components/backend/WmsConfigurationPage.js +4 -5
- package/dist/modules/wms/components/backend/WmsConfigurationPage.js.map +2 -2
- package/dist/modules/wms/components/backend/WmsInventoryConsolePage.js +3 -4
- package/dist/modules/wms/components/backend/WmsInventoryConsolePage.js.map +2 -2
- package/dist/modules/wms/components/backend/WmsLocationDetailPage.js +2 -3
- package/dist/modules/wms/components/backend/WmsLocationDetailPage.js.map +2 -2
- package/dist/modules/wms/components/backend/WmsLotDetailPage.js +2 -3
- package/dist/modules/wms/components/backend/WmsLotDetailPage.js.map +2 -2
- package/dist/modules/wms/components/backend/WmsLotsListPage.js +1 -2
- package/dist/modules/wms/components/backend/WmsLotsListPage.js.map +2 -2
- package/dist/modules/wms/components/backend/WmsSkuDetailPage.js +2 -3
- package/dist/modules/wms/components/backend/WmsSkuDetailPage.js.map +2 -2
- package/dist/modules/workflows/backend/definitions/page.js +2 -3
- package/dist/modules/workflows/backend/definitions/page.js.map +2 -2
- package/dist/modules/workflows/backend/definitions/visual-editor/page.js +3 -6
- package/dist/modules/workflows/backend/definitions/visual-editor/page.js.map +2 -2
- package/dist/modules/workflows/backend/instances/page.js +9 -10
- package/dist/modules/workflows/backend/instances/page.js.map +2 -2
- package/dist/modules/workflows/backend/tasks/page.js +7 -8
- package/dist/modules/workflows/backend/tasks/page.js.map +2 -2
- package/dist/modules/workflows/components/ActivitiesEditor.js +13 -69
- package/dist/modules/workflows/components/ActivitiesEditor.js.map +2 -2
- package/dist/modules/workflows/components/BusinessRulesSelector.js +1 -1
- package/dist/modules/workflows/components/BusinessRulesSelector.js.map +2 -2
- package/dist/modules/workflows/components/DefinitionTriggersEditor.js +2 -2
- package/dist/modules/workflows/components/DefinitionTriggersEditor.js.map +2 -2
- package/dist/modules/workflows/components/EdgeEditDialogCrudForm.js +2 -1
- package/dist/modules/workflows/components/EdgeEditDialogCrudForm.js.map +2 -2
- package/dist/modules/workflows/components/NodeEditDialogCrudForm.js +2 -1
- package/dist/modules/workflows/components/NodeEditDialogCrudForm.js.map +2 -2
- package/dist/modules/workflows/components/StepsEditor.js +2 -2
- package/dist/modules/workflows/components/StepsEditor.js.map +2 -2
- package/dist/modules/workflows/components/TransitionsEditor.js +165 -207
- package/dist/modules/workflows/components/TransitionsEditor.js.map +2 -2
- package/dist/modules/workflows/components/WorkflowLegend.js +1 -1
- package/dist/modules/workflows/components/WorkflowLegend.js.map +2 -2
- package/dist/modules/workflows/components/WorkflowSelector.js +1 -1
- package/dist/modules/workflows/components/WorkflowSelector.js.map +2 -2
- package/dist/modules/workflows/components/fields/BusinessRuleConditionsEditor.js +1 -1
- package/dist/modules/workflows/components/fields/BusinessRuleConditionsEditor.js.map +2 -2
- package/dist/modules/workflows/components/fields/FormFieldArrayEditor.js +1 -1
- package/dist/modules/workflows/components/fields/FormFieldArrayEditor.js.map +2 -2
- package/dist/modules/workflows/components/fields/MappingArrayEditor.js +1 -1
- package/dist/modules/workflows/components/fields/MappingArrayEditor.js.map +2 -2
- package/dist/modules/workflows/components/fields/StartPreConditionsEditor.js +1 -1
- package/dist/modules/workflows/components/fields/StartPreConditionsEditor.js.map +2 -2
- package/dist/modules/workflows/components/fields/WorkflowSelectorField.js +4 -4
- package/dist/modules/workflows/components/fields/WorkflowSelectorField.js.map +2 -2
- package/dist/modules/workflows/data/validators.js +1 -34
- package/dist/modules/workflows/data/validators.js.map +3 -3
- package/dist/modules/workflows/events.js +0 -1
- package/dist/modules/workflows/events.js.map +2 -2
- package/dist/modules/workflows/lib/activity-executor.js +14 -59
- package/dist/modules/workflows/lib/activity-executor.js.map +2 -2
- package/dist/modules/workflows/lib/format-validation-error.js +1 -46
- package/dist/modules/workflows/lib/format-validation-error.js.map +2 -2
- package/dist/modules/workflows/widgets/injection/order-approval/widget.client.js +10 -21
- package/dist/modules/workflows/widgets/injection/order-approval/widget.client.js.map +2 -2
- package/generated/entities/customer_deal_person_link/index.ts +0 -1
- package/generated/entities/customer_user_invitation/index.ts +0 -1
- package/generated/entities/gateway_payment_operation/index.ts +0 -1
- package/generated/entities/gateway_transaction/index.ts +0 -1
- package/generated/entities/organization/index.ts +0 -1
- package/generated/entities/resources_resource/index.ts +0 -1
- package/generated/entities.ids.generated.ts +1 -3
- package/generated/entity-fields-registry.ts +0 -23
- package/package.json +18 -19
- package/src/bootstrap.ts +2 -17
- package/src/helpers/integration/salesFixtures.ts +2 -34
- package/src/helpers/integration/salesUi.ts +0 -8
- package/src/modules/api_keys/backend/api-keys/page.tsx +1 -2
- package/src/modules/attachments/api/route.ts +9 -130
- package/src/modules/attachments/data/entities.ts +0 -59
- package/src/modules/attachments/di.ts +1 -9
- package/src/modules/attachments/fields/attachment.tsx +1 -1
- package/src/modules/attachments/i18n/de.json +0 -15
- package/src/modules/attachments/i18n/en.json +0 -15
- package/src/modules/attachments/i18n/es.json +0 -15
- package/src/modules/attachments/i18n/pl.json +0 -15
- package/src/modules/attachments/lib/drivers/index.ts +1 -1
- package/src/modules/attachments/lib/drivers/localDriver.ts +8 -23
- package/src/modules/attachments/lib/drivers/types.ts +0 -5
- package/src/modules/attachments/lib/upload-limits.ts +0 -35
- package/src/modules/attachments/migrations/.snapshot-open-mercato.json +120 -648
- package/src/modules/audit_logs/api/audit-logs/access/route.ts +0 -5
- package/src/modules/audit_logs/api/audit-logs/actions/export/route.ts +0 -5
- package/src/modules/audit_logs/api/audit-logs/actions/route.ts +0 -5
- package/src/modules/audit_logs/components/AccessLogsTable.tsx +1 -2
- package/src/modules/audit_logs/components/AuditLogsActions.tsx +1 -2
- package/src/modules/auth/AGENTS.md +8 -12
- package/src/modules/auth/api/admin/nav.ts +4 -28
- package/src/modules/auth/api/profile/route.ts +2 -8
- package/src/modules/auth/api/users/route.ts +28 -8
- package/src/modules/auth/backend/auth/profile/page.tsx +0 -1
- package/src/modules/auth/backend/profile/change-password/page.tsx +0 -1
- package/src/modules/auth/backend/roles/page.tsx +1 -2
- package/src/modules/auth/backend/settings/page.tsx +8 -17
- package/src/modules/auth/backend/users/page.tsx +1 -2
- package/src/modules/auth/cli.ts +1 -1
- package/src/modules/auth/components/UserConsentsPanel.tsx +9 -9
- package/src/modules/auth/frontend/login.tsx +4 -5
- package/src/modules/auth/frontend/reset.tsx +2 -2
- package/src/modules/auth/i18n/de.json +0 -1
- package/src/modules/auth/i18n/en.json +0 -1
- package/src/modules/auth/i18n/es.json +0 -1
- package/src/modules/auth/i18n/pl.json +0 -1
- package/src/modules/auth/lib/backendChrome.tsx +33 -71
- package/src/modules/auth/lib/setup-app.ts +2 -21
- package/src/modules/auth/lib/tenantAccess.ts +0 -8
- package/src/modules/auth/services/rbacService.ts +46 -41
- package/src/modules/business_rules/api/rules/route.ts +4 -92
- package/src/modules/business_rules/backend/rules/page.tsx +1 -2
- package/src/modules/business_rules/components/ActionBuilder.tsx +5 -54
- package/src/modules/business_rules/components/ActionRow.tsx +18 -156
- package/src/modules/business_rules/components/ConditionRow.tsx +6 -9
- package/src/modules/business_rules/components/utils/actionValidation.ts +0 -6
- package/src/modules/business_rules/i18n/de.json +0 -12
- package/src/modules/business_rules/i18n/en.json +0 -12
- package/src/modules/business_rules/i18n/es.json +0 -12
- package/src/modules/business_rules/i18n/pl.json +0 -12
- package/src/modules/business_rules/lib/action-executor.ts +0 -198
- package/src/modules/business_rules/lib/rule-engine.ts +0 -4
- package/src/modules/catalog/backend/catalog/products/[id]/page.tsx +5 -6
- package/src/modules/catalog/backend/catalog/products/create/page.tsx +6 -7
- package/src/modules/catalog/components/PriceKindSettings.tsx +3 -3
- package/src/modules/catalog/components/categories/CategoriesDataTable.tsx +1 -2
- package/src/modules/catalog/components/products/ProductCategorizeSection.tsx +3 -3
- package/src/modules/catalog/components/products/ProductMediaManager.tsx +1 -1
- package/src/modules/catalog/components/products/ProductsDataTable.tsx +2 -3
- package/src/modules/catalog/components/products/VariantBuilder.tsx +5 -5
- package/src/modules/catalog/events.ts +0 -1
- package/src/modules/catalog/i18n/de.json +0 -18
- package/src/modules/catalog/i18n/en.json +0 -18
- package/src/modules/catalog/i18n/es.json +0 -18
- package/src/modules/catalog/i18n/pl.json +0 -18
- package/src/modules/catalog/widgets/injection/product-seo/widget.ts +1 -1
- package/src/modules/communication_channels/api/post/test-seed/route.ts +2 -69
- package/src/modules/communication_channels/api/post/webhook/[provider]/route.ts +1 -11
- package/src/modules/communication_channels/api/post/webhooks/gmail/route.ts +11 -17
- package/src/modules/communication_channels/backend/communication_channels/channels/page.tsx +1 -2
- package/src/modules/communication_channels/backend/profile/communication-channels/page.tsx +3 -4
- package/src/modules/communication_channels/data/enrichers.ts +26 -6
- package/src/modules/communication_channels/lib/access-control.ts +3 -3
- package/src/modules/configs/backend/config/system-status/page.tsx +1 -2
- package/src/modules/configs/lib/upgrade-actions.ts +0 -14
- package/src/modules/currencies/backend/currencies/page.tsx +1 -2
- package/src/modules/currencies/backend/exchange-rates/page.tsx +1 -2
- package/src/modules/currencies/di.ts +1 -4
- package/src/modules/currencies/i18n/de.json +0 -1
- package/src/modules/currencies/i18n/en.json +0 -1
- package/src/modules/currencies/i18n/es.json +0 -1
- package/src/modules/currencies/i18n/pl.json +0 -1
- package/src/modules/customer_accounts/AGENTS.md +3 -3
- package/src/modules/customer_accounts/api/admin/users/[id].ts +1 -16
- package/src/modules/customer_accounts/api/admin/users-invite.ts +3 -81
- package/src/modules/customer_accounts/api/invitations/accept.ts +2 -1
- package/src/modules/customer_accounts/api/login.ts +2 -4
- package/src/modules/customer_accounts/api/magic-link/verify.ts +2 -4
- package/src/modules/customer_accounts/api/portal/feature-check.ts +7 -5
- package/src/modules/customer_accounts/api/portal/nav.ts +3 -5
- package/src/modules/customer_accounts/api/portal/profile.ts +1 -5
- package/src/modules/customer_accounts/api/portal/sessions-refresh.ts +3 -3
- package/src/modules/customer_accounts/api/portal/users-invite.ts +1 -25
- package/src/modules/customer_accounts/backend/customer_accounts/roles/page.tsx +1 -2
- package/src/modules/customer_accounts/backend/customer_accounts/users/page.tsx +1 -2
- package/src/modules/customer_accounts/data/entities.ts +0 -3
- package/src/modules/customer_accounts/data/validators.ts +0 -1
- package/src/modules/customer_accounts/i18n/de.json +0 -6
- package/src/modules/customer_accounts/i18n/en.json +0 -6
- package/src/modules/customer_accounts/i18n/es.json +0 -6
- package/src/modules/customer_accounts/i18n/pl.json +0 -6
- package/src/modules/customer_accounts/lib/customerAuth.ts +2 -8
- package/src/modules/customer_accounts/lib/customerAuthServer.ts +0 -1
- package/src/modules/customer_accounts/lib/customerEntityOwnership.ts +2 -68
- package/src/modules/customer_accounts/lib/customerUrl.ts +11 -27
- package/src/modules/customer_accounts/migrations/.snapshot-open-mercato.json +0 -16
- package/src/modules/customer_accounts/services/customerInvitationService.ts +3 -56
- package/src/modules/customer_accounts/services/customerRbacService.ts +3 -16
- package/src/modules/customer_accounts/setup.ts +0 -7
- package/src/modules/customer_accounts/subscribers/autoLinkCrm.ts +8 -75
- package/src/modules/customer_accounts/widgets/injection/account-status/widget.client.tsx +2 -2
- package/src/modules/customer_accounts/widgets/injection/portal-ai-assistant-trigger/widget.client.tsx +3 -1
- package/src/modules/customer_accounts/widgets/injection-table.ts +1 -4
- package/src/modules/customers/analytics.ts +0 -3
- package/src/modules/customers/api/companies/[id]/route.ts +4 -3
- package/src/modules/customers/api/deals/[id]/people/route.ts +0 -3
- package/src/modules/customers/api/deals/[id]/route.ts +2 -10
- package/src/modules/customers/api/deals/aggregate/route.ts +4 -5
- package/src/modules/customers/api/deals/summary/route.ts +162 -15
- package/src/modules/customers/api/people/[id]/companies/enriched/route.ts +2 -3
- package/src/modules/customers/api/utils.ts +31 -12
- package/src/modules/customers/backend/customers/companies/[id]/page.tsx +1 -2
- package/src/modules/customers/backend/customers/companies/page.tsx +1 -2
- package/src/modules/customers/backend/customers/companies-v2/[id]/page.tsx +5 -17
- package/src/modules/customers/backend/customers/deals/[id]/hooks/types.ts +0 -1
- package/src/modules/customers/backend/customers/deals/[id]/page.tsx +12 -19
- package/src/modules/customers/backend/customers/deals/page.tsx +1 -2
- package/src/modules/customers/backend/customers/deals/pipeline/components/QuickDealDialog.tsx +3 -35
- package/src/modules/customers/backend/customers/deals/pipeline/page.tsx +1 -10
- package/src/modules/customers/backend/customers/people/[id]/page.tsx +1 -2
- package/src/modules/customers/backend/customers/people/page.tsx +1 -2
- package/src/modules/customers/backend/customers/people-v2/[id]/page.tsx +10 -29
- package/src/modules/customers/cli.ts +11 -28
- package/src/modules/customers/commands/deals.ts +9 -50
- package/src/modules/customers/commands/people.ts +0 -3
- package/src/modules/customers/components/CustomerTodosTable.tsx +1 -2
- package/src/modules/customers/components/detail/ActiveDealCard.tsx +1 -2
- package/src/modules/customers/components/detail/ActivitiesDayStrip.tsx +3 -2
- package/src/modules/customers/components/detail/CompanyDetailTabs.tsx +7 -30
- package/src/modules/customers/components/detail/CompanyKpiBar.tsx +5 -6
- package/src/modules/customers/components/detail/ConfirmDealLostDialog.tsx +1 -1
- package/src/modules/customers/components/detail/DealDetailTabs.tsx +9 -34
- package/src/modules/customers/components/detail/DealForm.tsx +1 -5
- package/src/modules/customers/components/detail/DealsSection.tsx +1 -1
- package/src/modules/customers/components/detail/PersonDetailTabs.tsx +9 -34
- package/src/modules/customers/components/detail/ScheduleActivityDialog.tsx +13 -28
- package/src/modules/customers/components/detail/dashboard/helpers.ts +3 -4
- package/src/modules/customers/components/formConfig.tsx +8 -12
- package/src/modules/customers/data/entities.ts +1 -9
- package/src/modules/customers/data/validators.ts +1 -6
- package/src/modules/customers/i18n/de.json +0 -72
- package/src/modules/customers/i18n/en.json +0 -72
- package/src/modules/customers/i18n/es.json +0 -72
- package/src/modules/customers/i18n/pl.json +0 -72
- package/src/modules/customers/lib/calendar/format.ts +4 -10
- package/src/modules/customers/lib/visibilityFilter.ts +5 -7
- package/src/modules/customers/migrations/.snapshot-open-mercato.json +1 -27
- package/src/modules/customers/search.ts +27 -59
- package/src/modules/dashboards/api/layout/[itemId]/route.ts +3 -6
- package/src/modules/dashboards/api/layout/route.ts +9 -22
- package/src/modules/dashboards/api/roles/widgets/route.ts +3 -9
- package/src/modules/dashboards/api/users/widgets/route.ts +3 -9
- package/src/modules/dashboards/api/widgets/catalog.ts +3 -6
- package/src/modules/dashboards/api/widgets/data/batch/route.ts +1 -12
- package/src/modules/dashboards/api/widgets/data/route.ts +1 -29
- package/src/modules/dashboards/api/widgets/data/schema.ts +19 -49
- package/src/modules/dashboards/i18n/de.json +0 -5
- package/src/modules/dashboards/i18n/en.json +0 -5
- package/src/modules/dashboards/i18n/es.json +0 -5
- package/src/modules/dashboards/i18n/pl.json +0 -5
- package/src/modules/dashboards/lib/access.ts +3 -5
- package/src/modules/dashboards/lib/aggregations.ts +48 -198
- package/src/modules/dashboards/lib/formatters.ts +12 -137
- package/src/modules/dashboards/services/widgetDataService.ts +12 -453
- package/src/modules/dashboards/widgets/dashboard/aov-kpi/widget.client.tsx +3 -9
- package/src/modules/dashboards/widgets/dashboard/pipeline-summary/config.ts +0 -86
- package/src/modules/dashboards/widgets/dashboard/pipeline-summary/widget.client.tsx +21 -42
- package/src/modules/dashboards/widgets/dashboard/pipeline-summary/widget.ts +2 -2
- package/src/modules/dashboards/widgets/dashboard/revenue-kpi/widget.client.tsx +3 -9
- package/src/modules/dashboards/widgets/dashboard/revenue-trend/widget.client.tsx +2 -7
- package/src/modules/dashboards/widgets/dashboard/sales-by-region/widget.client.tsx +15 -25
- package/src/modules/dashboards/widgets/dashboard/top-customers/widget.client.tsx +11 -21
- package/src/modules/dashboards/widgets/dashboard/top-products/widget.client.tsx +3 -9
- package/src/modules/data_sync/AGENTS.md +0 -1
- package/src/modules/data_sync/api/mappings/[id]/route.ts +9 -22
- package/src/modules/data_sync/api/mappings/route.ts +4 -13
- package/src/modules/data_sync/api/options.ts +2 -7
- package/src/modules/data_sync/api/run.ts +2 -7
- package/src/modules/data_sync/api/runs/[id]/cancel.ts +3 -8
- package/src/modules/data_sync/api/runs/[id]/retry.ts +2 -7
- package/src/modules/data_sync/api/runs/[id]/route.ts +3 -8
- package/src/modules/data_sync/api/runs.ts +2 -7
- package/src/modules/data_sync/api/schedules/[id]/route.ts +6 -19
- package/src/modules/data_sync/api/schedules/route.ts +4 -13
- package/src/modules/data_sync/api/validate.ts +4 -9
- package/src/modules/data_sync/backend/data-sync/page.tsx +1 -2
- package/src/modules/data_sync/lib/adapter.ts +0 -18
- package/src/modules/data_sync/lib/queue.ts +1 -19
- package/src/modules/data_sync/lib/start-run.ts +1 -2
- package/src/modules/data_sync/lib/sync-engine.ts +0 -46
- package/src/modules/data_sync/lib/sync-run-service.ts +1 -82
- package/src/modules/data_sync/workers/sync-export.ts +1 -8
- package/src/modules/data_sync/workers/sync-import.ts +1 -8
- package/src/modules/dictionaries/api/[dictionaryId]/entries/route.ts +11 -39
- package/src/modules/dictionaries/api/openapi.ts +0 -19
- package/src/modules/dictionaries/components/DictionaryEntrySelect.tsx +1 -1
- package/src/modules/dictionaries/components/hooks/useDictionaryEntries.ts +36 -35
- package/src/modules/dictionaries/data/validators.ts +0 -14
- package/src/modules/dictionaries/lib/clientEntries.ts +3 -4
- package/src/modules/directory/api/organization-branding/route.ts +1 -12
- package/src/modules/directory/api/organization-switcher/route.ts +26 -97
- package/src/modules/directory/api/organizations/route.ts +0 -7
- package/src/modules/directory/api/tenants/route.ts +1 -9
- package/src/modules/directory/backend/directory/branding/page.tsx +9 -34
- package/src/modules/directory/backend/directory/organizations/[id]/edit/page.tsx +14 -10
- package/src/modules/directory/backend/directory/organizations/page.tsx +1 -2
- package/src/modules/directory/backend/directory/tenants/page.tsx +1 -2
- package/src/modules/directory/commands/organizations.ts +1 -9
- package/src/modules/directory/commands/tenants.ts +0 -6
- package/src/modules/directory/data/entities.ts +0 -3
- package/src/modules/directory/data/validators.ts +0 -2
- package/src/modules/directory/i18n/de.json +1 -4
- package/src/modules/directory/i18n/en.json +1 -4
- package/src/modules/directory/i18n/es.json +1 -4
- package/src/modules/directory/i18n/pl.json +1 -4
- package/src/modules/directory/migrations/.snapshot-open-mercato.json +1 -18
- package/src/modules/directory/subscribers/invalidateOrgScopeCache.ts +1 -4
- package/src/modules/directory/utils/organizationScope.ts +3 -9
- package/src/modules/entities/api/definitions.ts +3 -55
- package/src/modules/entities/api/entities.ts +2 -30
- package/src/modules/entities/api/entity-settings.ts +22 -66
- package/src/modules/entities/api/records.ts +27 -3
- package/src/modules/entities/api/relations/options.ts +25 -11
- package/src/modules/entities/api/sidebar-entities.ts +14 -43
- package/src/modules/entities/backend/entities/user/[entityId]/records/page.tsx +75 -96
- package/src/modules/entities/backend/entities/user/create/page.tsx +7 -16
- package/src/modules/entities/cli.ts +21 -238
- package/src/modules/entities/components/SystemEntitiesTable.tsx +1 -2
- package/src/modules/entities/components/UserEntitiesTable.tsx +1 -2
- package/src/modules/entities/i18n/de.json +0 -9
- package/src/modules/entities/i18n/en.json +0 -9
- package/src/modules/entities/i18n/es.json +0 -9
- package/src/modules/entities/i18n/pl.json +0 -9
- package/src/modules/entities/lib/entityAcl.ts +11 -98
- package/src/modules/feature_toggles/components/FeatureGuard.tsx +2 -9
- package/src/modules/feature_toggles/components/hooks/useFeatureFlagBoolean.ts +1 -13
- package/src/modules/feature_toggles/components/hooks/useFeatureFlagJson.ts +3 -12
- package/src/modules/feature_toggles/components/hooks/useFeatureFlagNumber.ts +1 -10
- package/src/modules/feature_toggles/components/hooks/useFeatureFlagString.ts +1 -10
- package/src/modules/inbox_ops/ai-tools.ts +3 -5
- package/src/modules/inbox_ops/api/proposals/[id]/actions/[actionId]/route.ts +1 -17
- package/src/modules/inbox_ops/api/proposals/route.ts +1 -20
- package/src/modules/inbox_ops/api/webhook/inbound.ts +12 -14
- package/src/modules/inbox_ops/backend/inbox-ops/log/page.tsx +6 -6
- package/src/modules/inbox_ops/components/proposals/EditActionDialog.tsx +19 -24
- package/src/modules/inbox_ops/components/proposals/types.ts +0 -1
- package/src/modules/inbox_ops/i18n/de.json +0 -3
- package/src/modules/inbox_ops/i18n/en.json +0 -3
- package/src/modules/inbox_ops/i18n/es.json +0 -3
- package/src/modules/inbox_ops/i18n/pl.json +0 -3
- package/src/modules/inbox_ops/search.ts +4 -20
- package/src/modules/integrations/api/[id]/credentials/route.ts +5 -11
- package/src/modules/integrations/api/[id]/health/route.ts +3 -6
- package/src/modules/integrations/api/[id]/route.ts +3 -6
- package/src/modules/integrations/api/[id]/state/route.ts +3 -6
- package/src/modules/integrations/api/[id]/version/route.ts +3 -6
- package/src/modules/integrations/api/logs/route.ts +3 -6
- package/src/modules/integrations/api/route.ts +3 -6
- package/src/modules/integrations/api/umes-read.ts +2 -2
- package/src/modules/integrations/backend/integrations/[id]/page.tsx +2 -2
- package/src/modules/integrations/lib/organization-scope.ts +25 -5
- package/src/modules/integrations/widgets/injection/external-ids/widget.client.tsx +5 -0
- package/src/modules/messages/api/[id]/route.ts +0 -21
- package/src/modules/messages/api/route.ts +9 -109
- package/src/modules/messages/components/ComposeMessagePageClient.tsx +1 -2
- package/src/modules/messages/components/MessageDetailPageClient.tsx +2 -3
- package/src/modules/messages/components/MessagesInboxPageClient.tsx +1 -2
- package/src/modules/messages/components/message-detail/panels/dialogs.tsx +1 -1
- package/src/modules/messages/i18n/de.json +0 -2
- package/src/modules/messages/i18n/en.json +0 -2
- package/src/modules/messages/i18n/es.json +0 -2
- package/src/modules/messages/i18n/pl.json +0 -2
- package/src/modules/messages/lib/routeHelpers.ts +6 -4
- package/src/modules/messages/lib/searchLookup.ts +34 -11
- package/src/modules/messages/search.ts +5 -11
- package/src/modules/notifications/api/route.ts +3 -123
- package/src/modules/notifications/api/unread-count/route.ts +5 -42
- package/src/modules/notifications/di.ts +1 -1
- package/src/modules/notifications/events.ts +0 -2
- package/src/modules/notifications/lib/notificationRecipients.ts +8 -6
- package/src/modules/notifications/lib/notificationService.ts +1 -63
- package/src/modules/notifications/lib/routeHelpers.ts +2 -19
- package/src/modules/payment_gateways/api/capture/route.ts +1 -1
- package/src/modules/payment_gateways/api/sessions/route.ts +3 -6
- package/src/modules/payment_gateways/api/webhook/[provider]/route.ts +1 -13
- package/src/modules/payment_gateways/backend/payment-gateways/page.tsx +2 -3
- package/src/modules/payment_gateways/data/entities.ts +2 -13
- package/src/modules/payment_gateways/di.ts +2 -28
- package/src/modules/payment_gateways/i18n/de.json +1 -8
- package/src/modules/payment_gateways/i18n/en.json +1 -8
- package/src/modules/payment_gateways/i18n/es.json +1 -8
- package/src/modules/payment_gateways/i18n/pl.json +1 -8
- package/src/modules/payment_gateways/lib/gateway-service.ts +18 -114
- package/src/modules/payment_gateways/lib/payment-operation-idempotency.ts +0 -1
- package/src/modules/payment_gateways/lib/session-idempotency.ts +0 -36
- package/src/modules/payment_gateways/migrations/.snapshot-open-mercato.json +1 -44
- package/src/modules/payment_gateways/setup.ts +0 -62
- package/src/modules/planner/components/AvailabilityRulesEditor.tsx +4 -4
- package/src/modules/planner/components/unavailabilityReasons.ts +3 -3
- package/src/modules/portal/frontend/[orgSlug]/portal/dashboard/page.tsx +3 -3
- package/src/modules/portal/frontend/[orgSlug]/portal/login/page.tsx +3 -3
- package/src/modules/portal/frontend/[orgSlug]/portal/page.tsx +3 -3
- package/src/modules/portal/frontend/[orgSlug]/portal/profile/page.tsx +3 -3
- package/src/modules/portal/frontend/[orgSlug]/portal/reset-password/page.tsx +4 -4
- package/src/modules/portal/frontend/[orgSlug]/portal/signup/page.tsx +3 -3
- package/src/modules/portal/i18n/de.json +0 -18
- package/src/modules/portal/i18n/en.json +0 -18
- package/src/modules/portal/i18n/es.json +0 -18
- package/src/modules/portal/i18n/pl.json +0 -18
- package/src/modules/progress/AGENTS.md +1 -11
- package/src/modules/progress/lib/progressService.ts +0 -1
- package/src/modules/progress/lib/progressServiceImpl.ts +117 -385
- package/src/modules/query_index/api/openapi.ts +0 -12
- package/src/modules/query_index/api/reindex.ts +0 -15
- package/src/modules/query_index/api/status.ts +136 -238
- package/src/modules/query_index/cli.ts +1 -180
- package/src/modules/query_index/components/QueryIndexesTable.tsx +47 -194
- package/src/modules/query_index/data/entities.ts +0 -7
- package/src/modules/query_index/di.ts +0 -6
- package/src/modules/query_index/i18n/de.json +3 -5
- package/src/modules/query_index/i18n/en.json +3 -5
- package/src/modules/query_index/i18n/es.json +3 -5
- package/src/modules/query_index/i18n/pl.json +3 -5
- package/src/modules/query_index/lib/batch.ts +4 -11
- package/src/modules/query_index/lib/coverage.ts +14 -47
- package/src/modules/query_index/lib/document.ts +4 -35
- package/src/modules/query_index/lib/engine.ts +59 -136
- package/src/modules/query_index/lib/indexer.ts +21 -130
- package/src/modules/query_index/lib/reindexer.ts +40 -62
- package/src/modules/query_index/lib/search-tokens.ts +16 -48
- package/src/modules/query_index/lib/subscriber-scope.ts +7 -2
- package/src/modules/query_index/migrations/.snapshot-open-mercato.json +0 -12
- package/src/modules/query_index/subscribers/coverage_refresh.ts +0 -4
- package/src/modules/query_index/subscribers/delete_one.ts +1 -65
- package/src/modules/query_index/subscribers/upsert_one.ts +1 -68
- package/src/modules/resources/api/resources.ts +0 -2
- package/src/modules/resources/backend/resources/resource-types/page.tsx +1 -2
- package/src/modules/resources/backend/resources/resources/[id]/page.tsx +3 -9
- package/src/modules/resources/backend/resources/resources/page.tsx +1 -2
- package/src/modules/resources/commands/resources.ts +0 -10
- package/src/modules/resources/components/detail/dictionaries.ts +3 -3
- package/src/modules/resources/data/entities.ts +0 -3
- package/src/modules/resources/data/validators.ts +0 -5
- package/src/modules/resources/lib/seeds.ts +9 -16
- package/src/modules/resources/migrations/.snapshot-open-mercato.json +1 -17
- package/src/modules/sales/analytics.ts +0 -4
- package/src/modules/sales/api/document-history/route.ts +0 -1
- package/src/modules/sales/api/documents/factory.ts +3 -28
- package/src/modules/sales/backend/sales/documents/[id]/page.tsx +3 -11
- package/src/modules/sales/backend/sales/documents/create/page.tsx +4 -2
- package/src/modules/sales/commands/documents.ts +31 -298
- package/src/modules/sales/components/documents/ItemsSection.tsx +11 -21
- package/src/modules/sales/components/documents/LineItemDialog.tsx +5 -13
- package/src/modules/sales/components/documents/SalesDocumentForm.tsx +6 -48
- package/src/modules/sales/components/documents/SalesDocumentsTable.tsx +1 -6
- package/src/modules/sales/components/useSalesChannelsEnabled.ts +48 -2
- package/src/modules/sales/data/validators.ts +6 -59
- package/src/modules/sales/di.ts +0 -9
- package/src/modules/sales/events.ts +0 -1
- package/src/modules/sales/i18n/de.json +0 -22
- package/src/modules/sales/i18n/en.json +0 -22
- package/src/modules/sales/i18n/es.json +0 -22
- package/src/modules/sales/i18n/pl.json +0 -22
- package/src/modules/sales/lib/historyHelpers.ts +1 -88
- package/src/modules/sales/widgets/injection/document-history/widget.client.tsx +3 -64
- package/src/modules/sales/workflows.ts +7 -10
- package/src/modules/shipping_carriers/api/webhook/[provider]/route.ts +1 -11
- package/src/modules/shipping_carriers/lib/shipment-wizard/components/PackageEditor.tsx +1 -1
- package/src/modules/staff/api/interceptors.ts +4 -6
- package/src/modules/staff/api/leave-requests.ts +47 -54
- package/src/modules/staff/components/detail/dictionaries.ts +3 -3
- package/src/modules/sync_excel/api/upload/route.ts +2 -15
- package/src/modules/wms/components/backend/ReleaseReservationDialog.tsx +1 -1
- package/src/modules/wms/components/backend/WmsConfigurationPage.tsx +4 -5
- package/src/modules/wms/components/backend/WmsInventoryConsolePage.tsx +3 -4
- package/src/modules/wms/components/backend/WmsLocationDetailPage.tsx +2 -3
- package/src/modules/wms/components/backend/WmsLotDetailPage.tsx +2 -3
- package/src/modules/wms/components/backend/WmsLotsListPage.tsx +1 -2
- package/src/modules/wms/components/backend/WmsSkuDetailPage.tsx +2 -3
- package/src/modules/wms/i18n/de.json +0 -2
- package/src/modules/wms/i18n/en.json +0 -2
- package/src/modules/wms/i18n/es.json +0 -2
- package/src/modules/wms/i18n/pl.json +0 -2
- package/src/modules/workflows/backend/definitions/page.tsx +2 -3
- package/src/modules/workflows/backend/definitions/visual-editor/page.tsx +4 -13
- package/src/modules/workflows/backend/instances/page.tsx +9 -10
- package/src/modules/workflows/backend/tasks/page.tsx +7 -8
- package/src/modules/workflows/components/ActivitiesEditor.tsx +14 -98
- package/src/modules/workflows/components/BusinessRulesSelector.tsx +1 -1
- package/src/modules/workflows/components/DefinitionTriggersEditor.tsx +2 -2
- package/src/modules/workflows/components/EdgeEditDialogCrudForm.tsx +2 -1
- package/src/modules/workflows/components/NodeEditDialogCrudForm.tsx +2 -1
- package/src/modules/workflows/components/StepsEditor.tsx +2 -2
- package/src/modules/workflows/components/TransitionsEditor.tsx +20 -78
- package/src/modules/workflows/components/WorkflowLegend.tsx +1 -1
- package/src/modules/workflows/components/WorkflowSelector.tsx +1 -1
- package/src/modules/workflows/components/fields/BusinessRuleConditionsEditor.tsx +1 -1
- package/src/modules/workflows/components/fields/FormFieldArrayEditor.tsx +1 -1
- package/src/modules/workflows/components/fields/MappingArrayEditor.tsx +1 -1
- package/src/modules/workflows/components/fields/StartPreConditionsEditor.tsx +1 -1
- package/src/modules/workflows/components/fields/WorkflowSelectorField.tsx +4 -4
- package/src/modules/workflows/data/validators.ts +1 -52
- package/src/modules/workflows/events.ts +0 -1
- package/src/modules/workflows/i18n/de.json +0 -3
- package/src/modules/workflows/i18n/en.json +0 -3
- package/src/modules/workflows/i18n/es.json +0 -3
- package/src/modules/workflows/i18n/pl.json +0 -3
- package/src/modules/workflows/lib/activity-executor.ts +20 -99
- package/src/modules/workflows/lib/format-validation-error.ts +0 -60
- package/src/modules/workflows/widgets/injection/order-approval/widget.client.tsx +11 -27
- package/dist/generated/entities/attachment_quota_reservation/index.js +0 -33
- package/dist/generated/entities/attachment_quota_reservation/index.js.map +0 -7
- package/dist/modules/api_keys/extension-points.js +0 -16
- package/dist/modules/api_keys/extension-points.js.map +0 -7
- package/dist/modules/attachments/lib/quota-recovery-queue.js +0 -9
- package/dist/modules/attachments/lib/quota-recovery-queue.js.map +0 -7
- package/dist/modules/attachments/lib/quota-service.js +0 -224
- package/dist/modules/attachments/lib/quota-service.js.map +0 -7
- package/dist/modules/attachments/migrations/Migration20260709234741_attachments.js +0 -13
- package/dist/modules/attachments/migrations/Migration20260709234741_attachments.js.map +0 -7
- package/dist/modules/attachments/workers/quota-recovery.js +0 -45
- package/dist/modules/attachments/workers/quota-recovery.js.map +0 -7
- package/dist/modules/audit_logs/api/audit-logs/readScope.js +0 -12
- package/dist/modules/audit_logs/api/audit-logs/readScope.js.map +0 -7
- package/dist/modules/audit_logs/extension-points.js +0 -14
- package/dist/modules/audit_logs/extension-points.js.map +0 -7
- package/dist/modules/auth/extension-points.js +0 -21
- package/dist/modules/auth/extension-points.js.map +0 -7
- package/dist/modules/business_rules/api/openmercato-call-options/route.js +0 -85
- package/dist/modules/business_rules/api/openmercato-call-options/route.js.map +0 -7
- package/dist/modules/business_rules/events.js +0 -13
- package/dist/modules/business_rules/events.js.map +0 -7
- package/dist/modules/business_rules/extension-points.js +0 -13
- package/dist/modules/business_rules/extension-points.js.map +0 -7
- package/dist/modules/business_rules/lib/openmercato-call-options-types.js +0 -5
- package/dist/modules/business_rules/lib/openmercato-call-options-types.js.map +0 -7
- package/dist/modules/business_rules/lib/openmercato-call-options.js +0 -231
- package/dist/modules/business_rules/lib/openmercato-call-options.js.map +0 -7
- package/dist/modules/catalog/extension-points.js +0 -27
- package/dist/modules/catalog/extension-points.js.map +0 -7
- package/dist/modules/communication_channels/extension-points.js +0 -20
- package/dist/modules/communication_channels/extension-points.js.map +0 -7
- package/dist/modules/configs/extension-points.js +0 -18
- package/dist/modules/configs/extension-points.js.map +0 -7
- package/dist/modules/currencies/extension-points.js +0 -14
- package/dist/modules/currencies/extension-points.js.map +0 -7
- package/dist/modules/currencies/services/baseCurrencyService.js +0 -42
- package/dist/modules/currencies/services/baseCurrencyService.js.map +0 -7
- package/dist/modules/customer_accounts/emails/CustomerInvitationEmail.js +0 -26
- package/dist/modules/customer_accounts/emails/CustomerInvitationEmail.js.map +0 -7
- package/dist/modules/customer_accounts/extension-points.js +0 -14
- package/dist/modules/customer_accounts/extension-points.js.map +0 -7
- package/dist/modules/customer_accounts/lib/invitationEmail.js +0 -35
- package/dist/modules/customer_accounts/lib/invitationEmail.js.map +0 -7
- package/dist/modules/customer_accounts/migrations/Migration20260723120000_customer_accounts.js +0 -13
- package/dist/modules/customer_accounts/migrations/Migration20260723120000_customer_accounts.js.map +0 -7
- package/dist/modules/customers/extension-points.js +0 -42
- package/dist/modules/customers/extension-points.js.map +0 -7
- package/dist/modules/customers/lib/dealStatus.js +0 -38
- package/dist/modules/customers/lib/dealStatus.js.map +0 -7
- package/dist/modules/customers/lib/dealsSummaryQueries.js +0 -144
- package/dist/modules/customers/lib/dealsSummaryQueries.js.map +0 -7
- package/dist/modules/customers/lib/optionalBaseCurrency.js +0 -19
- package/dist/modules/customers/lib/optionalBaseCurrency.js.map +0 -7
- package/dist/modules/customers/migrations/Migration20260723210000_customers.js +0 -15
- package/dist/modules/customers/migrations/Migration20260723210000_customers.js.map +0 -7
- package/dist/modules/dashboards/components/UnlabelledAmountNotice.js +0 -33
- package/dist/modules/dashboards/components/UnlabelledAmountNotice.js.map +0 -7
- package/dist/modules/dashboards/lib/exactDecimal.js +0 -69
- package/dist/modules/dashboards/lib/exactDecimal.js.map +0 -7
- package/dist/modules/dashboards/lib/optionalBaseCurrency.js +0 -11
- package/dist/modules/dashboards/lib/optionalBaseCurrency.js.map +0 -7
- package/dist/modules/dashboards/subscribers/invalidateWidgetDataCache.js +0 -26
- package/dist/modules/dashboards/subscribers/invalidateWidgetDataCache.js.map +0 -7
- package/dist/modules/data_sync/extension-points.js +0 -13
- package/dist/modules/data_sync/extension-points.js.map +0 -7
- package/dist/modules/data_sync/lib/queue-policy.js +0 -15
- package/dist/modules/data_sync/lib/queue-policy.js.map +0 -7
- package/dist/modules/design_system/acl.js +0 -9
- package/dist/modules/design_system/acl.js.map +0 -7
- package/dist/modules/design_system/backend/design-system/page.js +0 -11
- package/dist/modules/design_system/backend/design-system/page.js.map +0 -7
- package/dist/modules/design_system/backend/design-system/page.meta.js +0 -15
- package/dist/modules/design_system/backend/design-system/page.meta.js.map +0 -7
- package/dist/modules/design_system/gallery/components/CodeSnippet.js +0 -52
- package/dist/modules/design_system/gallery/components/CodeSnippet.js.map +0 -7
- package/dist/modules/design_system/gallery/components/EntryCard.js +0 -63
- package/dist/modules/design_system/gallery/components/EntryCard.js.map +0 -7
- package/dist/modules/design_system/gallery/components/GalleryShell.js +0 -163
- package/dist/modules/design_system/gallery/components/GalleryShell.js.map +0 -7
- package/dist/modules/design_system/gallery/components/VariantPreview.js +0 -9
- package/dist/modules/design_system/gallery/components/VariantPreview.js.map +0 -7
- package/dist/modules/design_system/gallery/entries/banners.js +0 -186
- package/dist/modules/design_system/gallery/entries/banners.js.map +0 -7
- package/dist/modules/design_system/gallery/entries/buttons.js +0 -361
- package/dist/modules/design_system/gallery/entries/buttons.js.map +0 -7
- package/dist/modules/design_system/gallery/entries/charts.js +0 -457
- package/dist/modules/design_system/gallery/entries/charts.js.map +0 -7
- package/dist/modules/design_system/gallery/entries/dates.js +0 -306
- package/dist/modules/design_system/gallery/entries/dates.js.map +0 -7
- package/dist/modules/design_system/gallery/entries/detail.js +0 -358
- package/dist/modules/design_system/gallery/entries/detail.js.map +0 -7
- package/dist/modules/design_system/gallery/entries/display.js +0 -785
- package/dist/modules/design_system/gallery/entries/display.js.map +0 -7
- package/dist/modules/design_system/gallery/entries/feedback.js +0 -658
- package/dist/modules/design_system/gallery/entries/feedback.js.map +0 -7
- package/dist/modules/design_system/gallery/entries/filters.js +0 -505
- package/dist/modules/design_system/gallery/entries/filters.js.map +0 -7
- package/dist/modules/design_system/gallery/entries/foundations.js +0 -453
- package/dist/modules/design_system/gallery/entries/foundations.js.map +0 -7
- package/dist/modules/design_system/gallery/entries/icons.js +0 -140
- package/dist/modules/design_system/gallery/entries/icons.js.map +0 -7
- package/dist/modules/design_system/gallery/entries/inputs.js +0 -1217
- package/dist/modules/design_system/gallery/entries/inputs.js.map +0 -7
- package/dist/modules/design_system/gallery/entries/messages.js +0 -334
- package/dist/modules/design_system/gallery/entries/messages.js.map +0 -7
- package/dist/modules/design_system/gallery/entries/navigation.js +0 -475
- package/dist/modules/design_system/gallery/entries/navigation.js.map +0 -7
- package/dist/modules/design_system/gallery/entries/notifications.js +0 -257
- package/dist/modules/design_system/gallery/entries/notifications.js.map +0 -7
- package/dist/modules/design_system/gallery/entries/overlays.js +0 -576
- package/dist/modules/design_system/gallery/entries/overlays.js.map +0 -7
- package/dist/modules/design_system/gallery/entries/scaffolding.js +0 -378
- package/dist/modules/design_system/gallery/entries/scaffolding.js.map +0 -7
- package/dist/modules/design_system/gallery/entries/schedule.js +0 -297
- package/dist/modules/design_system/gallery/entries/schedule.js.map +0 -7
- package/dist/modules/design_system/gallery/registry.js +0 -139
- package/dist/modules/design_system/gallery/registry.js.map +0 -7
- package/dist/modules/design_system/gallery/types.js +0 -1
- package/dist/modules/design_system/gallery/types.js.map +0 -7
- package/dist/modules/design_system/index.js +0 -9
- package/dist/modules/design_system/index.js.map +0 -7
- package/dist/modules/design_system/setup.js +0 -14
- package/dist/modules/design_system/setup.js.map +0 -7
- package/dist/modules/dictionaries/lib/fetchAllEntries.js +0 -43
- package/dist/modules/dictionaries/lib/fetchAllEntries.js.map +0 -7
- package/dist/modules/directory/extension-points.js +0 -14
- package/dist/modules/directory/extension-points.js.map +0 -7
- package/dist/modules/directory/migrations/Migration20260626145500_directory_logo_preserve_aspect_ratio.js +0 -13
- package/dist/modules/directory/migrations/Migration20260626145500_directory_logo_preserve_aspect_ratio.js.map +0 -7
- package/dist/modules/entities/backend/config/settings/page.js +0 -10
- package/dist/modules/entities/backend/config/settings/page.js.map +0 -7
- package/dist/modules/entities/backend/config/settings/page.meta.js +0 -36
- package/dist/modules/entities/backend/config/settings/page.meta.js.map +0 -7
- package/dist/modules/entities/components/EntitySettingsManager.js +0 -136
- package/dist/modules/entities/components/EntitySettingsManager.js.map +0 -7
- package/dist/modules/entities/components/RecordListRelationCell.js +0 -63
- package/dist/modules/entities/components/RecordListRelationCell.js.map +0 -7
- package/dist/modules/entities/components/recordListRelationDisplays.js +0 -80
- package/dist/modules/entities/components/recordListRelationDisplays.js.map +0 -7
- package/dist/modules/entities/extension-points.js +0 -21
- package/dist/modules/entities/extension-points.js.map +0 -7
- package/dist/modules/feature_toggles/components/hooks/staleTime.js +0 -5
- package/dist/modules/feature_toggles/components/hooks/staleTime.js.map +0 -7
- package/dist/modules/inbox_ops/subscribers/search-reindex-proposal-created.js +0 -32
- package/dist/modules/inbox_ops/subscribers/search-reindex-proposal-created.js.map +0 -7
- package/dist/modules/integrations/extension-points.js +0 -30
- package/dist/modules/integrations/extension-points.js.map +0 -7
- package/dist/modules/integrations/widgets/injection/external-ids/widget.js +0 -14
- package/dist/modules/integrations/widgets/injection/external-ids/widget.js.map +0 -7
- package/dist/modules/messages/extension-points.js +0 -16
- package/dist/modules/messages/extension-points.js.map +0 -7
- package/dist/modules/messages/lib/participantScope.js +0 -15
- package/dist/modules/messages/lib/participantScope.js.map +0 -7
- package/dist/modules/notifications/lib/notificationScope.js +0 -26
- package/dist/modules/notifications/lib/notificationScope.js.map +0 -7
- package/dist/modules/payment_gateways/extension-points.js +0 -19
- package/dist/modules/payment_gateways/extension-points.js.map +0 -7
- package/dist/modules/payment_gateways/lib/capture-ledger.js +0 -183
- package/dist/modules/payment_gateways/lib/capture-ledger.js.map +0 -7
- package/dist/modules/payment_gateways/lib/order-amount-reconciliation.js +0 -58
- package/dist/modules/payment_gateways/lib/order-amount-reconciliation.js.map +0 -7
- package/dist/modules/payment_gateways/migrations/Migration20260725101500_payment_gateways.js +0 -16
- package/dist/modules/payment_gateways/migrations/Migration20260725101500_payment_gateways.js.map +0 -7
- package/dist/modules/payment_gateways/migrations/Migration20260803103035_payment_gateways.js +0 -18
- package/dist/modules/payment_gateways/migrations/Migration20260803103035_payment_gateways.js.map +0 -7
- package/dist/modules/payment_gateways/workers/session-initialization-prune.js +0 -50
- package/dist/modules/payment_gateways/workers/session-initialization-prune.js.map +0 -7
- package/dist/modules/portal/extension-points.js +0 -32
- package/dist/modules/portal/extension-points.js.map +0 -7
- package/dist/modules/portal/frontend/[orgSlug]/portal/invite/page.js +0 -134
- package/dist/modules/portal/frontend/[orgSlug]/portal/invite/page.js.map +0 -7
- package/dist/modules/portal/frontend/[orgSlug]/portal/invite/page.meta.js +0 -11
- package/dist/modules/portal/frontend/[orgSlug]/portal/invite/page.meta.js.map +0 -7
- package/dist/modules/portal/lib/navigation.js +0 -7
- package/dist/modules/portal/lib/navigation.js.map +0 -7
- package/dist/modules/query_index/events.js +0 -20
- package/dist/modules/query_index/events.js.map +0 -7
- package/dist/modules/query_index/extension-points.js +0 -13
- package/dist/modules/query_index/extension-points.js.map +0 -7
- package/dist/modules/query_index/migrations/Migration20260731105052_query_index.js +0 -17
- package/dist/modules/query_index/migrations/Migration20260731105052_query_index.js.map +0 -7
- package/dist/modules/resources/extension-points.js +0 -14
- package/dist/modules/resources/extension-points.js.map +0 -7
- package/dist/modules/resources/migrations/Migration20260608231000.js +0 -13
- package/dist/modules/resources/migrations/Migration20260608231000.js.map +0 -7
- package/dist/modules/sales/components/documents/SalesOrderDraftLines.js +0 -167
- package/dist/modules/sales/components/documents/SalesOrderDraftLines.js.map +0 -7
- package/dist/modules/sales/extension-points.js +0 -36
- package/dist/modules/sales/extension-points.js.map +0 -7
- package/dist/modules/sales/services/paymentOrderTotalResolver.js +0 -52
- package/dist/modules/sales/services/paymentOrderTotalResolver.js.map +0 -7
- package/dist/modules/wms/extension-points.js +0 -26
- package/dist/modules/wms/extension-points.js.map +0 -7
- package/dist/modules/workflows/extension-points.js +0 -15
- package/dist/modules/workflows/extension-points.js.map +0 -7
- package/dist/modules/workflows/widgets/injection/order-approval/context-keys.js +0 -10
- package/dist/modules/workflows/widgets/injection/order-approval/context-keys.js.map +0 -7
- package/generated/entities/attachment_quota_reservation/index.ts +0 -15
- package/src/modules/api_keys/extension-points.ts +0 -13
- package/src/modules/api_keys/i18n/ko.json +0 -42
- package/src/modules/attachments/i18n/ko.json +0 -175
- package/src/modules/attachments/lib/quota-recovery-queue.ts +0 -16
- package/src/modules/attachments/lib/quota-service.ts +0 -442
- package/src/modules/attachments/migrations/Migration20260709234741_attachments.ts +0 -12
- package/src/modules/attachments/workers/quota-recovery.ts +0 -68
- package/src/modules/audit_logs/api/audit-logs/readScope.ts +0 -28
- package/src/modules/audit_logs/extension-points.ts +0 -11
- package/src/modules/audit_logs/i18n/ko.json +0 -66
- package/src/modules/auth/extension-points.ts +0 -18
- package/src/modules/auth/i18n/ko.json +0 -255
- package/src/modules/business_rules/api/openmercato-call-options/route.ts +0 -94
- package/src/modules/business_rules/events.ts +0 -10
- package/src/modules/business_rules/extension-points.ts +0 -10
- package/src/modules/business_rules/i18n/ko.json +0 -396
- package/src/modules/business_rules/lib/openmercato-call-options-types.ts +0 -31
- package/src/modules/business_rules/lib/openmercato-call-options.ts +0 -297
- package/src/modules/catalog/extension-points.ts +0 -24
- package/src/modules/catalog/i18n/ko.json +0 -723
- package/src/modules/communication_channels/extension-points.ts +0 -17
- package/src/modules/communication_channels/i18n/ko.json +0 -138
- package/src/modules/configs/extension-points.ts +0 -15
- package/src/modules/configs/i18n/ko.json +0 -197
- package/src/modules/currencies/extension-points.ts +0 -11
- package/src/modules/currencies/i18n/ko.json +0 -160
- package/src/modules/currencies/services/baseCurrencyService.ts +0 -59
- package/src/modules/customer_accounts/emails/CustomerInvitationEmail.tsx +0 -45
- package/src/modules/customer_accounts/extension-points.ts +0 -11
- package/src/modules/customer_accounts/i18n/ko.json +0 -354
- package/src/modules/customer_accounts/lib/invitationEmail.ts +0 -42
- package/src/modules/customer_accounts/migrations/Migration20260723120000_customer_accounts.ts +0 -13
- package/src/modules/customers/extension-points.ts +0 -40
- package/src/modules/customers/i18n/ko.json +0 -2855
- package/src/modules/customers/lib/dealStatus.ts +0 -48
- package/src/modules/customers/lib/dealsSummaryQueries.ts +0 -211
- package/src/modules/customers/lib/optionalBaseCurrency.ts +0 -34
- package/src/modules/customers/migrations/Migration20260723210000_customers.ts +0 -15
- package/src/modules/dashboards/components/UnlabelledAmountNotice.tsx +0 -43
- package/src/modules/dashboards/i18n/ko.json +0 -118
- package/src/modules/dashboards/lib/exactDecimal.ts +0 -96
- package/src/modules/dashboards/lib/optionalBaseCurrency.ts +0 -22
- package/src/modules/dashboards/subscribers/invalidateWidgetDataCache.ts +0 -32
- package/src/modules/data_sync/extension-points.ts +0 -10
- package/src/modules/data_sync/i18n/ko.json +0 -125
- package/src/modules/data_sync/lib/queue-policy.ts +0 -30
- package/src/modules/design_system/AGENTS.md +0 -34
- package/src/modules/design_system/acl.ts +0 -5
- package/src/modules/design_system/backend/design-system/page.meta.ts +0 -11
- package/src/modules/design_system/backend/design-system/page.tsx +0 -14
- package/src/modules/design_system/gallery/components/CodeSnippet.tsx +0 -55
- package/src/modules/design_system/gallery/components/EntryCard.tsx +0 -95
- package/src/modules/design_system/gallery/components/GalleryShell.tsx +0 -206
- package/src/modules/design_system/gallery/components/VariantPreview.tsx +0 -15
- package/src/modules/design_system/gallery/entries/banners.tsx +0 -226
- package/src/modules/design_system/gallery/entries/buttons.tsx +0 -422
- package/src/modules/design_system/gallery/entries/charts.tsx +0 -518
- package/src/modules/design_system/gallery/entries/dates.tsx +0 -325
- package/src/modules/design_system/gallery/entries/detail.tsx +0 -403
- package/src/modules/design_system/gallery/entries/display.tsx +0 -893
- package/src/modules/design_system/gallery/entries/feedback.tsx +0 -746
- package/src/modules/design_system/gallery/entries/filters.tsx +0 -570
- package/src/modules/design_system/gallery/entries/foundations.tsx +0 -529
- package/src/modules/design_system/gallery/entries/icons.tsx +0 -168
- package/src/modules/design_system/gallery/entries/inputs.tsx +0 -1516
- package/src/modules/design_system/gallery/entries/messages.tsx +0 -339
- package/src/modules/design_system/gallery/entries/navigation.tsx +0 -573
- package/src/modules/design_system/gallery/entries/notifications.tsx +0 -285
- package/src/modules/design_system/gallery/entries/overlays.tsx +0 -677
- package/src/modules/design_system/gallery/entries/scaffolding.tsx +0 -430
- package/src/modules/design_system/gallery/entries/schedule.tsx +0 -307
- package/src/modules/design_system/gallery/registry.ts +0 -152
- package/src/modules/design_system/gallery/types.ts +0 -32
- package/src/modules/design_system/i18n/.hardcoded-allowlist.json +0 -71
- package/src/modules/design_system/i18n/de.json +0 -58
- package/src/modules/design_system/i18n/en.json +0 -58
- package/src/modules/design_system/i18n/es.json +0 -58
- package/src/modules/design_system/i18n/ko.json +0 -58
- package/src/modules/design_system/i18n/pl.json +0 -58
- package/src/modules/design_system/index.ts +0 -7
- package/src/modules/design_system/setup.ts +0 -12
- package/src/modules/dictionaries/i18n/ko.json +0 -130
- package/src/modules/dictionaries/lib/fetchAllEntries.ts +0 -72
- package/src/modules/directory/extension-points.ts +0 -11
- package/src/modules/directory/i18n/ko.json +0 -105
- package/src/modules/directory/migrations/Migration20260626145500_directory_logo_preserve_aspect_ratio.ts +0 -13
- package/src/modules/entities/backend/config/settings/page.meta.ts +0 -34
- package/src/modules/entities/backend/config/settings/page.tsx +0 -12
- package/src/modules/entities/components/EntitySettingsManager.tsx +0 -160
- package/src/modules/entities/components/RecordListRelationCell.tsx +0 -90
- package/src/modules/entities/components/recordListRelationDisplays.ts +0 -109
- package/src/modules/entities/extension-points.ts +0 -18
- package/src/modules/entities/i18n/ko.json +0 -260
- package/src/modules/feature_toggles/components/hooks/staleTime.ts +0 -5
- package/src/modules/feature_toggles/i18n/ko.json +0 -96
- package/src/modules/inbox_ops/i18n/ko.json +0 -196
- package/src/modules/inbox_ops/subscribers/search-reindex-proposal-created.ts +0 -39
- package/src/modules/integrations/extension-points.ts +0 -27
- package/src/modules/integrations/i18n/ko.json +0 -129
- package/src/modules/integrations/widgets/injection/external-ids/widget.ts +0 -13
- package/src/modules/messages/extension-points.ts +0 -13
- package/src/modules/messages/i18n/ko.json +0 -263
- package/src/modules/messages/lib/participantScope.ts +0 -64
- package/src/modules/notifications/i18n/ko.json +0 -55
- package/src/modules/notifications/lib/notificationScope.ts +0 -40
- package/src/modules/payment_gateways/extension-points.ts +0 -16
- package/src/modules/payment_gateways/i18n/ko.json +0 -87
- package/src/modules/payment_gateways/lib/capture-ledger.ts +0 -260
- package/src/modules/payment_gateways/lib/order-amount-reconciliation.ts +0 -93
- package/src/modules/payment_gateways/migrations/Migration20260725101500_payment_gateways.ts +0 -21
- package/src/modules/payment_gateways/migrations/Migration20260803103035_payment_gateways.ts +0 -17
- package/src/modules/payment_gateways/workers/session-initialization-prune.ts +0 -63
- package/src/modules/planner/i18n/ko.json +0 -565
- package/src/modules/portal/extension-points.ts +0 -30
- package/src/modules/portal/frontend/[orgSlug]/portal/invite/page.meta.ts +0 -9
- package/src/modules/portal/frontend/[orgSlug]/portal/invite/page.tsx +0 -164
- package/src/modules/portal/i18n/ko.json +0 -143
- package/src/modules/portal/lib/navigation.ts +0 -3
- package/src/modules/progress/i18n/ko.json +0 -20
- package/src/modules/query_index/events.ts +0 -17
- package/src/modules/query_index/extension-points.ts +0 -10
- package/src/modules/query_index/i18n/ko.json +0 -69
- package/src/modules/query_index/migrations/Migration20260731105052_query_index.ts +0 -35
- package/src/modules/resources/extension-points.ts +0 -11
- package/src/modules/resources/i18n/ko.json +0 -770
- package/src/modules/resources/migrations/Migration20260608231000.ts +0 -13
- package/src/modules/sales/components/documents/SalesOrderDraftLines.tsx +0 -198
- package/src/modules/sales/extension-points.ts +0 -33
- package/src/modules/sales/i18n/ko.json +0 -1442
- package/src/modules/sales/services/paymentOrderTotalResolver.ts +0 -67
- package/src/modules/shipping_carriers/i18n/ko.json +0 -85
- package/src/modules/staff/i18n/ko.json +0 -1162
- package/src/modules/sync_excel/i18n/ko.json +0 -107
- package/src/modules/translations/i18n/ko.json +0 -45
- package/src/modules/wms/extension-points.ts +0 -23
- package/src/modules/wms/i18n/ko.json +0 -1053
- package/src/modules/workflows/extension-points.ts +0 -12
- package/src/modules/workflows/i18n/ko.json +0 -1204
- package/src/modules/workflows/widgets/injection/order-approval/context-keys.ts +0 -18
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { useWidgetData } from "@open-mercato/ui/backend/dashboard/widgetData";
|
|
5
|
-
import {
|
|
5
|
+
import { useT } from "@open-mercato/shared/lib/i18n/context";
|
|
6
6
|
import { KpiCard } from "@open-mercato/ui/backend/charts";
|
|
7
7
|
import {
|
|
8
8
|
DateRangeSelect,
|
|
@@ -10,8 +10,7 @@ import {
|
|
|
10
10
|
getComparisonLabelKey
|
|
11
11
|
} from "@open-mercato/ui/backend/date-range";
|
|
12
12
|
import { DEFAULT_SETTINGS, hydrateSettings } from "./config.js";
|
|
13
|
-
import {
|
|
14
|
-
import { UnlabelledAmountNotice } from "../../../components/UnlabelledAmountNotice.js";
|
|
13
|
+
import { formatCurrency } from "../../../lib/formatters.js";
|
|
15
14
|
import { createLogger } from "@open-mercato/shared/lib/logger";
|
|
16
15
|
const logger = createLogger("dashboards").child({ component: "revenue-kpi" });
|
|
17
16
|
async function fetchRevenueData(settings, fetchWidgetData) {
|
|
@@ -37,14 +36,11 @@ const RevenueKpiWidget = ({
|
|
|
37
36
|
onRefreshStateChange
|
|
38
37
|
}) => {
|
|
39
38
|
const t = useT();
|
|
40
|
-
const locale = useLocale();
|
|
41
39
|
const hydrated = React.useMemo(() => hydrateSettings(settings), [settings]);
|
|
42
40
|
const [value, setValue] = React.useState(null);
|
|
43
41
|
const [trend, setTrend] = React.useState(void 0);
|
|
44
|
-
const [currency, setCurrency] = React.useState(null);
|
|
45
42
|
const [loading, setLoading] = React.useState(true);
|
|
46
43
|
const [error, setError] = React.useState(null);
|
|
47
|
-
const money = React.useMemo(() => createCurrencyFormatters(currency, "--", locale), [currency, locale]);
|
|
48
44
|
const fetchWidgetData = useWidgetData();
|
|
49
45
|
const refresh = React.useCallback(async () => {
|
|
50
46
|
onRefreshStateChange?.(true);
|
|
@@ -53,7 +49,6 @@ const RevenueKpiWidget = ({
|
|
|
53
49
|
try {
|
|
54
50
|
const data = await fetchRevenueData(hydrated, fetchWidgetData);
|
|
55
51
|
setValue(data.value);
|
|
56
|
-
setCurrency(data.metadata?.currency ?? null);
|
|
57
52
|
if (data.comparison) {
|
|
58
53
|
setTrend({
|
|
59
54
|
value: data.comparison.change,
|
|
@@ -109,8 +104,7 @@ const RevenueKpiWidget = ({
|
|
|
109
104
|
comparisonLabel,
|
|
110
105
|
loading,
|
|
111
106
|
error,
|
|
112
|
-
formatValue:
|
|
113
|
-
footer: /* @__PURE__ */ jsx(UnlabelledAmountNotice, { currency, loading, error }),
|
|
107
|
+
formatValue: formatCurrency,
|
|
114
108
|
headerAction: /* @__PURE__ */ jsx(
|
|
115
109
|
InlineDateRangeSelect,
|
|
116
110
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/modules/dashboards/widgets/dashboard/revenue-kpi/widget.client.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport type { DashboardWidgetComponentProps } from '@open-mercato/shared/modules/dashboard/widgets'\nimport { useWidgetData, type WidgetDataFetcher } from '@open-mercato/ui/backend/dashboard/widgetData'\nimport {
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport type { DashboardWidgetComponentProps } from '@open-mercato/shared/modules/dashboard/widgets'\nimport { useWidgetData, type WidgetDataFetcher } from '@open-mercato/ui/backend/dashboard/widgetData'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\nimport { KpiCard, type KpiTrend } from '@open-mercato/ui/backend/charts'\nimport {\n DateRangeSelect,\n InlineDateRangeSelect,\n type DateRangePreset,\n getComparisonLabelKey,\n} from '@open-mercato/ui/backend/date-range'\nimport { DEFAULT_SETTINGS, hydrateSettings, type RevenueKpiSettings } from './config'\nimport type { WidgetDataResponse } from '../../../services/widgetDataService'\nimport { formatCurrency } from '../../../lib/formatters'\nimport { createLogger } from '@open-mercato/shared/lib/logger'\n\nconst logger = createLogger('dashboards').child({ component: 'revenue-kpi' })\n\nasync function fetchRevenueData(settings: RevenueKpiSettings, fetchWidgetData: WidgetDataFetcher): Promise<WidgetDataResponse> {\n const body = {\n entityType: 'sales:orders',\n metric: {\n field: 'grandTotalGrossAmount',\n aggregate: 'sum',\n },\n dateRange: {\n field: 'placedAt',\n preset: settings.dateRange,\n },\n comparison: settings.showComparison ? { type: 'previous_period' } : undefined,\n }\n\n return fetchWidgetData<WidgetDataResponse>(body)\n}\n\nconst RevenueKpiWidget: React.FC<DashboardWidgetComponentProps<RevenueKpiSettings>> = ({\n mode,\n settings = DEFAULT_SETTINGS,\n onSettingsChange,\n refreshToken,\n onRefreshStateChange,\n}) => {\n const t = useT()\n const hydrated = React.useMemo(() => hydrateSettings(settings), [settings])\n const [value, setValue] = React.useState<number | null>(null)\n const [trend, setTrend] = React.useState<KpiTrend | undefined>(undefined)\n const [loading, setLoading] = React.useState(true)\n const [error, setError] = React.useState<string | null>(null)\n\n const fetchWidgetData = useWidgetData()\n const refresh = React.useCallback(async () => {\n onRefreshStateChange?.(true)\n setLoading(true)\n setError(null)\n try {\n const data = await fetchRevenueData(hydrated, fetchWidgetData)\n setValue(data.value)\n if (data.comparison) {\n setTrend({\n value: data.comparison.change,\n direction: data.comparison.direction,\n })\n } else {\n setTrend(undefined)\n }\n } catch (err) {\n logger.error('Failed to load revenue KPI data', { err })\n setError(t('dashboards.analytics.widgets.revenueKpi.error', 'Failed to load data'))\n } finally {\n setLoading(false)\n onRefreshStateChange?.(false)\n }\n }, [hydrated, fetchWidgetData, onRefreshStateChange, t])\n\n React.useEffect(() => {\n refresh().catch(() => {})\n }, [refresh, refreshToken])\n\n if (mode === 'settings') {\n return (\n <div className=\"space-y-4 text-sm\">\n <DateRangeSelect\n id=\"revenue-kpi-date-range\"\n label={t('dashboards.analytics.settings.dateRange', 'Date Range')}\n value={hydrated.dateRange}\n onChange={(dateRange: DateRangePreset) => onSettingsChange({ ...hydrated, dateRange })}\n />\n <div className=\"space-y-1.5\">\n <label className=\"flex items-center gap-2 text-sm\">\n <input\n type=\"checkbox\"\n checked={hydrated.showComparison}\n onChange={(e) => onSettingsChange({ ...hydrated, showComparison: e.target.checked })}\n className=\"h-4 w-4 rounded border focus-visible:ring-ring\"\n />\n {t('dashboards.analytics.settings.showComparison', 'Show comparison')}\n </label>\n </div>\n </div>\n )\n }\n\n const comparisonLabelInfo = getComparisonLabelKey(hydrated.dateRange)\n const comparisonLabel = hydrated.showComparison\n ? t(comparisonLabelInfo.key, comparisonLabelInfo.fallback)\n : undefined\n\n return (\n <KpiCard\n value={value}\n trend={trend}\n comparisonLabel={comparisonLabel}\n loading={loading}\n error={error}\n formatValue={formatCurrency}\n headerAction={\n <InlineDateRangeSelect\n value={hydrated.dateRange}\n onChange={(dateRange) => onSettingsChange({ ...hydrated, dateRange })}\n />\n }\n />\n )\n}\n\nexport default RevenueKpiWidget\n"],
|
|
5
|
+
"mappings": ";AAmFQ,cAOE,YAPF;AAjFR,YAAY,WAAW;AAEvB,SAAS,qBAA6C;AACtD,SAAS,YAAY;AACrB,SAAS,eAA8B;AACvC;AAAA,EACE;AAAA,EACA;A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AAAA,UAChB,UAAU,CAAC,cAAc,iBAAiB,EAAE,GAAG,UAAU,UAAU,CAAC;AAAA;AAAA,MACtE;AAAA;AAAA,EAEJ;AAEJ;AAEA,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -16,8 +16,7 @@ import {
|
|
|
16
16
|
SelectValue
|
|
17
17
|
} from "@open-mercato/ui/primitives/select";
|
|
18
18
|
import { DEFAULT_SETTINGS, hydrateSettings } from "./config.js";
|
|
19
|
-
import {
|
|
20
|
-
import { UnlabelledAmountNotice } from "../../../components/UnlabelledAmountNotice.js";
|
|
19
|
+
import { formatCurrencyCompact } from "../../../lib/formatters.js";
|
|
21
20
|
import { createLogger } from "@open-mercato/shared/lib/logger";
|
|
22
21
|
const logger = createLogger("dashboards").child({ component: "revenue-trend" });
|
|
23
22
|
async function fetchRevenueTrendData(settings, fetchWidgetData) {
|
|
@@ -104,10 +103,8 @@ const RevenueTrendWidget = ({
|
|
|
104
103
|
const locale = useLocale();
|
|
105
104
|
const hydrated = React.useMemo(() => hydrateSettings(settings), [settings]);
|
|
106
105
|
const [data, setData] = React.useState([]);
|
|
107
|
-
const [currency, setCurrency] = React.useState(null);
|
|
108
106
|
const [loading, setLoading] = React.useState(true);
|
|
109
107
|
const [error, setError] = React.useState(null);
|
|
110
|
-
const money = React.useMemo(() => createCurrencyFormatters(currency, "--", locale), [currency, locale]);
|
|
111
108
|
const fetchWidgetData = useWidgetData();
|
|
112
109
|
const refresh = React.useCallback(async () => {
|
|
113
110
|
onRefreshStateChange?.(true);
|
|
@@ -125,7 +122,6 @@ const RevenueTrendWidget = ({
|
|
|
125
122
|
Revenue: item.value ?? 0
|
|
126
123
|
}));
|
|
127
124
|
setData(chartData);
|
|
128
|
-
setCurrency(result.metadata?.currency ?? null);
|
|
129
125
|
} catch (err) {
|
|
130
126
|
logger.error("Failed to load revenue trend data", { err });
|
|
131
127
|
setError(t("dashboards.analytics.widgets.revenueTrend.error", "Failed to load data"));
|
|
@@ -203,12 +199,11 @@ const RevenueTrendWidget = ({
|
|
|
203
199
|
loading,
|
|
204
200
|
error,
|
|
205
201
|
showArea: hydrated.showArea,
|
|
206
|
-
valueFormatter:
|
|
202
|
+
valueFormatter: formatCurrencyCompact,
|
|
207
203
|
colors: ["blue"],
|
|
208
204
|
emptyMessage: t("dashboards.analytics.widgets.revenueTrend.empty", "No revenue data for this period")
|
|
209
205
|
}
|
|
210
|
-
)
|
|
211
|
-
/* @__PURE__ */ jsx(UnlabelledAmountNotice, { currency, loading, error })
|
|
206
|
+
)
|
|
212
207
|
] });
|
|
213
208
|
};
|
|
214
209
|
var widget_client_default = RevenueTrendWidget;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/modules/dashboards/widgets/dashboard/revenue-trend/widget.client.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport type { DashboardWidgetComponentProps } from '@open-mercato/shared/modules/dashboard/widgets'\nimport { useWidgetData, type WidgetDataFetcher } from '@open-mercato/ui/backend/dashboard/widgetData'\nimport { useT, useLocale } from '@open-mercato/shared/lib/i18n/context'\nimport { LineChart, type LineChartDataItem } from '@open-mercato/ui/backend/charts'\nimport {\n DateRangeSelect,\n InlineDateRangeSelect,\n type DateRangePreset,\n} from '@open-mercato/ui/backend/date-range'\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@open-mercato/ui/primitives/select'\nimport type { DateGranularity } from '@open-mercato/shared/modules/analytics'\nimport { DEFAULT_SETTINGS, hydrateSettings, type RevenueTrendSettings } from './config'\nimport type { WidgetDataResponse } from '../../../services/widgetDataService'\nimport {
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport type { DashboardWidgetComponentProps } from '@open-mercato/shared/modules/dashboard/widgets'\nimport { useWidgetData, type WidgetDataFetcher } from '@open-mercato/ui/backend/dashboard/widgetData'\nimport { useT, useLocale } from '@open-mercato/shared/lib/i18n/context'\nimport { LineChart, type LineChartDataItem } from '@open-mercato/ui/backend/charts'\nimport {\n DateRangeSelect,\n InlineDateRangeSelect,\n type DateRangePreset,\n} from '@open-mercato/ui/backend/date-range'\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@open-mercato/ui/primitives/select'\nimport type { DateGranularity } from '@open-mercato/shared/modules/analytics'\nimport { DEFAULT_SETTINGS, hydrateSettings, type RevenueTrendSettings } from './config'\nimport type { WidgetDataResponse } from '../../../services/widgetDataService'\nimport { formatCurrencyCompact } from '../../../lib/formatters'\nimport { createLogger } from '@open-mercato/shared/lib/logger'\n\nconst logger = createLogger('dashboards').child({ component: 'revenue-trend' })\n\nasync function fetchRevenueTrendData(settings: RevenueTrendSettings, fetchWidgetData: WidgetDataFetcher): Promise<WidgetDataResponse> {\n const body = {\n entityType: 'sales:orders',\n metric: {\n field: 'grandTotalGrossAmount',\n aggregate: 'sum',\n },\n groupBy: {\n field: 'placedAt',\n granularity: settings.granularity,\n },\n dateRange: {\n field: 'placedAt',\n preset: settings.dateRange,\n },\n }\n\n return fetchWidgetData<WidgetDataResponse>(body)\n}\n\nfunction formatDate(dateStr: string | null, granularity: DateGranularity, locale?: string): string {\n if (!dateStr) return '--'\n try {\n const date = new Date(dateStr)\n const localeStr = locale ?? undefined\n switch (granularity) {\n case 'day':\n case 'week':\n return date.toLocaleDateString(localeStr, { month: 'short', day: 'numeric' })\n case 'month':\n return date.toLocaleDateString(localeStr, { month: 'short', year: 'numeric' })\n case 'quarter': {\n const quarter = Math.floor(date.getMonth() / 3) + 1\n return `Q${quarter} ${date.getFullYear()}`\n }\n case 'year':\n return date.toLocaleDateString(localeStr, { year: 'numeric' })\n default:\n return date.toLocaleDateString(localeStr, { month: 'short', day: 'numeric' })\n }\n } catch {\n return String(dateStr)\n }\n}\n\nconst GRANULARITY_OPTIONS: { value: DateGranularity; labelKey: string }[] = [\n { value: 'day', labelKey: 'dashboards.analytics.granularity.day' },\n { value: 'week', labelKey: 'dashboards.analytics.granularity.week' },\n { value: 'month', labelKey: 'dashboards.analytics.granularity.month' },\n { value: 'quarter', labelKey: 'dashboards.analytics.granularity.quarter' },\n { value: 'year', labelKey: 'dashboards.analytics.granularity.year' },\n]\n\nfunction getAutoGranularity(dateRange: DateRangePreset): DateGranularity {\n switch (dateRange) {\n case 'today':\n case 'yesterday':\n case 'last_7_days':\n return 'day'\n case 'this_week':\n case 'last_week':\n case 'last_30_days':\n return 'day'\n case 'this_month':\n case 'last_month':\n case 'last_90_days':\n return 'week'\n case 'this_quarter':\n case 'last_quarter':\n return 'week'\n case 'this_year':\n case 'last_year':\n return 'month'\n default:\n return 'day'\n }\n}\n\nconst RevenueTrendWidget: React.FC<DashboardWidgetComponentProps<RevenueTrendSettings>> = ({\n mode,\n settings = DEFAULT_SETTINGS,\n onSettingsChange,\n refreshToken,\n onRefreshStateChange,\n}) => {\n const t = useT()\n const locale = useLocale()\n const hydrated = React.useMemo(() => hydrateSettings(settings), [settings])\n const [data, setData] = React.useState<LineChartDataItem[]>([])\n const [loading, setLoading] = React.useState(true)\n const [error, setError] = React.useState<string | null>(null)\n\n const fetchWidgetData = useWidgetData()\n const refresh = React.useCallback(async () => {\n onRefreshStateChange?.(true)\n setLoading(true)\n setError(null)\n try {\n const result = await fetchRevenueTrendData(hydrated, fetchWidgetData)\n const sortedData = [...result.data].sort((a, b) => {\n const aTime = new Date(a.groupKey as string || 0).getTime()\n const bTime = new Date(b.groupKey as string || 0).getTime()\n return aTime - bTime\n })\n const chartData = sortedData.map((item) => ({\n date: formatDate(item.groupKey as string | null, hydrated.granularity, locale),\n Revenue: item.value ?? 0,\n }))\n setData(chartData)\n } catch (err) {\n logger.error('Failed to load revenue trend data', { err })\n setError(t('dashboards.analytics.widgets.revenueTrend.error', 'Failed to load data'))\n } finally {\n setLoading(false)\n onRefreshStateChange?.(false)\n }\n }, [hydrated, fetchWidgetData, locale, onRefreshStateChange, t])\n\n React.useEffect(() => {\n refresh().catch(() => {})\n }, [refresh, refreshToken])\n\n if (mode === 'settings') {\n return (\n <div className=\"space-y-4 text-sm\">\n <DateRangeSelect\n id=\"revenue-trend-date-range\"\n label={t('dashboards.analytics.settings.dateRange', 'Date Range')}\n value={hydrated.dateRange}\n onChange={(dateRange: DateRangePreset) => onSettingsChange({ ...hydrated, dateRange })}\n />\n <div className=\"space-y-1.5\">\n <label\n htmlFor=\"revenue-trend-granularity\"\n className=\"text-xs font-semibold uppercase text-muted-foreground\"\n >\n {t('dashboards.analytics.settings.granularity', 'Granularity')}\n </label>\n <Select\n value={hydrated.granularity}\n onValueChange={(value) => onSettingsChange({ ...hydrated, granularity: value as DateGranularity })}\n >\n <SelectTrigger id=\"revenue-trend-granularity\" size=\"sm\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {GRANULARITY_OPTIONS.map((opt) => (\n <SelectItem key={opt.value} value={opt.value}>\n {t(opt.labelKey, opt.value)}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"space-y-1.5\">\n <label className=\"flex items-center gap-2 text-sm\">\n <input\n type=\"checkbox\"\n checked={hydrated.showArea}\n onChange={(e) => onSettingsChange({ ...hydrated, showArea: e.target.checked })}\n className=\"h-4 w-4 rounded border focus-visible:ring-ring\"\n />\n {t('dashboards.analytics.settings.showArea', 'Show area fill')}\n </label>\n </div>\n </div>\n )\n }\n\n const effectiveGranularity = hydrated.granularity === 'day' ? getAutoGranularity(hydrated.dateRange) : hydrated.granularity\n\n return (\n <div>\n <div className=\"mb-2 flex justify-end\">\n <InlineDateRangeSelect\n value={hydrated.dateRange}\n onChange={(dateRange) => onSettingsChange({ ...hydrated, dateRange, granularity: getAutoGranularity(dateRange) })}\n />\n </div>\n <LineChart\n data={data}\n index=\"date\"\n categories={['Revenue']}\n categoryLabels={{ Revenue: t('dashboards.analytics.widgets.topCustomers.column.revenue', 'Revenue') }}\n loading={loading}\n error={error}\n showArea={hydrated.showArea}\n valueFormatter={formatCurrencyCompact}\n colors={['blue']}\n emptyMessage={t('dashboards.analytics.widgets.revenueTrend.empty', 'No revenue data for this period')}\n />\n </div>\n )\n}\n\nexport default RevenueTrendWidget\n"],
|
|
5
|
+
"mappings": ";AAwJQ,cAaE,YAbF;AAtJR,YAAY,WAAW;AAEvB,SAAS,qBAA6C;AACtD,SAAS,MAAM,iBAAiB;AAChC,SAAS,iBAAyC;AAClD;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,kBAAkB,uBAAkD;AAE7E,SAAS,6BAA6B;AACtC,SAAS,oBAAoB;AAE7B,MAAM,SAAS,aAAa,YAAY,EAAE,MAAM,EAAE,WAAW,gBAAgB,CAAC;AAE9E,eAAe,sBAAsB,UAAgC,iBAAiE;AACpI,QAAM,OAAO;AAAA,IACX,YAAY;AAAA,IACZ,QAAQ;AAAA,MACN,OAAO;AAAA,MACP,WAAW;AAAA,IACb;AAAA,IACA,SAAS;AAAA,MACP,OAAO;AAAA,MACP,aAAa,SAAS;AAAA,IACxB;AAAA,IACA,WAAW;AAAA,MACT,OAAO;AAAA,MACP,QAAQ,SAAS;AAAA,IACnB;AAAA,EACF;AAEA,SAAO,gBAAoC,IAAI;AACjD;AAEA,SAAS,WAAW,SAAwB,aAA8B,QAAyB;AACjG,MAAI,CAAC,QAAS,QAAO;AACrB,MAAI;AACF,UAAM,OAAO,IAAI,KAAK,OAAO;AAC7B,UAAM,YAAY,UAAU;AAC5B,YAAQ,aAAa;AAAA,MACnB,KAAK;AAAA,MACL,KAAK;AACH,eAAO,KAAK,mBAAmB,WAAW,EAAE,OAAO,SAAS,KAAK,UAAU,CAAC;AAAA,MAC9E,KAAK;AACH,eAAO,KAAK,mBAAmB,WAAW,EAAE,OAAO,SAAS,MAAM,UAAU,CAAC;A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IAClH,GACF;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,OAAM;AAAA,QACN,YAAY,CAAC,SAAS;AAAA,QACtB,gBAAgB,EAAE,SAAS,EAAE,4DAA4D,SAAS,EAAE;AAAA,QACpG;AAAA,QACA;AAAA,QACA,UAAU,SAAS;AAAA,QACnB,gBAAgB;AAAA,QAChB,QAAQ,CAAC,MAAM;AAAA,QACf,cAAc,EAAE,mDAAmD,iCAAiC;AAAA;AAAA,IACtG;AAAA,KACF;AAEJ;AAEA,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { useWidgetData } from "@open-mercato/ui/backend/dashboard/widgetData";
|
|
5
|
-
import {
|
|
5
|
+
import { useT } from "@open-mercato/shared/lib/i18n/context";
|
|
6
6
|
import { BarChart } from "@open-mercato/ui/backend/charts";
|
|
7
7
|
import { DateRangeSelect } from "@open-mercato/ui/backend/date-range";
|
|
8
8
|
import { Input } from "@open-mercato/ui/primitives/input";
|
|
9
9
|
import { DEFAULT_SETTINGS, hydrateSettings } from "./config.js";
|
|
10
|
-
import {
|
|
11
|
-
import { UnlabelledAmountNotice } from "../../../components/UnlabelledAmountNotice.js";
|
|
10
|
+
import { formatCurrencyCompact } from "../../../lib/formatters.js";
|
|
12
11
|
import { createLogger } from "@open-mercato/shared/lib/logger";
|
|
13
12
|
const logger = createLogger("dashboards").child({ component: "sales-by-region" });
|
|
14
13
|
async function fetchSalesByRegionData(settings, fetchWidgetData) {
|
|
@@ -37,13 +36,10 @@ const SalesByRegionWidget = ({
|
|
|
37
36
|
onRefreshStateChange
|
|
38
37
|
}) => {
|
|
39
38
|
const t = useT();
|
|
40
|
-
const locale = useLocale();
|
|
41
39
|
const hydrated = React.useMemo(() => hydrateSettings(settings), [settings]);
|
|
42
40
|
const [data, setData] = React.useState([]);
|
|
43
|
-
const [currency, setCurrency] = React.useState(null);
|
|
44
41
|
const [loading, setLoading] = React.useState(true);
|
|
45
42
|
const [error, setError] = React.useState(null);
|
|
46
|
-
const money = React.useMemo(() => createCurrencyFormatters(currency, "--", locale), [currency, locale]);
|
|
47
43
|
const fetchWidgetData = useWidgetData();
|
|
48
44
|
const refresh = React.useCallback(async () => {
|
|
49
45
|
onRefreshStateChange?.(true);
|
|
@@ -56,7 +52,6 @@ const SalesByRegionWidget = ({
|
|
|
56
52
|
Revenue: item.value ?? 0
|
|
57
53
|
}));
|
|
58
54
|
setData(chartData);
|
|
59
|
-
setCurrency(result.metadata?.currency ?? null);
|
|
60
55
|
} catch (err) {
|
|
61
56
|
logger.error("Failed to load sales by region data", { err });
|
|
62
57
|
setError(t("dashboards.analytics.widgets.salesByRegion.error", "Failed to load data"));
|
|
@@ -107,25 +102,22 @@ const SalesByRegionWidget = ({
|
|
|
107
102
|
] })
|
|
108
103
|
] });
|
|
109
104
|
}
|
|
110
|
-
return /* @__PURE__ */
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
) }),
|
|
127
|
-
/* @__PURE__ */ jsx(UnlabelledAmountNotice, { currency, loading, error })
|
|
128
|
-
] });
|
|
105
|
+
return /* @__PURE__ */ jsx(
|
|
106
|
+
BarChart,
|
|
107
|
+
{
|
|
108
|
+
data,
|
|
109
|
+
index: "region",
|
|
110
|
+
categories: ["Revenue"],
|
|
111
|
+
categoryLabels: { Revenue: t("dashboards.analytics.widgets.topCustomers.column.revenue", "Revenue") },
|
|
112
|
+
loading,
|
|
113
|
+
error,
|
|
114
|
+
layout: "horizontal",
|
|
115
|
+
valueFormatter: formatCurrencyCompact,
|
|
116
|
+
colors: ["cyan"],
|
|
117
|
+
showLegend: false,
|
|
118
|
+
emptyMessage: t("dashboards.analytics.widgets.salesByRegion.empty", "No regional sales data for this period")
|
|
119
|
+
}
|
|
120
|
+
);
|
|
129
121
|
};
|
|
130
122
|
var widget_client_default = SalesByRegionWidget;
|
|
131
123
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/modules/dashboards/widgets/dashboard/sales-by-region/widget.client.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport type { DashboardWidgetComponentProps } from '@open-mercato/shared/modules/dashboard/widgets'\nimport { useWidgetData, type WidgetDataFetcher } from '@open-mercato/ui/backend/dashboard/widgetData'\nimport {
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport type { DashboardWidgetComponentProps } from '@open-mercato/shared/modules/dashboard/widgets'\nimport { useWidgetData, type WidgetDataFetcher } from '@open-mercato/ui/backend/dashboard/widgetData'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\nimport { BarChart, type BarChartDataItem } from '@open-mercato/ui/backend/charts'\nimport { DateRangeSelect, type DateRangePreset } from '@open-mercato/ui/backend/date-range'\nimport { Input } from '@open-mercato/ui/primitives/input'\nimport { DEFAULT_SETTINGS, hydrateSettings, type SalesByRegionSettings } from './config'\nimport type { WidgetDataResponse } from '../../../services/widgetDataService'\nimport { formatCurrencyCompact } from '../../../lib/formatters'\nimport { createLogger } from '@open-mercato/shared/lib/logger'\n\nconst logger = createLogger('dashboards').child({ component: 'sales-by-region' })\n\nasync function fetchSalesByRegionData(settings: SalesByRegionSettings, fetchWidgetData: WidgetDataFetcher): Promise<WidgetDataResponse> {\n const body = {\n entityType: 'sales:orders',\n metric: {\n field: 'grandTotalGrossAmount',\n aggregate: 'sum',\n },\n groupBy: {\n field: 'shippingAddressSnapshot.region',\n limit: settings.limit,\n },\n dateRange: {\n field: 'placedAt',\n preset: settings.dateRange,\n },\n }\n\n return fetchWidgetData<WidgetDataResponse>(body)\n}\n\nconst SalesByRegionWidget: React.FC<DashboardWidgetComponentProps<SalesByRegionSettings>> = ({\n mode,\n settings = DEFAULT_SETTINGS,\n onSettingsChange,\n refreshToken,\n onRefreshStateChange,\n}) => {\n const t = useT()\n const hydrated = React.useMemo(() => hydrateSettings(settings), [settings])\n const [data, setData] = React.useState<BarChartDataItem[]>([])\n const [loading, setLoading] = React.useState(true)\n const [error, setError] = React.useState<string | null>(null)\n\n const fetchWidgetData = useWidgetData()\n const refresh = React.useCallback(async () => {\n onRefreshStateChange?.(true)\n setLoading(true)\n setError(null)\n try {\n const result = await fetchSalesByRegionData(hydrated, fetchWidgetData)\n const chartData = result.data.map((item) => ({\n region: String(item.groupKey || t('dashboards.analytics.labels.unknown', 'Unknown')),\n Revenue: item.value ?? 0,\n }))\n setData(chartData)\n } catch (err) {\n logger.error('Failed to load sales by region data', { err })\n setError(t('dashboards.analytics.widgets.salesByRegion.error', 'Failed to load data'))\n } finally {\n setLoading(false)\n onRefreshStateChange?.(false)\n }\n }, [hydrated, fetchWidgetData, onRefreshStateChange, t])\n\n React.useEffect(() => {\n refresh().catch(() => {})\n }, [refresh, refreshToken])\n\n if (mode === 'settings') {\n return (\n <div className=\"space-y-4 text-sm\">\n <DateRangeSelect\n id=\"sales-by-region-date-range\"\n label={t('dashboards.analytics.settings.dateRange', 'Date Range')}\n value={hydrated.dateRange}\n onChange={(dateRange: DateRangePreset) => onSettingsChange({ ...hydrated, dateRange })}\n />\n <div className=\"space-y-1.5\">\n <label\n htmlFor=\"sales-by-region-limit\"\n className=\"text-xs font-semibold uppercase text-muted-foreground\"\n >\n {t('dashboards.analytics.settings.limit', 'Number of items')}\n </label>\n <Input\n id=\"sales-by-region-limit\"\n type=\"number\"\n min={1}\n max={20}\n className=\"w-24\"\n value={hydrated.limit}\n onChange={(e) => {\n const next = Number(e.target.value)\n onSettingsChange({ ...hydrated, limit: Number.isFinite(next) ? next : hydrated.limit })\n }}\n />\n </div>\n </div>\n )\n }\n\n return (\n <BarChart\n data={data}\n index=\"region\"\n categories={['Revenue']}\n categoryLabels={{ Revenue: t('dashboards.analytics.widgets.topCustomers.column.revenue', 'Revenue') }}\n loading={loading}\n error={error}\n layout=\"horizontal\"\n valueFormatter={formatCurrencyCompact}\n colors={['cyan']}\n showLegend={false}\n emptyMessage={t('dashboards.analytics.widgets.salesByRegion.empty', 'No regional sales data for this period')}\n />\n )\n}\n\nexport default SalesByRegionWidget\n"],
|
|
5
|
+
"mappings": ";AA6EQ,cAMA,YANA;AA3ER,YAAY,WAAW;AAEvB,SAAS,qBAA6C;AACtD,SAAS,YAAY;AACrB,SAAS,gBAAuC;AAChD,SAAS,uBAA6C;AACtD,SAAS,aAAa;AACtB,SAAS,kBAAkB,uBAAmD;AAE9E,SAAS,6BAA6B;AACtC,SAAS,oBAAoB;AAE7B,MAAM,SAAS,aAAa,YAAY,EAAE,MAAM,EAAE,WAAW,kBAAkB,CAAC;AAEhF,eAAe,uBAAuB,UAAiC,iBAAiE;AACtI,QAAM,OAAO;AAAA,IACX,YAAY;AAAA,IACZ,QAAQ;AAAA,MACN,OAAO;AAAA,MACP,WAAW;AAAA,IACb;AAAA,IACA,SAAS;AAAA,MACP,OAAO;AAAA,MACP,OAAO,SAAS;AAAA,IAClB;AAAA,IACA,WAAW;AAAA,MACT,OAAO;AAAA,MACP,QAAQ,SAAS;AAAA,IACnB;AAAA,EACF;AAEA,SAAO,gBAAoC,IAAI;AACjD;AAEA,MAAM,sBAAsF,CAAC;AAAA,EAC3F;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,IAAI,KAAK;AACf,QAAM,WAAW,MAAM,QAAQ,MAAM,gBAAgB,QAAQ,GAAG,CAAC,QAAQ,CAAC;AAC1E,QAAM,CAAC,MAAM,OAAO,IAAI,MAAM,SAA6B,CAAC,CAAC;AAC7D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UAAC;AAAA;AAAA,YACC,IAAG;AAAA,YACH,MAAK;AAAA,YACL,KAAK;AAAA,YACL,KAAK;AAAA,YACL,WAAU;AAAA,YACV,OAAO,SAAS;AAAA,YAChB,UAAU,CAAC,MAAM;AACf,oBAAM,OAAO,OAAO,EAAE,OAAO,KAAK;AAClC,+BAAiB,EAAE,GAAG,UAAU,OAAO,OAAO,SAAS,IAAI,IAAI,OAAO,SAAS,MAAM,CAAC;AAAA,YACxF;AAAA;AAAA,QACF;AAAA,SACF;AAAA,OACF;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,OAAM;AAAA,MACN,YAAY,CAAC,SAAS;AAAA,MACtB,gBAAgB,EAAE,SAAS,EAAE,4DAA4D,SAAS,EAAE;AAAA,MACpG;AAAA,MACA;AAAA,MACA,QAAO;AAAA,MACP,gBAAgB;AAAA,MAChB,QAAQ,CAAC,MAAM;AAAA,MACf,YAAY;AAAA,MACZ,cAAc,EAAE,oDAAoD,wCAAwC;AAAA;AAAA,EAC9G;AAEJ;AAEA,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { useWidgetData } from "@open-mercato/ui/backend/dashboard/widgetData";
|
|
5
|
-
import {
|
|
5
|
+
import { useT } from "@open-mercato/shared/lib/i18n/context";
|
|
6
6
|
import { TopNTable } from "@open-mercato/ui/backend/charts";
|
|
7
7
|
import { DateRangeSelect } from "@open-mercato/ui/backend/date-range";
|
|
8
8
|
import { Input } from "@open-mercato/ui/primitives/input";
|
|
9
9
|
import { DEFAULT_SETTINGS, hydrateSettings } from "./config.js";
|
|
10
|
-
import {
|
|
11
|
-
import { UnlabelledAmountNotice } from "../../../components/UnlabelledAmountNotice.js";
|
|
10
|
+
import { formatCurrencySafe } from "../../../lib/formatters.js";
|
|
12
11
|
import { createLogger } from "@open-mercato/shared/lib/logger";
|
|
13
12
|
const logger = createLogger("dashboards").child({ component: "top-customers" });
|
|
14
13
|
async function fetchTopCustomersData(settings, fetchWidgetData) {
|
|
@@ -42,13 +41,10 @@ const TopCustomersWidget = ({
|
|
|
42
41
|
onRefreshStateChange
|
|
43
42
|
}) => {
|
|
44
43
|
const t = useT();
|
|
45
|
-
const locale = useLocale();
|
|
46
44
|
const hydrated = React.useMemo(() => hydrateSettings(settings), [settings]);
|
|
47
45
|
const [data, setData] = React.useState([]);
|
|
48
|
-
const [currency, setCurrency] = React.useState(null);
|
|
49
46
|
const [loading, setLoading] = React.useState(true);
|
|
50
47
|
const [error, setError] = React.useState(null);
|
|
51
|
-
const money = React.useMemo(() => createCurrencyFormatters(currency, "--", locale), [currency, locale]);
|
|
52
48
|
const unknownLabel = t("dashboards.analytics.labels.unknown", "Unknown");
|
|
53
49
|
const columns = React.useMemo(
|
|
54
50
|
() => [
|
|
@@ -66,10 +62,10 @@ const TopCustomersWidget = ({
|
|
|
66
62
|
key: "revenue",
|
|
67
63
|
header: t("dashboards.analytics.widgets.topCustomers.column.revenue", "Revenue"),
|
|
68
64
|
align: "right",
|
|
69
|
-
formatter: (value) =>
|
|
65
|
+
formatter: (value) => formatCurrencySafe(value)
|
|
70
66
|
}
|
|
71
67
|
],
|
|
72
|
-
[t, unknownLabel
|
|
68
|
+
[t, unknownLabel]
|
|
73
69
|
);
|
|
74
70
|
const fetchWidgetData = useWidgetData();
|
|
75
71
|
const refresh = React.useCallback(async () => {
|
|
@@ -84,7 +80,6 @@ const TopCustomersWidget = ({
|
|
|
84
80
|
revenue: item.value ?? 0
|
|
85
81
|
}));
|
|
86
82
|
setData(tableData);
|
|
87
|
-
setCurrency(result.metadata?.currency ?? null);
|
|
88
83
|
} catch (err) {
|
|
89
84
|
logger.error("Failed to load top customers data", { err });
|
|
90
85
|
setError(t("dashboards.analytics.widgets.topCustomers.error", "Failed to load data"));
|
|
@@ -135,19 +130,16 @@ const TopCustomersWidget = ({
|
|
|
135
130
|
] })
|
|
136
131
|
] });
|
|
137
132
|
}
|
|
138
|
-
return /* @__PURE__ */
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
) }),
|
|
149
|
-
/* @__PURE__ */ jsx(UnlabelledAmountNotice, { currency, loading, error })
|
|
150
|
-
] });
|
|
133
|
+
return /* @__PURE__ */ jsx(
|
|
134
|
+
TopNTable,
|
|
135
|
+
{
|
|
136
|
+
data,
|
|
137
|
+
columns,
|
|
138
|
+
loading,
|
|
139
|
+
error,
|
|
140
|
+
emptyMessage: t("dashboards.analytics.widgets.topCustomers.empty", "No customer data for this period")
|
|
141
|
+
}
|
|
142
|
+
);
|
|
151
143
|
};
|
|
152
144
|
var widget_client_default = TopCustomersWidget;
|
|
153
145
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/modules/dashboards/widgets/dashboard/top-customers/widget.client.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport type { DashboardWidgetComponentProps } from '@open-mercato/shared/modules/dashboard/widgets'\nimport { useWidgetData, type WidgetDataFetcher } from '@open-mercato/ui/backend/dashboard/widgetData'\nimport {
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport type { DashboardWidgetComponentProps } from '@open-mercato/shared/modules/dashboard/widgets'\nimport { useWidgetData, type WidgetDataFetcher } from '@open-mercato/ui/backend/dashboard/widgetData'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\nimport { TopNTable, type TopNTableColumn } from '@open-mercato/ui/backend/charts'\nimport { DateRangeSelect, type DateRangePreset } from '@open-mercato/ui/backend/date-range'\nimport { Input } from '@open-mercato/ui/primitives/input'\nimport { DEFAULT_SETTINGS, hydrateSettings, type TopCustomersSettings } from './config'\nimport type { WidgetDataResponse } from '../../../services/widgetDataService'\nimport { formatCurrencySafe } from '../../../lib/formatters'\nimport { createLogger } from '@open-mercato/shared/lib/logger'\n\nconst logger = createLogger('dashboards').child({ component: 'top-customers' })\n\ntype CustomerRow = {\n rank: number\n customerId: string\n revenue: number\n}\n\nasync function fetchTopCustomersData(settings: TopCustomersSettings, fetchWidgetData: WidgetDataFetcher): Promise<WidgetDataResponse> {\n const body = {\n entityType: 'sales:orders',\n metric: {\n field: 'grandTotalGrossAmount',\n aggregate: 'sum',\n },\n groupBy: {\n field: 'customerEntityId',\n limit: settings.limit,\n resolveLabels: true,\n },\n dateRange: {\n field: 'placedAt',\n preset: settings.dateRange,\n },\n }\n\n return fetchWidgetData<WidgetDataResponse>(body)\n}\n\nfunction formatCustomerName(name: string | null, unknownLabel: string): string {\n if (!name) return unknownLabel\n return name\n}\n\nconst TopCustomersWidget: React.FC<DashboardWidgetComponentProps<TopCustomersSettings>> = ({\n mode,\n settings = DEFAULT_SETTINGS,\n onSettingsChange,\n refreshToken,\n onRefreshStateChange,\n}) => {\n const t = useT()\n const hydrated = React.useMemo(() => hydrateSettings(settings), [settings])\n const [data, setData] = React.useState<CustomerRow[]>([])\n const [loading, setLoading] = React.useState(true)\n const [error, setError] = React.useState<string | null>(null)\n\n const unknownLabel = t('dashboards.analytics.labels.unknown', 'Unknown')\n const columns: TopNTableColumn<CustomerRow>[] = React.useMemo(\n () => [\n {\n key: 'rank',\n header: '#',\n width: '40px',\n },\n {\n key: 'customerId',\n header: t('dashboards.analytics.widgets.topCustomers.column.customer', 'Customer'),\n formatter: (value) => formatCustomerName(String(value || ''), unknownLabel),\n },\n {\n key: 'revenue',\n header: t('dashboards.analytics.widgets.topCustomers.column.revenue', 'Revenue'),\n align: 'right',\n formatter: (value: unknown) => formatCurrencySafe(value),\n },\n ],\n [t, unknownLabel],\n )\n\n const fetchWidgetData = useWidgetData()\n const refresh = React.useCallback(async () => {\n onRefreshStateChange?.(true)\n setLoading(true)\n setError(null)\n try {\n const result = await fetchTopCustomersData(hydrated, fetchWidgetData)\n const tableData: CustomerRow[] = result.data.map((item, index) => ({\n rank: index + 1,\n customerId: item.groupLabel || String(item.groupKey || t('dashboards.analytics.labels.unknown', 'Unknown')),\n revenue: item.value ?? 0,\n }))\n setData(tableData)\n } catch (err) {\n logger.error('Failed to load top customers data', { err })\n setError(t('dashboards.analytics.widgets.topCustomers.error', 'Failed to load data'))\n } finally {\n setLoading(false)\n onRefreshStateChange?.(false)\n }\n }, [hydrated, fetchWidgetData, onRefreshStateChange, t])\n\n React.useEffect(() => {\n refresh().catch(() => {})\n }, [refresh, refreshToken])\n\n if (mode === 'settings') {\n return (\n <div className=\"space-y-4 text-sm\">\n <DateRangeSelect\n id=\"top-customers-date-range\"\n label={t('dashboards.analytics.settings.dateRange', 'Date Range')}\n value={hydrated.dateRange}\n onChange={(dateRange: DateRangePreset) => onSettingsChange({ ...hydrated, dateRange })}\n />\n <div className=\"space-y-1.5\">\n <label\n htmlFor=\"top-customers-limit\"\n className=\"text-xs font-semibold uppercase text-muted-foreground\"\n >\n {t('dashboards.analytics.settings.limit', 'Number of items')}\n </label>\n <Input\n id=\"top-customers-limit\"\n type=\"number\"\n min={1}\n max={20}\n className=\"w-24\"\n value={hydrated.limit}\n onChange={(e) => {\n const next = Number(e.target.value)\n onSettingsChange({ ...hydrated, limit: Number.isFinite(next) ? next : hydrated.limit })\n }}\n />\n </div>\n </div>\n )\n }\n\n return (\n <TopNTable\n data={data}\n columns={columns}\n loading={loading}\n error={error}\n emptyMessage={t('dashboards.analytics.widgets.topCustomers.empty', 'No customer data for this period')}\n />\n )\n}\n\nexport default TopCustomersWidget\n"],
|
|
5
|
+
"mappings": ";AAiHQ,cAMA,YANA;AA/GR,YAAY,WAAW;AAEvB,SAAS,qBAA6C;AACtD,SAAS,YAAY;AACrB,SAAS,iBAAuC;AAChD,SAAS,uBAA6C;AACtD,SA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AAI,WAAU,eACb;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,SAAQ;AAAA,YACR,WAAU;AAAA,YAET,YAAE,uCAAuC,iBAAiB;AAAA;AAAA,QAC7D;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,IAAG;AAAA,YACH,MAAK;AAAA,YACL,KAAK;AAAA,YACL,KAAK;AAAA,YACL,WAAU;AAAA,YACV,OAAO,SAAS;AAAA,YAChB,UAAU,CAAC,MAAM;AACf,oBAAM,OAAO,OAAO,EAAE,OAAO,KAAK;AAClC,+BAAiB,EAAE,GAAG,UAAU,OAAO,OAAO,SAAS,IAAI,IAAI,OAAO,SAAS,MAAM,CAAC;AAAA,YACxF;AAAA;AAAA,QACF;AAAA,SACF;AAAA,OACF;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAc,EAAE,mDAAmD,kCAAkC;AAAA;AAAA,EACvG;AAEJ;AAEA,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { useWidgetData } from "@open-mercato/ui/backend/dashboard/widgetData";
|
|
5
|
-
import {
|
|
5
|
+
import { useT } from "@open-mercato/shared/lib/i18n/context";
|
|
6
6
|
import { BarChart } from "@open-mercato/ui/backend/charts";
|
|
7
7
|
import { DateRangeSelect, InlineDateRangeSelect } from "@open-mercato/ui/backend/date-range";
|
|
8
8
|
import { Input } from "@open-mercato/ui/primitives/input";
|
|
@@ -14,8 +14,7 @@ import {
|
|
|
14
14
|
SelectValue
|
|
15
15
|
} from "@open-mercato/ui/primitives/select";
|
|
16
16
|
import { DEFAULT_SETTINGS, hydrateSettings } from "./config.js";
|
|
17
|
-
import {
|
|
18
|
-
import { UnlabelledAmountNotice } from "../../../components/UnlabelledAmountNotice.js";
|
|
17
|
+
import { formatCurrencyCompact } from "../../../lib/formatters.js";
|
|
19
18
|
import { createLogger } from "@open-mercato/shared/lib/logger";
|
|
20
19
|
const logger = createLogger("dashboards").child({ component: "top-products" });
|
|
21
20
|
async function fetchTopProductsData(settings, fetchWidgetData) {
|
|
@@ -57,14 +56,11 @@ const TopProductsWidget = ({
|
|
|
57
56
|
onRefreshStateChange
|
|
58
57
|
}) => {
|
|
59
58
|
const t = useT();
|
|
60
|
-
const locale = useLocale();
|
|
61
59
|
const hydrated = React.useMemo(() => hydrateSettings(settings), [settings]);
|
|
62
60
|
const [data, setData] = React.useState([]);
|
|
63
|
-
const [currency, setCurrency] = React.useState(null);
|
|
64
61
|
const [loading, setLoading] = React.useState(true);
|
|
65
62
|
const [error, setError] = React.useState(null);
|
|
66
63
|
const fetchingRef = React.useRef(false);
|
|
67
|
-
const money = React.useMemo(() => createCurrencyFormatters(currency, "--", locale), [currency, locale]);
|
|
68
64
|
const fetchWidgetData = useWidgetData();
|
|
69
65
|
const refresh = React.useCallback(async () => {
|
|
70
66
|
if (fetchingRef.current) return;
|
|
@@ -79,7 +75,6 @@ const TopProductsWidget = ({
|
|
|
79
75
|
Revenue: item.value ?? 0
|
|
80
76
|
}));
|
|
81
77
|
setData(chartData);
|
|
82
|
-
setCurrency(result.metadata?.currency ?? null);
|
|
83
78
|
} catch (err) {
|
|
84
79
|
logger.error("Failed to load top products data", { err });
|
|
85
80
|
setError(t("dashboards.analytics.widgets.topProducts.error", "Failed to load data"));
|
|
@@ -173,13 +168,12 @@ const TopProductsWidget = ({
|
|
|
173
168
|
loading,
|
|
174
169
|
error,
|
|
175
170
|
layout: hydrated.layout,
|
|
176
|
-
valueFormatter:
|
|
171
|
+
valueFormatter: formatCurrencyCompact,
|
|
177
172
|
colors: ["emerald"],
|
|
178
173
|
showLegend: false,
|
|
179
174
|
emptyMessage: t("dashboards.analytics.widgets.topProducts.empty", "No product sales data for this period")
|
|
180
175
|
}
|
|
181
|
-
) })
|
|
182
|
-
/* @__PURE__ */ jsx(UnlabelledAmountNotice, { currency, loading, error })
|
|
176
|
+
) })
|
|
183
177
|
] });
|
|
184
178
|
};
|
|
185
179
|
var widget_client_default = TopProductsWidget;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/modules/dashboards/widgets/dashboard/top-products/widget.client.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport type { DashboardWidgetComponentProps } from '@open-mercato/shared/modules/dashboard/widgets'\nimport { useWidgetData, type WidgetDataFetcher } from '@open-mercato/ui/backend/dashboard/widgetData'\nimport {
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport type { DashboardWidgetComponentProps } from '@open-mercato/shared/modules/dashboard/widgets'\nimport { useWidgetData, type WidgetDataFetcher } from '@open-mercato/ui/backend/dashboard/widgetData'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\nimport { BarChart, type BarChartDataItem } from '@open-mercato/ui/backend/charts'\nimport { DateRangeSelect, InlineDateRangeSelect, type DateRangePreset } from '@open-mercato/ui/backend/date-range'\nimport { Input } from '@open-mercato/ui/primitives/input'\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@open-mercato/ui/primitives/select'\nimport { DEFAULT_SETTINGS, hydrateSettings, type TopProductsSettings } from './config'\nimport type { WidgetDataResponse } from '../../../services/widgetDataService'\nimport { formatCurrencyCompact } from '../../../lib/formatters'\nimport { createLogger } from '@open-mercato/shared/lib/logger'\n\nconst logger = createLogger('dashboards').child({ component: 'top-products' })\n\nasync function fetchTopProductsData(settings: TopProductsSettings, fetchWidgetData: WidgetDataFetcher): Promise<WidgetDataResponse> {\n const body = {\n entityType: 'sales:order_lines',\n metric: {\n field: 'totalGrossAmount',\n aggregate: 'sum',\n },\n groupBy: {\n field: 'productId',\n limit: settings.limit,\n resolveLabels: true,\n },\n dateRange: {\n field: 'createdAt',\n preset: settings.dateRange,\n },\n }\n\n return fetchWidgetData<WidgetDataResponse>(body)\n}\n\nfunction truncateLabel(\n label: unknown,\n t: (key: string, fallback: string) => string,\n maxLength: number = 20\n): string {\n if (label == null || label === '') return t('dashboards.analytics.labels.unknownProduct', 'Unknown Product')\n const labelStr = String(label)\n // Check for UUID-like strings or meaningless values\n if (labelStr === '0' || labelStr === 'null' || labelStr === 'undefined') {\n return t('dashboards.analytics.labels.unknownProduct', 'Unknown Product')\n }\n if (/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(labelStr)) {\n return t('dashboards.analytics.labels.unnamedProduct', 'Unnamed Product')\n }\n if (labelStr.length <= maxLength) return labelStr\n return labelStr.slice(0, maxLength - 3) + '...'\n}\n\nconst TopProductsWidget: React.FC<DashboardWidgetComponentProps<TopProductsSettings>> = ({\n mode,\n settings = DEFAULT_SETTINGS,\n onSettingsChange,\n refreshToken,\n onRefreshStateChange,\n}) => {\n const t = useT()\n const hydrated = React.useMemo(() => hydrateSettings(settings), [settings])\n const [data, setData] = React.useState<BarChartDataItem[]>([])\n const [loading, setLoading] = React.useState(true)\n const [error, setError] = React.useState<string | null>(null)\n const fetchingRef = React.useRef(false)\n\n const fetchWidgetData = useWidgetData()\n const refresh = React.useCallback(async () => {\n if (fetchingRef.current) return\n fetchingRef.current = true\n onRefreshStateChange?.(true)\n setLoading(true)\n setError(null)\n try {\n const result = await fetchTopProductsData(hydrated, fetchWidgetData)\n const chartData = result.data.map((item, index) => ({\n name: truncateLabel(item.groupLabel ?? item.groupKey ?? `Product ${index + 1}`, t),\n Revenue: item.value ?? 0,\n }))\n setData(chartData)\n } catch (err) {\n logger.error('Failed to load top products data', { err })\n setError(t('dashboards.analytics.widgets.topProducts.error', 'Failed to load data'))\n } finally {\n setLoading(false)\n onRefreshStateChange?.(false)\n fetchingRef.current = false\n }\n }, [hydrated, fetchWidgetData, onRefreshStateChange, t])\n\n React.useEffect(() => {\n refresh().catch(() => {})\n }, [refresh, refreshToken])\n\n if (mode === 'settings') {\n return (\n <div className=\"space-y-4 text-sm\">\n <DateRangeSelect\n id=\"top-products-date-range\"\n label={t('dashboards.analytics.settings.dateRange', 'Date Range')}\n value={hydrated.dateRange}\n onChange={(dateRange: DateRangePreset) => onSettingsChange({ ...hydrated, dateRange })}\n />\n <div className=\"space-y-1.5\">\n <label\n htmlFor=\"top-products-limit\"\n className=\"text-xs font-semibold uppercase text-muted-foreground\"\n >\n {t('dashboards.analytics.settings.limit', 'Number of items')}\n </label>\n <Input\n id=\"top-products-limit\"\n type=\"number\"\n min={1}\n max={20}\n className=\"w-24\"\n value={hydrated.limit}\n onChange={(e) => {\n const next = Number(e.target.value)\n onSettingsChange({ ...hydrated, limit: Number.isFinite(next) ? next : hydrated.limit })\n }}\n />\n </div>\n <div className=\"space-y-1.5\">\n <label\n htmlFor=\"top-products-layout\"\n className=\"text-xs font-semibold uppercase text-muted-foreground\"\n >\n {t('dashboards.analytics.settings.chartLayout', 'Chart Layout')}\n </label>\n <Select\n value={hydrated.layout}\n onValueChange={(value) => onSettingsChange({ ...hydrated, layout: value as 'horizontal' | 'vertical' })}\n >\n <SelectTrigger id=\"top-products-layout\" size=\"sm\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"horizontal\">{t('dashboards.analytics.settings.horizontal', 'Horizontal')}</SelectItem>\n <SelectItem value=\"vertical\">{t('dashboards.analytics.settings.vertical', 'Vertical')}</SelectItem>\n </SelectContent>\n </Select>\n </div>\n </div>\n )\n }\n\n return (\n <div className=\"flex flex-col h-full\">\n <div className=\"flex justify-end mb-2\">\n <InlineDateRangeSelect\n value={hydrated.dateRange}\n onChange={(dateRange) => onSettingsChange({ ...hydrated, dateRange })}\n />\n </div>\n <div className=\"flex-1 min-h-0\">\n <BarChart\n data={data}\n index=\"name\"\n categories={['Revenue']}\n categoryLabels={{ Revenue: t('dashboards.analytics.widgets.topCustomers.column.revenue', 'Revenue') }}\n loading={loading}\n error={error}\n layout={hydrated.layout}\n valueFormatter={formatCurrencyCompact}\n colors={['emerald']}\n showLegend={false}\n emptyMessage={t('dashboards.analytics.widgets.topProducts.empty', 'No product sales data for this period')}\n />\n </div>\n </div>\n )\n}\n\nexport default TopProductsWidget\n"],
|
|
5
|
+
"mappings": ";AA2GQ,cAMA,YANA;AAzGR,YAAY,WAAW;AAEvB,SAAS,qBAA6C;AACtD,SAAS,YAAY;AACrB,SAAS,gBAAuC;AAChD,SAAS,iBAAiB,6BAAmD;AAC7E,SAAS,aAAa;AACtB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB,uBAAiD;AAE5E,SAAS,6BAA6B;AACtC,SAAS,oBAAoB;AAE7B,MAAM,SAAS,aAAa,YAAY,EAAE,MAAM,EAAE,WAAW,eAAe,CAAC;AAE7E,eAAe,qBAAqB,UAA+B,iBAAiE;AAClI,QAAM,OAAO;AAAA,IACX,YAAY;AAAA,IACZ,QAAQ;AAAA,MACN,OAAO;AAAA,MACP,WAAW;AAAA,IACb;AAAA,IACA,SAAS;AAAA,MACP,OAAO;AAAA,MACP,OAAO,SAAS;AAAA,MAChB,eAAe;AAAA,IACjB;AAAA,IACA,WAAW;AAAA,MACT,OAAO;AAAA,MACP,QAAQ,SAAS;AAAA,IACnB;AAAA,EACF;AAEA,SAAO,gBAAoC,IAAI;AACjD;AAEA,SAAS,cACP,OACA,GACA,YAAoB,IACZ;AACR,MAAI,SAAS,QAAQ,UAAU,GAAI,QAAO,EAAE,8CAA8C,iBAAiB;AAC3G,QAAM,WAAW,OAAO,KAAK;AAE7B,MAAI,aAAa,OAAO,aAAa,UAAU,aAAa,aAAa;AACvE,WAAO,EAAE,8CAA8C,iBAAiB;AAAA,EAC1E;AACA,MAAI,kEAAkE,KAAK,QAAQ,GAAG;AACpF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