@open-mercato/core 0.6.5-develop.4516.1.88e6ab71a9 → 0.6.5-develop.4544.1.71c003c861
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 +5 -0
- package/dist/generated/entities/role/index.js +3 -1
- package/dist/generated/entities/role/index.js.map +2 -2
- package/dist/generated/entities/step_instance/index.js +2 -0
- package/dist/generated/entities/step_instance/index.js.map +2 -2
- package/dist/generated/entities/user/index.js +3 -1
- package/dist/generated/entities/user/index.js.map +2 -2
- package/dist/generated/entities/user_task/index.js +2 -0
- package/dist/generated/entities/user_task/index.js.map +2 -2
- package/dist/generated/entities/workflow_branch_instance/index.js +39 -0
- package/dist/generated/entities/workflow_branch_instance/index.js.map +7 -0
- package/dist/generated/entities/workflow_event/index.js +2 -0
- package/dist/generated/entities/workflow_event/index.js.map +2 -2
- package/dist/generated/entities/workflow_instance/index.js +2 -0
- package/dist/generated/entities/workflow_instance/index.js.map +2 -2
- package/dist/generated/entities.ids.generated.js +1 -0
- package/dist/generated/entities.ids.generated.js.map +2 -2
- package/dist/generated/entity-fields-registry.js +26 -0
- package/dist/generated/entity-fields-registry.js.map +2 -2
- package/dist/helpers/integration/optimisticLockUi.js +104 -0
- package/dist/helpers/integration/optimisticLockUi.js.map +7 -0
- package/dist/helpers/integration/salesFixtures.js +17 -0
- package/dist/helpers/integration/salesFixtures.js.map +2 -2
- package/dist/modules/api_keys/backend/api-keys/page.js +9 -5
- package/dist/modules/api_keys/backend/api-keys/page.js.map +2 -2
- package/dist/modules/attachments/components/AttachmentPartitionSettings.js +17 -9
- package/dist/modules/attachments/components/AttachmentPartitionSettings.js.map +2 -2
- package/dist/modules/auth/api/roles/acl/route.js +32 -13
- package/dist/modules/auth/api/roles/acl/route.js.map +2 -2
- package/dist/modules/auth/api/roles/route.js +3 -1
- package/dist/modules/auth/api/roles/route.js.map +2 -2
- package/dist/modules/auth/api/sidebar/preferences/route.js +71 -3
- package/dist/modules/auth/api/sidebar/preferences/route.js.map +2 -2
- package/dist/modules/auth/api/users/acl/route.js +42 -19
- package/dist/modules/auth/api/users/acl/route.js.map +2 -2
- package/dist/modules/auth/api/users/route.js +3 -1
- package/dist/modules/auth/api/users/route.js.map +2 -2
- package/dist/modules/auth/backend/roles/[id]/edit/page.js +24 -4
- package/dist/modules/auth/backend/roles/[id]/edit/page.js.map +2 -2
- package/dist/modules/auth/backend/roles/page.js +8 -4
- package/dist/modules/auth/backend/roles/page.js.map +2 -2
- package/dist/modules/auth/backend/users/[id]/edit/page.js +27 -5
- package/dist/modules/auth/backend/users/[id]/edit/page.js.map +2 -2
- package/dist/modules/auth/backend/users/page.js +6 -2
- package/dist/modules/auth/backend/users/page.js.map +2 -2
- package/dist/modules/auth/components/AclEditor.js +3 -1
- package/dist/modules/auth/components/AclEditor.js.map +2 -2
- package/dist/modules/auth/data/entities.js +6 -0
- package/dist/modules/auth/data/entities.js.map +2 -2
- package/dist/modules/auth/services/sidebarPreferencesService.js +32 -4
- package/dist/modules/auth/services/sidebarPreferencesService.js.map +2 -2
- package/dist/modules/business_rules/api/rules/route.js +28 -0
- package/dist/modules/business_rules/api/rules/route.js.map +2 -2
- package/dist/modules/business_rules/api/sets/route.js +28 -0
- package/dist/modules/business_rules/api/sets/route.js.map +2 -2
- package/dist/modules/business_rules/backend/rules/[id]/page.js +11 -4
- package/dist/modules/business_rules/backend/rules/[id]/page.js.map +3 -3
- package/dist/modules/business_rules/backend/rules/page.js +20 -11
- package/dist/modules/business_rules/backend/rules/page.js.map +2 -2
- package/dist/modules/business_rules/backend/sets/[id]/page.js +11 -4
- package/dist/modules/business_rules/backend/sets/[id]/page.js.map +2 -2
- package/dist/modules/business_rules/backend/sets/page.js +20 -11
- package/dist/modules/business_rules/backend/sets/page.js.map +2 -2
- package/dist/modules/catalog/api/categories/route.js +2 -0
- package/dist/modules/catalog/api/categories/route.js.map +2 -2
- package/dist/modules/catalog/api/products/route.js +2 -1
- package/dist/modules/catalog/api/products/route.js.map +2 -2
- package/dist/modules/catalog/backend/catalog/categories/[id]/edit/page.js +2 -0
- package/dist/modules/catalog/backend/catalog/categories/[id]/edit/page.js.map +2 -2
- package/dist/modules/catalog/backend/catalog/products/[id]/page.js +94 -40
- package/dist/modules/catalog/backend/catalog/products/[id]/page.js.map +2 -2
- package/dist/modules/catalog/backend/catalog/products/[productId]/variants/[variantId]/page.js +37 -8
- package/dist/modules/catalog/backend/catalog/products/[productId]/variants/[variantId]/page.js.map +2 -2
- package/dist/modules/catalog/backend/catalog/products/optionSchemaClient.js.map +2 -2
- package/dist/modules/catalog/commands/variants.js +32 -31
- package/dist/modules/catalog/commands/variants.js.map +2 -2
- package/dist/modules/catalog/components/PriceKindSettings.js +12 -5
- package/dist/modules/catalog/components/PriceKindSettings.js.map +2 -2
- package/dist/modules/catalog/components/categories/CategoriesDataTable.js.map +2 -2
- package/dist/modules/catalog/components/products/ProductMediaManager.js.map +2 -2
- package/dist/modules/catalog/components/products/ProductsDataTable.js +5 -3
- package/dist/modules/catalog/components/products/ProductsDataTable.js.map +2 -2
- package/dist/modules/catalog/components/products/productForm.js.map +2 -2
- package/dist/modules/catalog/components/products/variantForm.js +2 -1
- package/dist/modules/catalog/components/products/variantForm.js.map +2 -2
- package/dist/modules/communication_channels/backend/profile/communication-channels/page.js +5 -0
- package/dist/modules/communication_channels/backend/profile/communication-channels/page.js.map +2 -2
- package/dist/modules/currencies/backend/currencies/[id]/page.js +6 -3
- package/dist/modules/currencies/backend/currencies/[id]/page.js.map +2 -2
- package/dist/modules/currencies/backend/currencies/page.js +18 -11
- package/dist/modules/currencies/backend/currencies/page.js.map +2 -2
- package/dist/modules/currencies/backend/exchange-rates/[id]/page.js +1 -0
- package/dist/modules/currencies/backend/exchange-rates/[id]/page.js.map +2 -2
- package/dist/modules/currencies/backend/exchange-rates/page.js +10 -6
- package/dist/modules/currencies/backend/exchange-rates/page.js.map +2 -2
- package/dist/modules/currencies/commands/currencies.js +7 -5
- package/dist/modules/currencies/commands/currencies.js.map +2 -2
- package/dist/modules/currencies/components/CurrencyFetchingConfig.js +26 -19
- package/dist/modules/currencies/components/CurrencyFetchingConfig.js.map +2 -2
- package/dist/modules/customer_accounts/api/admin/roles/[id].js +28 -5
- package/dist/modules/customer_accounts/api/admin/roles/[id].js.map +2 -2
- package/dist/modules/customer_accounts/api/admin/roles.js +4 -2
- package/dist/modules/customer_accounts/api/admin/roles.js.map +2 -2
- package/dist/modules/customer_accounts/api/admin/users/[id].js +28 -5
- package/dist/modules/customer_accounts/api/admin/users/[id].js.map +2 -2
- package/dist/modules/customer_accounts/api/admin/users.js +2 -0
- package/dist/modules/customer_accounts/api/admin/users.js.map +2 -2
- package/dist/modules/customer_accounts/backend/customer_accounts/roles/[id]/page.js +16 -8
- package/dist/modules/customer_accounts/backend/customer_accounts/roles/[id]/page.js.map +2 -2
- package/dist/modules/customer_accounts/backend/customer_accounts/roles/page.js +8 -4
- package/dist/modules/customer_accounts/backend/customer_accounts/roles/page.js.map +2 -2
- package/dist/modules/customer_accounts/backend/customer_accounts/settings/domain/page.js +8 -4
- package/dist/modules/customer_accounts/backend/customer_accounts/settings/domain/page.js.map +2 -2
- package/dist/modules/customer_accounts/backend/customer_accounts/users/[id]/page.js +29 -18
- package/dist/modules/customer_accounts/backend/customer_accounts/users/[id]/page.js.map +2 -2
- package/dist/modules/customer_accounts/backend/customer_accounts/users/page.js +18 -11
- package/dist/modules/customer_accounts/backend/customer_accounts/users/page.js.map +2 -2
- package/dist/modules/customers/api/companies/route.js +13 -2
- package/dist/modules/customers/api/companies/route.js.map +2 -2
- package/dist/modules/customers/api/deals/route.js +2 -0
- package/dist/modules/customers/api/deals/route.js.map +2 -2
- package/dist/modules/customers/api/people/route.js +11 -2
- package/dist/modules/customers/api/people/route.js.map +2 -2
- package/dist/modules/customers/api/todos/route.js +1 -0
- package/dist/modules/customers/api/todos/route.js.map +2 -2
- package/dist/modules/customers/backend/config/customers/deals/page.js.map +2 -2
- package/dist/modules/customers/backend/config/customers/pipeline-stages/page.js +34 -21
- package/dist/modules/customers/backend/config/customers/pipeline-stages/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/companies/[id]/page.js +45 -27
- package/dist/modules/customers/backend/customers/companies/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/companies/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js +22 -5
- package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealFormHandlers.js +30 -8
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealFormHandlers.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/[id]/page.js +1 -0
- package/dist/modules/customers/backend/customers/deals/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/page.js +16 -6
- package/dist/modules/customers/backend/customers/deals/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/pipeline/page.js +62 -39
- package/dist/modules/customers/backend/customers/deals/pipeline/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/people/[id]/page.js +41 -26
- package/dist/modules/customers/backend/customers/people/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/people/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/people-v2/[id]/page.js +50 -23
- package/dist/modules/customers/backend/customers/people-v2/[id]/page.js.map +2 -2
- package/dist/modules/customers/commands/addresses.js +16 -14
- package/dist/modules/customers/commands/addresses.js.map +2 -2
- package/dist/modules/customers/commands/companies.js +1 -1
- package/dist/modules/customers/commands/companies.js.map +2 -2
- package/dist/modules/customers/commands/interactions.js +41 -4
- package/dist/modules/customers/commands/interactions.js.map +2 -2
- package/dist/modules/customers/commands/people.js +1 -1
- package/dist/modules/customers/commands/people.js.map +2 -2
- package/dist/modules/customers/commands/personCompanyLinks.js +8 -5
- package/dist/modules/customers/commands/personCompanyLinks.js.map +2 -2
- package/dist/modules/customers/commands/pipeline-stages.js +13 -11
- package/dist/modules/customers/commands/pipeline-stages.js.map +3 -3
- package/dist/modules/customers/components/AddressFormatSettings.js.map +2 -2
- package/dist/modules/customers/components/DictionarySettings.js +20 -13
- package/dist/modules/customers/components/DictionarySettings.js.map +2 -2
- package/dist/modules/customers/components/DictionarySortSettings.js +4 -0
- package/dist/modules/customers/components/DictionarySortSettings.js.map +2 -2
- package/dist/modules/customers/components/PipelineSettings.js +38 -23
- package/dist/modules/customers/components/PipelineSettings.js.map +2 -2
- package/dist/modules/customers/components/detail/ActivityTimeline.js +1 -1
- package/dist/modules/customers/components/detail/ActivityTimeline.js.map +2 -2
- package/dist/modules/customers/components/detail/AddressesSection.js +4 -0
- package/dist/modules/customers/components/detail/AddressesSection.js.map +2 -2
- package/dist/modules/customers/components/detail/CompanyPeopleSection.js +28 -22
- package/dist/modules/customers/components/detail/CompanyPeopleSection.js.map +2 -2
- package/dist/modules/customers/components/detail/DealsSection.js +36 -24
- package/dist/modules/customers/components/detail/DealsSection.js.map +2 -2
- package/dist/modules/customers/components/detail/EmailCardActions.js +5 -0
- package/dist/modules/customers/components/detail/EmailCardActions.js.map +2 -2
- package/dist/modules/customers/components/detail/EntityTagsDialog.js +7 -0
- package/dist/modules/customers/components/detail/EntityTagsDialog.js.map +2 -2
- package/dist/modules/customers/components/detail/ManageTagsDialog.js +34 -22
- package/dist/modules/customers/components/detail/ManageTagsDialog.js.map +2 -2
- package/dist/modules/customers/components/detail/PersonCompaniesSection.js +41 -29
- package/dist/modules/customers/components/detail/PersonCompaniesSection.js.map +2 -2
- package/dist/modules/customers/components/detail/RoleAssignmentRow.js +14 -8
- package/dist/modules/customers/components/detail/RoleAssignmentRow.js.map +2 -2
- package/dist/modules/customers/components/detail/ScheduleActivityDialog.js +14 -6
- package/dist/modules/customers/components/detail/ScheduleActivityDialog.js.map +2 -2
- package/dist/modules/customers/components/detail/hooks/useInteractionMutations.js +29 -13
- package/dist/modules/customers/components/detail/hooks/useInteractionMutations.js.map +2 -2
- package/dist/modules/customers/components/detail/hooks/useInteractions.js +77 -35
- package/dist/modules/customers/components/detail/hooks/useInteractions.js.map +2 -2
- package/dist/modules/customers/components/detail/hooks/usePersonTasks.js +25 -17
- package/dist/modules/customers/components/detail/hooks/usePersonTasks.js.map +2 -2
- package/dist/modules/customers/components/detail/schedule/useScheduleFormState.js.map +2 -2
- package/dist/modules/customers/components/formConfig.js.map +2 -2
- package/dist/modules/customers/data/guards.js +66 -0
- package/dist/modules/customers/data/guards.js.map +7 -0
- package/dist/modules/customers/di.js +37 -0
- package/dist/modules/customers/di.js.map +2 -2
- package/dist/modules/customers/lib/todoCompatibility.js +11 -0
- package/dist/modules/customers/lib/todoCompatibility.js.map +2 -2
- package/dist/modules/dashboards/components/WidgetVisibilityEditor.js.map +2 -2
- package/dist/modules/data_sync/api/options.js +4 -4
- package/dist/modules/data_sync/api/options.js.map +2 -2
- package/dist/modules/data_sync/api/schedules/route.js +9 -1
- package/dist/modules/data_sync/api/schedules/route.js.map +2 -2
- package/dist/modules/data_sync/backend/data-sync/page.js +17 -8
- package/dist/modules/data_sync/backend/data-sync/page.js.map +2 -2
- package/dist/modules/data_sync/components/IntegrationScheduleTab.js +43 -22
- package/dist/modules/data_sync/components/IntegrationScheduleTab.js.map +2 -2
- package/dist/modules/data_sync/lib/sync-schedule-service.js +9 -0
- package/dist/modules/data_sync/lib/sync-schedule-service.js.map +2 -2
- package/dist/modules/dictionaries/api/[dictionaryId]/entries/[entryId]/route.js +8 -1
- package/dist/modules/dictionaries/api/[dictionaryId]/entries/[entryId]/route.js.map +2 -2
- package/dist/modules/dictionaries/api/[dictionaryId]/route.js +17 -1
- package/dist/modules/dictionaries/api/[dictionaryId]/route.js.map +2 -2
- package/dist/modules/dictionaries/components/DictionariesManager.js +31 -10
- package/dist/modules/dictionaries/components/DictionariesManager.js.map +2 -2
- package/dist/modules/dictionaries/components/DictionaryEntriesEditor.js +28 -15
- package/dist/modules/dictionaries/components/DictionaryEntriesEditor.js.map +2 -2
- package/dist/modules/directory/api/organizations/route.js +3 -0
- package/dist/modules/directory/api/organizations/route.js.map +2 -2
- package/dist/modules/directory/backend/directory/organizations/[id]/edit/page.js +2 -0
- package/dist/modules/directory/backend/directory/organizations/[id]/edit/page.js.map +2 -2
- package/dist/modules/directory/backend/directory/organizations/page.js +9 -5
- package/dist/modules/directory/backend/directory/organizations/page.js.map +2 -2
- package/dist/modules/directory/backend/directory/tenants/[id]/edit/page.js +7 -3
- package/dist/modules/directory/backend/directory/tenants/[id]/edit/page.js.map +2 -2
- package/dist/modules/directory/backend/directory/tenants/page.js +8 -4
- package/dist/modules/directory/backend/directory/tenants/page.js.map +2 -2
- package/dist/modules/directory/commands/organizations.js +7 -2
- package/dist/modules/directory/commands/organizations.js.map +2 -2
- package/dist/modules/entities/api/records.js +66 -0
- package/dist/modules/entities/api/records.js.map +2 -2
- package/dist/modules/entities/backend/entities/user/[entityId]/records/[recordId]/page.js +1 -0
- package/dist/modules/entities/backend/entities/user/[entityId]/records/[recordId]/page.js.map +2 -2
- package/dist/modules/entities/backend/entities/user/[entityId]/records/page.js +8 -4
- package/dist/modules/entities/backend/entities/user/[entityId]/records/page.js.map +2 -2
- package/dist/modules/entities/lib/helpers.js +17 -0
- package/dist/modules/entities/lib/helpers.js.map +2 -2
- package/dist/modules/feature_toggles/api/global/[id]/override/route.js +2 -1
- package/dist/modules/feature_toggles/api/global/[id]/override/route.js.map +2 -2
- package/dist/modules/feature_toggles/api/overrides/route.js +15 -0
- package/dist/modules/feature_toggles/api/overrides/route.js.map +2 -2
- package/dist/modules/feature_toggles/backend/feature-toggles/global/[id]/edit/page.js +15 -14
- package/dist/modules/feature_toggles/backend/feature-toggles/global/[id]/edit/page.js.map +2 -2
- package/dist/modules/feature_toggles/components/FeatureToggleOverrideCard.js +20 -12
- package/dist/modules/feature_toggles/components/FeatureToggleOverrideCard.js.map +2 -2
- package/dist/modules/feature_toggles/components/FeatureTogglesTable.js +6 -2
- package/dist/modules/feature_toggles/components/FeatureTogglesTable.js.map +2 -2
- package/dist/modules/feature_toggles/components/formConfig.js +2 -1
- package/dist/modules/feature_toggles/components/formConfig.js.map +2 -2
- package/dist/modules/feature_toggles/components/overrideFormConfig.js +5 -1
- package/dist/modules/feature_toggles/components/overrideFormConfig.js.map +2 -2
- package/dist/modules/feature_toggles/data/validators.js +7 -4
- package/dist/modules/feature_toggles/data/validators.js.map +2 -2
- package/dist/modules/inbox_ops/api/settings/route.js +17 -2
- package/dist/modules/inbox_ops/api/settings/route.js.map +2 -2
- package/dist/modules/inbox_ops/backend/inbox-ops/settings/page.js +13 -8
- package/dist/modules/inbox_ops/backend/inbox-ops/settings/page.js.map +2 -2
- package/dist/modules/inbox_ops/components/proposals/EditActionDialog.js +9 -4
- package/dist/modules/inbox_ops/components/proposals/EditActionDialog.js.map +2 -2
- package/dist/modules/integrations/backend/integrations/bundle/[id]/page.js +18 -11
- package/dist/modules/integrations/backend/integrations/bundle/[id]/page.js.map +2 -2
- package/dist/modules/integrations/backend/integrations/page.js +12 -8
- package/dist/modules/integrations/backend/integrations/page.js.map +2 -2
- package/dist/modules/messages/commands/messages.js +13 -10
- package/dist/modules/messages/commands/messages.js.map +2 -2
- package/dist/modules/perspectives/api/[tableId]/route.js +39 -30
- package/dist/modules/perspectives/api/[tableId]/route.js.map +2 -2
- package/dist/modules/perspectives/services/perspectiveService.js +7 -0
- package/dist/modules/perspectives/services/perspectiveService.js.map +2 -2
- package/dist/modules/planner/backend/planner/availability-rulesets/[id]/page.js +6 -14
- package/dist/modules/planner/backend/planner/availability-rulesets/[id]/page.js.map +3 -3
- package/dist/modules/planner/backend/planner/availability-rulesets/page.js +4 -2
- package/dist/modules/planner/backend/planner/availability-rulesets/page.js.map +2 -2
- package/dist/modules/planner/components/AvailabilityRuleSetForm.js +2 -0
- package/dist/modules/planner/components/AvailabilityRuleSetForm.js.map +2 -2
- package/dist/modules/planner/components/AvailabilityRulesEditor.js +36 -11
- package/dist/modules/planner/components/AvailabilityRulesEditor.js.map +2 -2
- package/dist/modules/planner/components/AvailabilitySchedule.js +9 -5
- package/dist/modules/planner/components/AvailabilitySchedule.js.map +2 -2
- package/dist/modules/progress/api/jobs/[id]/route.js +7 -1
- package/dist/modules/progress/api/jobs/[id]/route.js.map +2 -2
- package/dist/modules/query_index/lib/engine.js +19 -0
- package/dist/modules/query_index/lib/engine.js.map +2 -2
- package/dist/modules/resources/backend/resources/resource-types/[id]/edit/page.js +1 -0
- package/dist/modules/resources/backend/resources/resource-types/[id]/edit/page.js.map +2 -2
- package/dist/modules/resources/backend/resources/resource-types/page.js +4 -2
- package/dist/modules/resources/backend/resources/resource-types/page.js.map +2 -2
- package/dist/modules/resources/backend/resources/resources/[id]/page.js +14 -3
- package/dist/modules/resources/backend/resources/resources/[id]/page.js.map +2 -2
- package/dist/modules/resources/backend/resources/resources/page.js +8 -4
- package/dist/modules/resources/backend/resources/resources/page.js.map +2 -2
- package/dist/modules/resources/components/ResourceCrudForm.js +2 -0
- package/dist/modules/resources/components/ResourceCrudForm.js.map +2 -2
- package/dist/modules/resources/components/ResourceTypeCrudForm.js +1 -0
- package/dist/modules/resources/components/ResourceTypeCrudForm.js.map +2 -2
- package/dist/modules/sales/api/documents/factory.js +7 -2
- package/dist/modules/sales/api/documents/factory.js.map +2 -2
- package/dist/modules/sales/backend/sales/channels/[channelId]/edit/page.js +3 -1
- package/dist/modules/sales/backend/sales/channels/[channelId]/edit/page.js.map +2 -2
- package/dist/modules/sales/backend/sales/channels/offers/page.js +13 -4
- package/dist/modules/sales/backend/sales/channels/offers/page.js.map +2 -2
- package/dist/modules/sales/backend/sales/channels/page.js +16 -4
- package/dist/modules/sales/backend/sales/channels/page.js.map +2 -2
- package/dist/modules/sales/backend/sales/documents/[id]/page.js +68 -22
- package/dist/modules/sales/backend/sales/documents/[id]/page.js.map +2 -2
- package/dist/modules/sales/backend/sales/documents/create/page.js.map +2 -2
- package/dist/modules/sales/commands/documentAddresses.js +181 -2
- package/dist/modules/sales/commands/documentAddresses.js.map +2 -2
- package/dist/modules/sales/commands/documents.js +29 -1
- package/dist/modules/sales/commands/documents.js.map +2 -2
- package/dist/modules/sales/commands/returns.js +12 -2
- package/dist/modules/sales/commands/returns.js.map +2 -2
- package/dist/modules/sales/commands/shared.js +15 -0
- package/dist/modules/sales/commands/shared.js.map +2 -2
- package/dist/modules/sales/commands/shipments.js +4 -1
- package/dist/modules/sales/commands/shipments.js.map +2 -2
- package/dist/modules/sales/components/AdjustmentKindSettings.js +19 -11
- package/dist/modules/sales/components/AdjustmentKindSettings.js.map +2 -2
- package/dist/modules/sales/components/DocumentNumberSettings.js.map +2 -2
- package/dist/modules/sales/components/OrderEditingSettings.js.map +2 -2
- package/dist/modules/sales/components/PaymentMethodsSettings.js +12 -4
- package/dist/modules/sales/components/PaymentMethodsSettings.js.map +2 -2
- package/dist/modules/sales/components/ShippingMethodsSettings.js +12 -4
- package/dist/modules/sales/components/ShippingMethodsSettings.js.map +2 -2
- package/dist/modules/sales/components/StatusSettings.js +18 -11
- package/dist/modules/sales/components/StatusSettings.js.map +2 -2
- package/dist/modules/sales/components/TaxRatesSettings.js +12 -4
- package/dist/modules/sales/components/TaxRatesSettings.js.map +2 -2
- package/dist/modules/sales/components/channels/ChannelOfferForm.js +47 -16
- package/dist/modules/sales/components/channels/ChannelOfferForm.js.map +2 -2
- package/dist/modules/sales/components/channels/SalesChannelOffersPanel.js +8 -4
- package/dist/modules/sales/components/channels/SalesChannelOffersPanel.js.map +2 -2
- package/dist/modules/sales/components/documents/AddressesSection.js +44 -25
- package/dist/modules/sales/components/documents/AddressesSection.js.map +2 -2
- package/dist/modules/sales/components/documents/AdjustmentsSection.js +43 -23
- package/dist/modules/sales/components/documents/AdjustmentsSection.js.map +2 -2
- package/dist/modules/sales/components/documents/ItemsSection.js +22 -13
- package/dist/modules/sales/components/documents/ItemsSection.js.map +2 -2
- package/dist/modules/sales/components/documents/LineItemDialog.js +23 -10
- package/dist/modules/sales/components/documents/LineItemDialog.js.map +2 -2
- package/dist/modules/sales/components/documents/PaymentDialog.js +29 -14
- package/dist/modules/sales/components/documents/PaymentDialog.js.map +2 -2
- package/dist/modules/sales/components/documents/PaymentsSection.js +20 -10
- package/dist/modules/sales/components/documents/PaymentsSection.js.map +2 -2
- package/dist/modules/sales/components/documents/ReturnDialog.js +26 -17
- package/dist/modules/sales/components/documents/ReturnDialog.js.map +2 -2
- package/dist/modules/sales/components/documents/ReturnsSection.js +3 -1
- package/dist/modules/sales/components/documents/ReturnsSection.js.map +2 -2
- package/dist/modules/sales/components/documents/SalesDocumentsTable.js +10 -5
- package/dist/modules/sales/components/documents/SalesDocumentsTable.js.map +2 -2
- package/dist/modules/sales/components/documents/ShipmentDialog.js +21 -7
- package/dist/modules/sales/components/documents/ShipmentDialog.js.map +2 -2
- package/dist/modules/sales/components/documents/ShipmentsSection.js +19 -10
- package/dist/modules/sales/components/documents/ShipmentsSection.js.map +2 -2
- package/dist/modules/sales/components/documents/optimisticLock.js +27 -0
- package/dist/modules/sales/components/documents/optimisticLock.js.map +7 -0
- package/dist/modules/sales/di.js +18 -0
- package/dist/modules/sales/di.js.map +2 -2
- package/dist/modules/shipping_carriers/api/cancel/route.js +2 -2
- package/dist/modules/shipping_carriers/api/cancel/route.js.map +2 -2
- package/dist/modules/shipping_carriers/lib/status-sync.js +8 -1
- package/dist/modules/shipping_carriers/lib/status-sync.js.map +2 -2
- package/dist/modules/staff/api/job-histories.js +11 -2
- package/dist/modules/staff/api/job-histories.js.map +2 -2
- package/dist/modules/staff/api/timesheets/time-entries/route.js +11 -4
- package/dist/modules/staff/api/timesheets/time-entries/route.js.map +2 -2
- package/dist/modules/staff/backend/staff/leave-requests/[id]/page.js +13 -8
- package/dist/modules/staff/backend/staff/leave-requests/[id]/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/my-leave-requests/[id]/page.js +2 -1
- package/dist/modules/staff/backend/staff/my-leave-requests/[id]/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/team-members/[id]/page.js +7 -4
- package/dist/modules/staff/backend/staff/team-members/[id]/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/team-members/page.js +4 -2
- package/dist/modules/staff/backend/staff/team-members/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/team-roles/[id]/edit/page.js +1 -0
- package/dist/modules/staff/backend/staff/team-roles/[id]/edit/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/team-roles/page.js +4 -2
- package/dist/modules/staff/backend/staff/team-roles/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js +5 -2
- package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/teams/page.js +12 -3
- package/dist/modules/staff/backend/staff/teams/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/timesheets/page.js +4 -1
- package/dist/modules/staff/backend/staff/timesheets/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/timesheets/projects/[id]/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/timesheets/projects/page.js +12 -3
- package/dist/modules/staff/backend/staff/timesheets/projects/page.js.map +2 -2
- package/dist/modules/staff/commands/job-histories.js +40 -3
- package/dist/modules/staff/commands/job-histories.js.map +2 -2
- package/dist/modules/staff/components/LeaveRequestForm.js +1 -0
- package/dist/modules/staff/components/LeaveRequestForm.js.map +2 -2
- package/dist/modules/staff/components/TeamForm.js +1 -0
- package/dist/modules/staff/components/TeamForm.js.map +2 -2
- package/dist/modules/staff/components/TeamMemberForm.js +1 -0
- package/dist/modules/staff/components/TeamMemberForm.js.map +2 -2
- package/dist/modules/staff/components/TeamRoleForm.js +1 -0
- package/dist/modules/staff/components/TeamRoleForm.js.map +2 -2
- package/dist/modules/staff/components/detail/JobHistorySection.js +20 -7
- package/dist/modules/staff/components/detail/JobHistorySection.js.map +2 -2
- package/dist/modules/staff/data/validators.js +7 -1
- package/dist/modules/staff/data/validators.js.map +2 -2
- package/dist/modules/staff/lib/leaveRequestHelpers.js +2 -1
- package/dist/modules/staff/lib/leaveRequestHelpers.js.map +2 -2
- package/dist/modules/translations/components/TranslationManager.js +12 -8
- package/dist/modules/translations/components/TranslationManager.js.map +2 -2
- package/dist/modules/workflows/api/definitions/[id]/route.js +106 -0
- package/dist/modules/workflows/api/definitions/[id]/route.js.map +2 -2
- package/dist/modules/workflows/backend/definitions/[id]/page.js +11 -3
- package/dist/modules/workflows/backend/definitions/[id]/page.js.map +2 -2
- package/dist/modules/workflows/backend/definitions/page.js +19 -8
- package/dist/modules/workflows/backend/definitions/page.js.map +2 -2
- package/dist/modules/workflows/backend/definitions/visual-editor/page.js +29 -16
- package/dist/modules/workflows/backend/definitions/visual-editor/page.js.map +2 -2
- package/dist/modules/workflows/components/NodeEditDialog.js +3 -1
- package/dist/modules/workflows/components/NodeEditDialog.js.map +2 -2
- package/dist/modules/workflows/components/WorkflowGraphImpl.js +4 -2
- package/dist/modules/workflows/components/WorkflowGraphImpl.js.map +2 -2
- package/dist/modules/workflows/components/formConfig.js +4 -1
- package/dist/modules/workflows/components/formConfig.js.map +2 -2
- package/dist/modules/workflows/components/nodes/ParallelForkNode.js +49 -0
- package/dist/modules/workflows/components/nodes/ParallelForkNode.js.map +7 -0
- package/dist/modules/workflows/components/nodes/ParallelJoinNode.js +49 -0
- package/dist/modules/workflows/components/nodes/ParallelJoinNode.js.map +7 -0
- package/dist/modules/workflows/components/nodes/index.js +4 -0
- package/dist/modules/workflows/components/nodes/index.js.map +2 -2
- package/dist/modules/workflows/data/entities.js +81 -0
- package/dist/modules/workflows/data/entities.js.map +2 -2
- package/dist/modules/workflows/data/validators.js +146 -1
- package/dist/modules/workflows/data/validators.js.map +2 -2
- package/dist/modules/workflows/di.js +12 -0
- package/dist/modules/workflows/di.js.map +2 -2
- package/dist/modules/workflows/events.js +7 -1
- package/dist/modules/workflows/events.js.map +2 -2
- package/dist/modules/workflows/lib/activity-executor.js +4 -2
- package/dist/modules/workflows/lib/activity-executor.js.map +2 -2
- package/dist/modules/workflows/lib/activity-queue-types.js.map +2 -2
- package/dist/modules/workflows/lib/event-logger.js +2 -0
- package/dist/modules/workflows/lib/event-logger.js.map +2 -2
- package/dist/modules/workflows/lib/execution-token.js +98 -0
- package/dist/modules/workflows/lib/execution-token.js.map +7 -0
- package/dist/modules/workflows/lib/node-type-icons.js +14 -5
- package/dist/modules/workflows/lib/node-type-icons.js.map +2 -2
- package/dist/modules/workflows/lib/parallel-handler.js +364 -0
- package/dist/modules/workflows/lib/parallel-handler.js.map +7 -0
- package/dist/modules/workflows/lib/signal-handler.js +63 -1
- package/dist/modules/workflows/lib/signal-handler.js.map +2 -2
- package/dist/modules/workflows/lib/step-handler.js +74 -30
- package/dist/modules/workflows/lib/step-handler.js.map +2 -2
- package/dist/modules/workflows/lib/task-handler.js +26 -0
- package/dist/modules/workflows/lib/task-handler.js.map +2 -2
- package/dist/modules/workflows/lib/timer-handler.js +26 -1
- package/dist/modules/workflows/lib/timer-handler.js.map +2 -2
- package/dist/modules/workflows/lib/transition-handler.js +33 -21
- package/dist/modules/workflows/lib/transition-handler.js.map +2 -2
- package/dist/modules/workflows/lib/workflow-executor.js +39 -1
- package/dist/modules/workflows/lib/workflow-executor.js.map +2 -2
- package/dist/modules/workflows/migrations/Migration20260602120000.js +24 -0
- package/dist/modules/workflows/migrations/Migration20260602120000.js.map +7 -0
- package/dist/modules/workflows/workers/workflow-activities.worker.js +8 -4
- package/dist/modules/workflows/workers/workflow-activities.worker.js.map +2 -2
- package/generated/entities/role/index.ts +1 -0
- package/generated/entities/step_instance/index.ts +1 -0
- package/generated/entities/user/index.ts +1 -0
- package/generated/entities/user_task/index.ts +1 -0
- package/generated/entities/workflow_branch_instance/index.ts +18 -0
- package/generated/entities/workflow_event/index.ts +1 -0
- package/generated/entities/workflow_instance/index.ts +1 -0
- package/generated/entities.ids.generated.ts +1 -0
- package/generated/entity-fields-registry.ts +26 -0
- package/jest.setup.ts +17 -0
- package/package.json +8 -7
- package/src/helpers/integration/optimisticLockUi.ts +172 -0
- package/src/helpers/integration/salesFixtures.ts +29 -0
- package/src/modules/api_keys/backend/api-keys/page.tsx +10 -5
- package/src/modules/attachments/components/AttachmentPartitionSettings.tsx +19 -9
- package/src/modules/auth/api/roles/acl/route.ts +37 -11
- package/src/modules/auth/api/roles/route.ts +2 -0
- package/src/modules/auth/api/sidebar/preferences/route.ts +73 -0
- package/src/modules/auth/api/users/acl/route.ts +46 -18
- package/src/modules/auth/api/users/route.ts +2 -0
- package/src/modules/auth/backend/roles/[id]/edit/page.tsx +29 -4
- package/src/modules/auth/backend/roles/page.tsx +9 -4
- package/src/modules/auth/backend/users/[id]/edit/page.tsx +37 -4
- package/src/modules/auth/backend/users/page.tsx +7 -2
- package/src/modules/auth/components/AclEditor.tsx +10 -1
- package/src/modules/auth/data/entities.ts +7 -1
- package/src/modules/auth/services/sidebarPreferencesService.ts +38 -4
- package/src/modules/business_rules/api/rules/route.ts +30 -0
- package/src/modules/business_rules/api/sets/route.ts +30 -0
- package/src/modules/business_rules/backend/rules/[id]/page.tsx +16 -4
- package/src/modules/business_rules/backend/rules/page.tsx +20 -11
- package/src/modules/business_rules/backend/sets/[id]/page.tsx +16 -4
- package/src/modules/business_rules/backend/sets/page.tsx +20 -11
- package/src/modules/catalog/api/categories/route.ts +3 -0
- package/src/modules/catalog/api/products/route.ts +4 -0
- package/src/modules/catalog/backend/catalog/categories/[id]/edit/page.tsx +5 -0
- package/src/modules/catalog/backend/catalog/products/[id]/page.tsx +112 -35
- package/src/modules/catalog/backend/catalog/products/[productId]/variants/[variantId]/page.tsx +56 -7
- package/src/modules/catalog/backend/catalog/products/optionSchemaClient.ts +2 -0
- package/src/modules/catalog/commands/variants.ts +32 -32
- package/src/modules/catalog/components/PriceKindSettings.tsx +20 -7
- package/src/modules/catalog/components/categories/CategoriesDataTable.tsx +1 -0
- package/src/modules/catalog/components/products/ProductMediaManager.tsx +2 -0
- package/src/modules/catalog/components/products/ProductsDataTable.tsx +8 -4
- package/src/modules/catalog/components/products/productForm.ts +3 -0
- package/src/modules/catalog/components/products/variantForm.ts +9 -0
- package/src/modules/communication_channels/backend/profile/communication-channels/page.tsx +5 -0
- package/src/modules/currencies/backend/currencies/[id]/page.tsx +13 -6
- package/src/modules/currencies/backend/currencies/page.tsx +18 -11
- package/src/modules/currencies/backend/exchange-rates/[id]/page.tsx +3 -0
- package/src/modules/currencies/backend/exchange-rates/page.tsx +10 -6
- package/src/modules/currencies/commands/currencies.ts +10 -5
- package/src/modules/currencies/components/CurrencyFetchingConfig.tsx +31 -21
- package/src/modules/customer_accounts/api/admin/roles/[id].ts +35 -5
- package/src/modules/customer_accounts/api/admin/roles.ts +2 -0
- package/src/modules/customer_accounts/api/admin/users/[id].ts +38 -5
- package/src/modules/customer_accounts/api/admin/users.ts +2 -0
- package/src/modules/customer_accounts/backend/customer_accounts/roles/[id]/page.tsx +34 -20
- package/src/modules/customer_accounts/backend/customer_accounts/roles/page.tsx +9 -4
- package/src/modules/customer_accounts/backend/customer_accounts/settings/domain/page.tsx +11 -4
- package/src/modules/customer_accounts/backend/customer_accounts/users/[id]/page.tsx +28 -17
- package/src/modules/customer_accounts/backend/customer_accounts/users/page.tsx +19 -11
- package/src/modules/customers/AGENTS.md +2 -2
- package/src/modules/customers/api/companies/route.ts +14 -1
- package/src/modules/customers/api/deals/route.ts +3 -0
- package/src/modules/customers/api/people/route.ts +12 -1
- package/src/modules/customers/api/todos/route.ts +1 -0
- package/src/modules/customers/backend/config/customers/deals/page.tsx +1 -0
- package/src/modules/customers/backend/config/customers/pipeline-stages/page.tsx +36 -21
- package/src/modules/customers/backend/customers/companies/[id]/page.tsx +52 -27
- package/src/modules/customers/backend/customers/companies/page.tsx +2 -0
- package/src/modules/customers/backend/customers/companies-v2/[id]/page.tsx +27 -5
- package/src/modules/customers/backend/customers/deals/[id]/hooks/useDealFormHandlers.ts +39 -7
- package/src/modules/customers/backend/customers/deals/[id]/page.tsx +1 -0
- package/src/modules/customers/backend/customers/deals/page.tsx +18 -6
- package/src/modules/customers/backend/customers/deals/pipeline/page.tsx +64 -39
- package/src/modules/customers/backend/customers/people/[id]/page.tsx +46 -26
- package/src/modules/customers/backend/customers/people/page.tsx +2 -0
- package/src/modules/customers/backend/customers/people-v2/[id]/page.tsx +84 -24
- package/src/modules/customers/commands/addresses.ts +16 -14
- package/src/modules/customers/commands/companies.ts +3 -1
- package/src/modules/customers/commands/interactions.ts +50 -4
- package/src/modules/customers/commands/people.ts +2 -1
- package/src/modules/customers/commands/personCompanyLinks.ts +8 -5
- package/src/modules/customers/commands/pipeline-stages.ts +16 -16
- package/src/modules/customers/components/AddressFormatSettings.tsx +1 -0
- package/src/modules/customers/components/DictionarySettings.tsx +18 -13
- package/src/modules/customers/components/DictionarySortSettings.tsx +4 -0
- package/src/modules/customers/components/PipelineSettings.tsx +42 -21
- package/src/modules/customers/components/detail/ActivityTimeline.tsx +3 -3
- package/src/modules/customers/components/detail/AddressesSection.tsx +4 -0
- package/src/modules/customers/components/detail/CompanyPeopleSection.tsx +2 -0
- package/src/modules/customers/components/detail/DealsSection.tsx +4 -0
- package/src/modules/customers/components/detail/EmailCardActions.tsx +5 -0
- package/src/modules/customers/components/detail/EntityTagsDialog.tsx +7 -0
- package/src/modules/customers/components/detail/ManageTagsDialog.tsx +4 -0
- package/src/modules/customers/components/detail/PersonCompaniesSection.tsx +4 -0
- package/src/modules/customers/components/detail/RoleAssignmentRow.tsx +2 -0
- package/src/modules/customers/components/detail/ScheduleActivityDialog.tsx +23 -7
- package/src/modules/customers/components/detail/hooks/useInteractionMutations.ts +25 -15
- package/src/modules/customers/components/detail/hooks/useInteractions.ts +76 -35
- package/src/modules/customers/components/detail/hooks/usePersonTasks.ts +30 -17
- package/src/modules/customers/components/detail/schedule/useScheduleFormState.ts +2 -0
- package/src/modules/customers/components/detail/types.ts +1 -0
- package/src/modules/customers/components/formConfig.tsx +2 -0
- package/src/modules/customers/data/guards.ts +67 -0
- package/src/modules/customers/di.ts +66 -0
- package/src/modules/customers/i18n/de.json +2 -0
- package/src/modules/customers/i18n/en.json +2 -0
- package/src/modules/customers/i18n/es.json +2 -0
- package/src/modules/customers/i18n/pl.json +2 -0
- package/src/modules/customers/lib/todoCompatibility.ts +14 -0
- package/src/modules/dashboards/components/WidgetVisibilityEditor.tsx +2 -0
- package/src/modules/data_sync/api/options.ts +7 -4
- package/src/modules/data_sync/api/schedules/route.ts +9 -1
- package/src/modules/data_sync/backend/data-sync/page.tsx +18 -5
- package/src/modules/data_sync/components/IntegrationScheduleTab.tsx +46 -19
- package/src/modules/data_sync/lib/sync-schedule-service.ts +11 -0
- package/src/modules/dictionaries/api/[dictionaryId]/entries/[entryId]/route.ts +8 -1
- package/src/modules/dictionaries/api/[dictionaryId]/route.ts +23 -0
- package/src/modules/dictionaries/components/DictionariesManager.tsx +32 -9
- package/src/modules/dictionaries/components/DictionaryEntriesEditor.tsx +30 -14
- package/src/modules/dictionaries/i18n/de.json +1 -0
- package/src/modules/dictionaries/i18n/en.json +1 -0
- package/src/modules/dictionaries/i18n/es.json +1 -0
- package/src/modules/dictionaries/i18n/pl.json +1 -0
- package/src/modules/directory/api/organizations/route.ts +3 -0
- package/src/modules/directory/backend/directory/organizations/[id]/edit/page.tsx +8 -0
- package/src/modules/directory/backend/directory/organizations/page.tsx +10 -5
- package/src/modules/directory/backend/directory/tenants/[id]/edit/page.tsx +16 -5
- package/src/modules/directory/backend/directory/tenants/page.tsx +8 -4
- package/src/modules/directory/commands/organizations.ts +7 -4
- package/src/modules/entities/api/records.ts +99 -0
- package/src/modules/entities/backend/entities/user/[entityId]/records/[recordId]/page.tsx +7 -0
- package/src/modules/entities/backend/entities/user/[entityId]/records/page.tsx +8 -4
- package/src/modules/entities/lib/helpers.ts +17 -0
- package/src/modules/feature_toggles/api/global/[id]/override/route.ts +1 -0
- package/src/modules/feature_toggles/api/overrides/route.ts +19 -0
- package/src/modules/feature_toggles/backend/feature-toggles/global/[id]/edit/page.tsx +19 -13
- package/src/modules/feature_toggles/components/FeatureToggleOverrideCard.tsx +22 -12
- package/src/modules/feature_toggles/components/FeatureTogglesTable.tsx +7 -2
- package/src/modules/feature_toggles/components/formConfig.tsx +2 -1
- package/src/modules/feature_toggles/components/overrideFormConfig.tsx +10 -1
- package/src/modules/feature_toggles/data/validators.ts +11 -3
- package/src/modules/inbox_ops/api/settings/route.ts +18 -0
- package/src/modules/inbox_ops/backend/inbox-ops/settings/page.tsx +15 -10
- package/src/modules/inbox_ops/components/proposals/EditActionDialog.tsx +9 -4
- package/src/modules/integrations/backend/integrations/bundle/[id]/page.tsx +20 -11
- package/src/modules/integrations/backend/integrations/page.tsx +13 -8
- package/src/modules/messages/commands/messages.ts +27 -15
- package/src/modules/perspectives/api/[tableId]/route.ts +11 -2
- package/src/modules/perspectives/services/perspectiveService.ts +13 -1
- package/src/modules/planner/backend/planner/availability-rulesets/[id]/page.tsx +16 -14
- package/src/modules/planner/backend/planner/availability-rulesets/page.tsx +6 -3
- package/src/modules/planner/components/AvailabilityRuleSetForm.tsx +3 -0
- package/src/modules/planner/components/AvailabilityRulesEditor.tsx +58 -15
- package/src/modules/planner/components/AvailabilitySchedule.tsx +22 -7
- package/src/modules/progress/api/jobs/[id]/route.ts +7 -0
- package/src/modules/query_index/lib/engine.ts +34 -0
- package/src/modules/resources/backend/resources/resource-types/[id]/edit/page.tsx +7 -1
- package/src/modules/resources/backend/resources/resource-types/page.tsx +6 -3
- package/src/modules/resources/backend/resources/resources/[id]/page.tsx +23 -3
- package/src/modules/resources/backend/resources/resources/page.tsx +15 -4
- package/src/modules/resources/components/ResourceCrudForm.tsx +3 -0
- package/src/modules/resources/components/ResourceTypeCrudForm.tsx +2 -0
- package/src/modules/sales/api/documents/factory.ts +13 -1
- package/src/modules/sales/backend/sales/channels/[channelId]/edit/page.tsx +6 -0
- package/src/modules/sales/backend/sales/channels/offers/page.tsx +10 -4
- package/src/modules/sales/backend/sales/channels/page.tsx +19 -4
- package/src/modules/sales/backend/sales/documents/[id]/page.tsx +73 -20
- package/src/modules/sales/backend/sales/documents/create/page.tsx +2 -0
- package/src/modules/sales/commands/documentAddresses.ts +226 -4
- package/src/modules/sales/commands/documents.ts +28 -0
- package/src/modules/sales/commands/returns.ts +12 -3
- package/src/modules/sales/commands/shared.ts +36 -0
- package/src/modules/sales/commands/shipments.ts +17 -1
- package/src/modules/sales/components/AdjustmentKindSettings.tsx +20 -11
- package/src/modules/sales/components/DocumentNumberSettings.tsx +1 -0
- package/src/modules/sales/components/OrderEditingSettings.tsx +1 -0
- package/src/modules/sales/components/PaymentMethodsSettings.tsx +12 -4
- package/src/modules/sales/components/ShippingMethodsSettings.tsx +12 -4
- package/src/modules/sales/components/StatusSettings.tsx +20 -11
- package/src/modules/sales/components/TaxRatesSettings.tsx +12 -5
- package/src/modules/sales/components/channels/ChannelOfferForm.tsx +67 -14
- package/src/modules/sales/components/channels/SalesChannelOffersPanel.tsx +7 -4
- package/src/modules/sales/components/documents/AddressesSection.tsx +35 -25
- package/src/modules/sales/components/documents/AdjustmentsSection.tsx +50 -25
- package/src/modules/sales/components/documents/ItemsSection.tsx +24 -13
- package/src/modules/sales/components/documents/LineItemDialog.tsx +26 -9
- package/src/modules/sales/components/documents/PaymentDialog.tsx +33 -14
- package/src/modules/sales/components/documents/PaymentsSection.tsx +22 -10
- package/src/modules/sales/components/documents/ReturnDialog.tsx +28 -17
- package/src/modules/sales/components/documents/ReturnsSection.tsx +4 -1
- package/src/modules/sales/components/documents/SalesDocumentsTable.tsx +11 -4
- package/src/modules/sales/components/documents/ShipmentDialog.tsx +23 -8
- package/src/modules/sales/components/documents/ShipmentsSection.tsx +20 -10
- package/src/modules/sales/components/documents/optimisticLock.ts +34 -0
- package/src/modules/sales/components/documents/shipmentTypes.ts +1 -0
- package/src/modules/sales/di.ts +35 -0
- package/src/modules/sales/i18n/de.json +3 -0
- package/src/modules/sales/i18n/en.json +3 -0
- package/src/modules/sales/i18n/es.json +3 -0
- package/src/modules/sales/i18n/pl.json +3 -0
- package/src/modules/shipping_carriers/api/cancel/route.ts +2 -2
- package/src/modules/shipping_carriers/lib/status-sync.ts +19 -0
- package/src/modules/staff/api/job-histories.ts +12 -2
- package/src/modules/staff/api/timesheets/time-entries/route.ts +16 -4
- package/src/modules/staff/backend/staff/leave-requests/[id]/page.tsx +12 -7
- package/src/modules/staff/backend/staff/my-leave-requests/[id]/page.tsx +2 -0
- package/src/modules/staff/backend/staff/team-members/[id]/page.tsx +16 -5
- package/src/modules/staff/backend/staff/team-members/page.tsx +6 -2
- package/src/modules/staff/backend/staff/team-roles/[id]/edit/page.tsx +8 -0
- package/src/modules/staff/backend/staff/team-roles/page.tsx +6 -2
- package/src/modules/staff/backend/staff/teams/[id]/edit/page.tsx +13 -3
- package/src/modules/staff/backend/staff/teams/page.tsx +9 -3
- package/src/modules/staff/backend/staff/timesheets/page.tsx +10 -1
- package/src/modules/staff/backend/staff/timesheets/projects/[id]/page.tsx +4 -0
- package/src/modules/staff/backend/staff/timesheets/projects/page.tsx +9 -3
- package/src/modules/staff/commands/job-histories.ts +42 -3
- package/src/modules/staff/components/LeaveRequestForm.tsx +2 -0
- package/src/modules/staff/components/TeamForm.tsx +2 -0
- package/src/modules/staff/components/TeamMemberForm.tsx +2 -0
- package/src/modules/staff/components/TeamRoleForm.tsx +2 -0
- package/src/modules/staff/components/detail/JobHistorySection.tsx +28 -6
- package/src/modules/staff/data/validators.ts +6 -0
- package/src/modules/staff/i18n/de.json +1 -0
- package/src/modules/staff/i18n/en.json +1 -0
- package/src/modules/staff/i18n/es.json +1 -0
- package/src/modules/staff/i18n/pl.json +1 -0
- package/src/modules/staff/lib/leaveRequestHelpers.ts +4 -0
- package/src/modules/translations/components/TranslationManager.tsx +13 -8
- package/src/modules/workflows/api/definitions/[id]/route.ts +112 -0
- package/src/modules/workflows/backend/definitions/[id]/page.tsx +20 -4
- package/src/modules/workflows/backend/definitions/page.tsx +20 -9
- package/src/modules/workflows/backend/definitions/visual-editor/page.tsx +29 -16
- package/src/modules/workflows/components/NodeEditDialog.tsx +2 -0
- package/src/modules/workflows/components/WorkflowGraphImpl.tsx +3 -1
- package/src/modules/workflows/components/formConfig.tsx +5 -0
- package/src/modules/workflows/components/nodes/ParallelForkNode.tsx +66 -0
- package/src/modules/workflows/components/nodes/ParallelJoinNode.tsx +66 -0
- package/src/modules/workflows/components/nodes/index.ts +6 -0
- package/src/modules/workflows/data/entities.ts +109 -0
- package/src/modules/workflows/data/validators.ts +223 -0
- package/src/modules/workflows/di.ts +20 -0
- package/src/modules/workflows/events.ts +7 -0
- package/src/modules/workflows/i18n/de.json +13 -0
- package/src/modules/workflows/i18n/en.json +13 -0
- package/src/modules/workflows/i18n/es.json +13 -0
- package/src/modules/workflows/i18n/pl.json +13 -0
- package/src/modules/workflows/lib/activity-executor.ts +8 -2
- package/src/modules/workflows/lib/activity-queue-types.ts +3 -0
- package/src/modules/workflows/lib/event-logger.ts +3 -0
- package/src/modules/workflows/lib/execution-token.ts +166 -0
- package/src/modules/workflows/lib/node-type-icons.ts +11 -2
- package/src/modules/workflows/lib/parallel-handler.ts +575 -0
- package/src/modules/workflows/lib/signal-handler.ts +72 -1
- package/src/modules/workflows/lib/step-handler.ts +94 -34
- package/src/modules/workflows/lib/task-handler.ts +32 -0
- package/src/modules/workflows/lib/timer-handler.ts +30 -1
- package/src/modules/workflows/lib/transition-handler.ts +56 -24
- package/src/modules/workflows/lib/workflow-executor.ts +53 -1
- package/src/modules/workflows/migrations/.snapshot-open-mercato.json +263 -0
- package/src/modules/workflows/migrations/Migration20260602120000.ts +25 -0
- package/src/modules/workflows/workers/workflow-activities.worker.ts +9 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/modules/workflows/components/WorkflowGraphImpl.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport '@xyflow/react/dist/style.css'\n\nimport { useCallback, useMemo, useEffect, useState } from 'react'\nimport {\n ReactFlow,\n Node,\n Edge,\n Controls,\n Background,\n BackgroundVariant,\n MiniMap,\n Panel,\n useNodesState,\n useEdgesState,\n addEdge,\n Connection,\n ConnectionMode,\n MarkerType,\n} from '@xyflow/react'\nimport {StartNode, EndNode, UserTaskNode, AutomatedNode, SubWorkflowNode, WaitForSignalNode, WaitForTimerNode} from './nodes'\nimport { WorkflowTransitionEdge } from './WorkflowTransitionEdge'\nimport { STATUS_COLORS } from '../lib/status-colors'\nimport { Alert, AlertDescription } from '@open-mercato/ui/primitives/alert'\nimport { Edit3 } from 'lucide-react'\nimport { useTheme } from '@open-mercato/ui/theme'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\n\nexport interface WorkflowGraphImplProps {\n initialNodes?: Node[]\n initialEdges?: Edge[]\n onNodesChange?: (changes: any[]) => void\n onEdgesChange?: (changes: any[]) => void\n onNodeClick?: (event: React.MouseEvent, node: Node) => void\n onEdgeClick?: (event: React.MouseEvent, edge: Edge) => void\n onConnect?: (connection: Connection) => void\n editable?: boolean\n className?: string\n height?: string\n}\n\nexport default function WorkflowGraphImpl({\n initialNodes = [],\n initialEdges = [],\n onNodesChange: onNodesChangeProp,\n onEdgesChange: onEdgesChangeProp,\n onNodeClick: onNodeClickProp,\n onEdgeClick: onEdgeClickProp,\n onConnect: onConnectProp,\n editable = false,\n className = '',\n height = '600px',\n}: WorkflowGraphImplProps) {\n const t = useT()\n const [nodes, setNodes, onNodesChange] = useNodesState(initialNodes)\n const [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges)\n\n const { resolvedTheme } = useTheme()\n const isDark = resolvedTheme === 'dark'\n const backgroundDotColor = isDark ? '#374151' : '#e5e7eb'\n const [isCompactViewport, setIsCompactViewport] = useState(false)\n\n useEffect(() => {\n if (typeof window === 'undefined') return\n const mediaQuery = window.matchMedia('(max-width: 1279px)')\n const updateViewportMode = () => setIsCompactViewport(mediaQuery.matches)\n\n updateViewportMode()\n mediaQuery.addEventListener('change', updateViewportMode)\n\n return () => {\n mediaQuery.removeEventListener('change', updateViewportMode)\n }\n }, [])\n\n useEffect(() => {\n setNodes(initialNodes)\n }, [initialNodes, setNodes])\n\n useEffect(() => {\n setEdges(initialEdges)\n }, [initialEdges, setEdges])\n\n const onConnect = useCallback(\n (connection: Connection) => {\n if (onConnectProp) {\n onConnectProp(connection)\n } else {\n const newEdge = {\n ...connection,\n type: 'workflowTransition',\n animated: false,\n markerEnd: {\n type: MarkerType.ArrowClosed,\n width: 16,\n height: 16,\n color: '#9ca3af',\n },\n }\n setEdges((eds) => addEdge(newEdge, eds))\n }\n },\n [setEdges, onConnectProp]\n )\n\n const handleNodesChange = useCallback(\n (changes: any) => {\n onNodesChange(changes)\n if (onNodesChangeProp) {\n onNodesChangeProp(changes)\n }\n },\n [onNodesChange, onNodesChangeProp]\n )\n\n const handleEdgesChange = useCallback(\n (changes: any) => {\n onEdgesChange(changes)\n if (onEdgesChangeProp) {\n onEdgesChangeProp(changes)\n }\n },\n [onEdgesChange, onEdgesChangeProp]\n )\n\n const nodeTypes = useMemo(\n () => ({\n start: StartNode,\n end: EndNode,\n userTask: UserTaskNode,\n automated: AutomatedNode,\n subWorkflow: SubWorkflowNode,\n waitForSignal: WaitForSignalNode,\n waitForTimer: WaitForTimerNode,\n }),\n []\n )\n\n const edgeTypes = useMemo(\n () => ({\n workflowTransition: WorkflowTransitionEdge,\n }),\n []\n )\n\n return (\n <div className={`workflow-graph-container ${className}`} style={{ height }}>\n <ReactFlow\n nodes={nodes}\n edges={edges}\n nodeTypes={nodeTypes}\n edgeTypes={edgeTypes}\n onNodesChange={handleNodesChange}\n onEdgesChange={handleEdgesChange}\n onConnect={editable ? onConnect : undefined}\n onNodeClick={onNodeClickProp}\n onEdgeClick={onEdgeClickProp}\n connectionMode={ConnectionMode.Loose}\n fitView\n fitViewOptions={{\n padding: 0.2,\n maxZoom: isCompactViewport ? 0.9 : 1,\n }}\n minZoom={0.1}\n maxZoom={2}\n defaultEdgeOptions={{\n type: 'workflowTransition',\n animated: false,\n markerEnd: {\n type: MarkerType.ArrowClosed,\n width: 16,\n height: 16,\n color: '#9ca3af',\n },\n }}\n nodesDraggable={editable}\n nodesConnectable={editable}\n elementsSelectable={editable}\n proOptions={{ hideAttribution: true }}\n >\n <Background\n variant={BackgroundVariant.Dots}\n gap={16}\n size={1}\n color={backgroundDotColor}\n />\n\n <Controls\n showZoom={true}\n showFitView={true}\n showInteractive={false}\n position={isCompactViewport ? 'bottom-right' : 'top-right'}\n className={`!bg-card !border-border !shadow-md [&>button]:!bg-card [&>button]:!border-border [&>button]:!fill-foreground [&>button:hover]:!bg-muted ${isCompactViewport ? 'scale-90 origin-bottom-right' : ''}`}\n />\n\n {!isCompactViewport && (\n <MiniMap\n nodeStrokeWidth={3}\n nodeColor={(node) => {\n const status = (node.data?.status || 'not_started') as keyof typeof STATUS_COLORS\n return STATUS_COLORS[status]?.hex || STATUS_COLORS.not_started.hex\n }}\n maskColor=\"rgba(0, 0, 0, 0.1)\"\n position=\"bottom-left\"\n className=\"!bg-card !border !border-border !rounded-lg\"\n />\n )}\n\n {!editable && !isCompactViewport && (\n <Panel position=\"top-left\" style={{ margin: 10 }}>\n <div className=\"bg-card rounded-lg shadow-sm border border-border px-4 py-2\">\n <p className=\"text-sm text-muted-foreground font-medium\">\n {t('workflows.graph.visualization')}\n </p>\n </div>\n </Panel>\n )}\n\n {editable && !isCompactViewport && (\n <Panel position=\"top-left\" style={{ margin: 10 }}>\n <Alert variant=\"info\" className=\"max-w-sm\">\n <Edit3 className=\"size-4\" />\n <AlertDescription className=\"font-medium\">\n {t('workflows.graph.editModeInfo')}\n </AlertDescription>\n </Alert>\n </Panel>\n )}\n </ReactFlow>\n </div>\n )\n}\n"],
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport '@xyflow/react/dist/style.css'\n\nimport { useCallback, useMemo, useEffect, useState } from 'react'\nimport {\n ReactFlow,\n Node,\n Edge,\n Controls,\n Background,\n BackgroundVariant,\n MiniMap,\n Panel,\n useNodesState,\n useEdgesState,\n addEdge,\n Connection,\n ConnectionMode,\n MarkerType,\n} from '@xyflow/react'\nimport {StartNode, EndNode, UserTaskNode, AutomatedNode, SubWorkflowNode, WaitForSignalNode, WaitForTimerNode, ParallelForkNode, ParallelJoinNode} from './nodes'\nimport { WorkflowTransitionEdge } from './WorkflowTransitionEdge'\nimport { STATUS_COLORS } from '../lib/status-colors'\nimport { Alert, AlertDescription } from '@open-mercato/ui/primitives/alert'\nimport { Edit3 } from 'lucide-react'\nimport { useTheme } from '@open-mercato/ui/theme'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\n\nexport interface WorkflowGraphImplProps {\n initialNodes?: Node[]\n initialEdges?: Edge[]\n onNodesChange?: (changes: any[]) => void\n onEdgesChange?: (changes: any[]) => void\n onNodeClick?: (event: React.MouseEvent, node: Node) => void\n onEdgeClick?: (event: React.MouseEvent, edge: Edge) => void\n onConnect?: (connection: Connection) => void\n editable?: boolean\n className?: string\n height?: string\n}\n\nexport default function WorkflowGraphImpl({\n initialNodes = [],\n initialEdges = [],\n onNodesChange: onNodesChangeProp,\n onEdgesChange: onEdgesChangeProp,\n onNodeClick: onNodeClickProp,\n onEdgeClick: onEdgeClickProp,\n onConnect: onConnectProp,\n editable = false,\n className = '',\n height = '600px',\n}: WorkflowGraphImplProps) {\n const t = useT()\n const [nodes, setNodes, onNodesChange] = useNodesState(initialNodes)\n const [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges)\n\n const { resolvedTheme } = useTheme()\n const isDark = resolvedTheme === 'dark'\n const backgroundDotColor = isDark ? '#374151' : '#e5e7eb'\n const [isCompactViewport, setIsCompactViewport] = useState(false)\n\n useEffect(() => {\n if (typeof window === 'undefined') return\n const mediaQuery = window.matchMedia('(max-width: 1279px)')\n const updateViewportMode = () => setIsCompactViewport(mediaQuery.matches)\n\n updateViewportMode()\n mediaQuery.addEventListener('change', updateViewportMode)\n\n return () => {\n mediaQuery.removeEventListener('change', updateViewportMode)\n }\n }, [])\n\n useEffect(() => {\n setNodes(initialNodes)\n }, [initialNodes, setNodes])\n\n useEffect(() => {\n setEdges(initialEdges)\n }, [initialEdges, setEdges])\n\n const onConnect = useCallback(\n (connection: Connection) => {\n if (onConnectProp) {\n onConnectProp(connection)\n } else {\n const newEdge = {\n ...connection,\n type: 'workflowTransition',\n animated: false,\n markerEnd: {\n type: MarkerType.ArrowClosed,\n width: 16,\n height: 16,\n color: '#9ca3af',\n },\n }\n setEdges((eds) => addEdge(newEdge, eds))\n }\n },\n [setEdges, onConnectProp]\n )\n\n const handleNodesChange = useCallback(\n (changes: any) => {\n onNodesChange(changes)\n if (onNodesChangeProp) {\n onNodesChangeProp(changes)\n }\n },\n [onNodesChange, onNodesChangeProp]\n )\n\n const handleEdgesChange = useCallback(\n (changes: any) => {\n onEdgesChange(changes)\n if (onEdgesChangeProp) {\n onEdgesChangeProp(changes)\n }\n },\n [onEdgesChange, onEdgesChangeProp]\n )\n\n const nodeTypes = useMemo(\n () => ({\n start: StartNode,\n end: EndNode,\n userTask: UserTaskNode,\n automated: AutomatedNode,\n subWorkflow: SubWorkflowNode,\n waitForSignal: WaitForSignalNode,\n waitForTimer: WaitForTimerNode,\n parallelFork: ParallelForkNode,\n parallelJoin: ParallelJoinNode,\n }),\n []\n )\n\n const edgeTypes = useMemo(\n () => ({\n workflowTransition: WorkflowTransitionEdge,\n }),\n []\n )\n\n return (\n <div className={`workflow-graph-container ${className}`} style={{ height }}>\n <ReactFlow\n nodes={nodes}\n edges={edges}\n nodeTypes={nodeTypes}\n edgeTypes={edgeTypes}\n onNodesChange={handleNodesChange}\n onEdgesChange={handleEdgesChange}\n onConnect={editable ? onConnect : undefined}\n onNodeClick={onNodeClickProp}\n onEdgeClick={onEdgeClickProp}\n connectionMode={ConnectionMode.Loose}\n fitView\n fitViewOptions={{\n padding: 0.2,\n maxZoom: isCompactViewport ? 0.9 : 1,\n }}\n minZoom={0.1}\n maxZoom={2}\n defaultEdgeOptions={{\n type: 'workflowTransition',\n animated: false,\n markerEnd: {\n type: MarkerType.ArrowClosed,\n width: 16,\n height: 16,\n color: '#9ca3af',\n },\n }}\n nodesDraggable={editable}\n nodesConnectable={editable}\n elementsSelectable={editable}\n proOptions={{ hideAttribution: true }}\n >\n <Background\n variant={BackgroundVariant.Dots}\n gap={16}\n size={1}\n color={backgroundDotColor}\n />\n\n <Controls\n showZoom={true}\n showFitView={true}\n showInteractive={false}\n position={isCompactViewport ? 'bottom-right' : 'top-right'}\n className={`!bg-card !border-border !shadow-md [&>button]:!bg-card [&>button]:!border-border [&>button]:!fill-foreground [&>button:hover]:!bg-muted ${isCompactViewport ? 'scale-90 origin-bottom-right' : ''}`}\n />\n\n {!isCompactViewport && (\n <MiniMap\n nodeStrokeWidth={3}\n nodeColor={(node) => {\n const status = (node.data?.status || 'not_started') as keyof typeof STATUS_COLORS\n return STATUS_COLORS[status]?.hex || STATUS_COLORS.not_started.hex\n }}\n maskColor=\"rgba(0, 0, 0, 0.1)\"\n position=\"bottom-left\"\n className=\"!bg-card !border !border-border !rounded-lg\"\n />\n )}\n\n {!editable && !isCompactViewport && (\n <Panel position=\"top-left\" style={{ margin: 10 }}>\n <div className=\"bg-card rounded-lg shadow-sm border border-border px-4 py-2\">\n <p className=\"text-sm text-muted-foreground font-medium\">\n {t('workflows.graph.visualization')}\n </p>\n </div>\n </Panel>\n )}\n\n {editable && !isCompactViewport && (\n <Panel position=\"top-left\" style={{ margin: 10 }}>\n <Alert variant=\"info\" className=\"max-w-sm\">\n <Edit3 className=\"size-4\" />\n <AlertDescription className=\"font-medium\">\n {t('workflows.graph.editModeInfo')}\n </AlertDescription>\n </Alert>\n </Panel>\n )}\n </ReactFlow>\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AAuLQ,cAwCI,YAxCJ;AArLR,OAAO;AAEP,SAAS,aAAa,SAAS,WAAW,gBAAgB;AAC1D;AAAA,EACE;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA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S,YAAW,OAAO,EAAE,QAAQ,GAAG,GAC7C,+BAAC,SAAM,SAAQ,QAAO,WAAU,YAC9B;AAAA,8BAAC,SAAM,WAAU,UAAS;AAAA,UAC1B,oBAAC,oBAAiB,WAAU,eACzB,YAAE,8BAA8B,GACnC;AAAA,WACF,GACF;AAAA;AAAA;AAAA,EAEJ,GACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -167,6 +167,7 @@ function createFormGroups(t, StepsEditorComponent, TransitionsEditorComponent) {
|
|
|
167
167
|
}
|
|
168
168
|
import { toDateInputValue } from "@open-mercato/shared/lib/date/format";
|
|
169
169
|
function parseWorkflowToFormValues(workflow) {
|
|
170
|
+
const updatedAt = workflow.updatedAt ?? workflow.updated_at ?? null;
|
|
170
171
|
const metadata = workflow.metadata || {};
|
|
171
172
|
return {
|
|
172
173
|
workflowId: workflow.workflowId || "",
|
|
@@ -182,7 +183,9 @@ function parseWorkflowToFormValues(workflow) {
|
|
|
182
183
|
"metadata.icon": metadata.icon || "",
|
|
183
184
|
steps: workflow.definition?.steps || [],
|
|
184
185
|
transitions: workflow.definition?.transitions || [],
|
|
185
|
-
triggers: workflow.definition?.triggers || []
|
|
186
|
+
triggers: workflow.definition?.triggers || [],
|
|
187
|
+
id: workflow.id,
|
|
188
|
+
updatedAt: typeof updatedAt === "string" ? updatedAt : updatedAt ? String(updatedAt) : null
|
|
186
189
|
};
|
|
187
190
|
}
|
|
188
191
|
function buildWorkflowPayload(values) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/modules/workflows/components/formConfig.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport { z } from 'zod'\nimport type { CrudField, CrudFormGroup } from '@open-mercato/ui/backend/CrudForm'\nimport type { WorkflowDefinitionTrigger } from '../data/entities'\n\n/**\n * Form Values Type\n * Represents the structure of form data for creating/editing workflow definitions\n */\nexport type WorkflowDefinitionFormValues = {\n workflowId: string\n workflowName: string\n description?: string | null\n version: number\n enabled: boolean\n effectiveFrom?: string | null\n effectiveTo?: string | null\n // Metadata fields are declared on the form with dot-path ids\n // (`metadata.category`, `metadata.tags`, `metadata.icon`). CrudForm only\n // collapses dot-paths for injected/custom fields, so declared base fields are\n // carried as flat keys end-to-end; buildWorkflowPayload reassembles them into\n // the nested metadata object the API expects. See issue #2503.\n 'metadata.category'?: string\n 'metadata.tags'?: string[]\n 'metadata.icon'?: string\n steps: any[]\n transitions: any[]\n triggers: WorkflowDefinitionTrigger[]\n}\n\n/**\n * Form Validation Schema\n * Extends the API schema with additional client-side validation\n */\nexport const workflowDefinitionFormSchema = z.object({\n workflowId: z.string()\n .min(1, 'Workflow ID is required')\n .max(100, 'Workflow ID must be 100 characters or less')\n .regex(/^[a-z0-9_.-]+$/, 'Workflow ID must contain only lowercase letters, numbers, hyphens, underscores, and dots'),\n workflowName: z.string()\n .min(1, 'Workflow name is required')\n .max(200, 'Workflow name must be 200 characters or less'),\n description: z.string()\n .max(5000, 'Description must be 5000 characters or less')\n .optional()\n .nullable(),\n version: z.number().int().min(1),\n enabled: z.boolean(),\n effectiveFrom: z.string().optional().nullable(),\n effectiveTo: z.string().optional().nullable(),\n // Flat dot-path keys mirror the field ids so CrudForm's non-strict\n // schema.safeParse keeps them instead of stripping them before onSubmit.\n 'metadata.category': z.string().max(50).optional(),\n 'metadata.tags': z.array(z.string()).optional(),\n 'metadata.icon': z.string().max(50).optional(),\n steps: z.array(z.any()),\n transitions: z.array(z.any()),\n triggers: z.array(z.any()).default([]),\n})\n\n/**\n * Default Form Values\n */\nexport const defaultFormValues: WorkflowDefinitionFormValues = {\n workflowId: '',\n workflowName: '',\n description: null,\n version: 1,\n enabled: true,\n effectiveFrom: null,\n effectiveTo: null,\n 'metadata.category': '',\n 'metadata.tags': [],\n 'metadata.icon': '',\n steps: [],\n transitions: [],\n triggers: [],\n}\n\n/**\n * Create Field Definitions\n * Returns field configurations for the CrudForm\n */\nexport function createFieldDefinitions(t: (key: string) => string): CrudField[] {\n return [\n {\n id: 'workflowId',\n label: t('workflows.form.workflowId'),\n type: 'text',\n required: true,\n placeholder: t('workflows.form.placeholders.workflowId'),\n description: t('workflows.form.descriptions.workflowId'),\n },\n {\n id: 'workflowName',\n label: t('workflows.form.workflowName'),\n type: 'text',\n required: true,\n placeholder: t('workflows.form.placeholders.workflowName'),\n },\n {\n id: 'description',\n label: t('workflows.form.description'),\n type: 'textarea',\n placeholder: t('workflows.form.placeholders.description'),\n },\n {\n id: 'version',\n label: t('workflows.form.version'),\n type: 'number',\n required: true,\n description: t('workflows.form.descriptions.version'),\n },\n {\n id: 'enabled',\n label: t('workflows.form.enabled'),\n type: 'checkbox',\n description: t('workflows.form.descriptions.enabled'),\n },\n {\n id: 'effectiveFrom',\n label: t('workflows.form.effectiveFrom'),\n type: 'date',\n description: t('workflows.form.descriptions.effectiveFrom'),\n },\n {\n id: 'effectiveTo',\n label: t('workflows.form.effectiveTo'),\n type: 'date',\n description: t('workflows.form.descriptions.effectiveTo'),\n },\n {\n id: 'metadata.category',\n label: t('workflows.form.category'),\n type: 'text',\n placeholder: t('workflows.form.placeholders.category'),\n },\n {\n id: 'metadata.tags',\n label: t('workflows.form.tags'),\n type: 'tags',\n placeholder: t('workflows.form.placeholders.tags'),\n description: t('workflows.form.descriptions.tags'),\n },\n {\n id: 'metadata.icon',\n label: t('workflows.form.icon'),\n type: 'text',\n placeholder: t('workflows.form.placeholders.icon'),\n description: t('workflows.form.descriptions.icon'),\n },\n ]\n}\n\n/**\n * Create Form Groups\n * Returns grouped layout configuration for the CrudForm\n */\nexport function createFormGroups(\n t: (key: string) => string,\n StepsEditorComponent: React.ComponentType<any>,\n TransitionsEditorComponent: React.ComponentType<any>\n): CrudFormGroup[] {\n // Wrapper components to adapt CrudForm props\n const StepsEditorWrapper = (props: { value: any; setValue: (v: any) => void; error?: string; values?: any }) => {\n return <StepsEditorComponent value={props.value} onChange={props.setValue} error={props.error} />\n }\n\n const TransitionsEditorWrapper = (props: { value: any; setValue: (v: any) => void; error?: string; values?: any }) => {\n // Pass the steps from values (all form values) so transitions can reference them\n return <TransitionsEditorComponent value={props.value} onChange={props.setValue} steps={props.values?.steps || []} error={props.error} />\n }\n\n return [\n {\n id: 'basic',\n title: t('workflows.form.groups.basic'),\n column: 1,\n fields: [\n 'workflowId',\n 'workflowName',\n 'description',\n 'version',\n 'enabled',\n ],\n },\n {\n id: 'metadata',\n title: t('workflows.form.groups.metadata'),\n column: 1,\n fields: [\n 'metadata.category',\n 'metadata.tags',\n 'metadata.icon',\n 'effectiveFrom',\n 'effectiveTo',\n ],\n },\n {\n id: 'steps',\n title: t('workflows.form.groups.steps'),\n column: 1,\n fields: [\n {\n id: 'steps',\n label: t('workflows.form.stepsLabel'),\n type: 'custom',\n required: true,\n component: StepsEditorWrapper,\n },\n ],\n },\n {\n id: 'transitions',\n title: t('workflows.form.groups.transitions'),\n column: 1,\n fields: [\n {\n id: 'transitions',\n label: t('workflows.form.transitionsLabel'),\n type: 'custom',\n required: true,\n component: TransitionsEditorWrapper,\n },\n ],\n },\n ]\n}\n\nimport { toDateInputValue } from '@open-mercato/shared/lib/date/format'\n\n/**\n * Parse workflow definition to form values\n */\nexport function parseWorkflowToFormValues(workflow: any): WorkflowDefinitionFormValues {\n const metadata = workflow.metadata || {}\n return {\n workflowId: workflow.workflowId || '',\n workflowName: workflow.workflowName || '',\n description: workflow.description || null,\n version: workflow.version || 1,\n enabled: workflow.enabled ?? true,\n effectiveFrom: toDateInputValue(workflow.effectiveFrom),\n effectiveTo: toDateInputValue(workflow.effectiveTo),\n // Hydrate the flat dot-path keys the CrudForm inputs actually read.\n 'metadata.category': metadata.category || '',\n 'metadata.tags': Array.isArray(metadata.tags) ? metadata.tags : [],\n 'metadata.icon': metadata.icon || '',\n steps: workflow.definition?.steps || [],\n transitions: workflow.definition?.transitions || [],\n triggers: workflow.definition?.triggers || [],\n }\n}\n\n/**\n * Build API payload from form values\n */\nexport function buildWorkflowPayload(values: WorkflowDefinitionFormValues) {\n const triggers = values.triggers ?? []\n // Collapse the flat dot-path keys back into the nested metadata object the API\n // expects. Empty category/icon are dropped so they don't persist as blanks.\n const category = (values['metadata.category'] || '').trim()\n const icon = (values['metadata.icon'] || '').trim()\n const tags = Array.isArray(values['metadata.tags']) ? values['metadata.tags'] : []\n const metadata = {\n tags,\n ...(category ? { category } : {}),\n ...(icon ? { icon } : {}),\n }\n return {\n workflowId: values.workflowId,\n workflowName: values.workflowName,\n description: values.description || null,\n version: values.version,\n enabled: values.enabled,\n effectiveFrom: values.effectiveFrom || null,\n effectiveTo: values.effectiveTo || null,\n metadata,\n definition: {\n steps: values.steps,\n transitions: values.transitions,\n ...(triggers.length > 0 ? { triggers } : {}),\n },\n }\n}\n"],
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport { z } from 'zod'\nimport type { CrudField, CrudFormGroup } from '@open-mercato/ui/backend/CrudForm'\nimport type { WorkflowDefinitionTrigger } from '../data/entities'\n\n/**\n * Form Values Type\n * Represents the structure of form data for creating/editing workflow definitions\n */\nexport type WorkflowDefinitionFormValues = {\n workflowId: string\n workflowName: string\n description?: string | null\n version: number\n enabled: boolean\n effectiveFrom?: string | null\n effectiveTo?: string | null\n // Metadata fields are declared on the form with dot-path ids\n // (`metadata.category`, `metadata.tags`, `metadata.icon`). CrudForm only\n // collapses dot-paths for injected/custom fields, so declared base fields are\n // carried as flat keys end-to-end; buildWorkflowPayload reassembles them into\n // the nested metadata object the API expects. See issue #2503.\n 'metadata.category'?: string\n 'metadata.tags'?: string[]\n 'metadata.icon'?: string\n steps: any[]\n transitions: any[]\n triggers: WorkflowDefinitionTrigger[]\n id?: string\n updatedAt?: string | null\n}\n\n/**\n * Form Validation Schema\n * Extends the API schema with additional client-side validation\n */\nexport const workflowDefinitionFormSchema = z.object({\n workflowId: z.string()\n .min(1, 'Workflow ID is required')\n .max(100, 'Workflow ID must be 100 characters or less')\n .regex(/^[a-z0-9_.-]+$/, 'Workflow ID must contain only lowercase letters, numbers, hyphens, underscores, and dots'),\n workflowName: z.string()\n .min(1, 'Workflow name is required')\n .max(200, 'Workflow name must be 200 characters or less'),\n description: z.string()\n .max(5000, 'Description must be 5000 characters or less')\n .optional()\n .nullable(),\n version: z.number().int().min(1),\n enabled: z.boolean(),\n effectiveFrom: z.string().optional().nullable(),\n effectiveTo: z.string().optional().nullable(),\n // Flat dot-path keys mirror the field ids so CrudForm's non-strict\n // schema.safeParse keeps them instead of stripping them before onSubmit.\n 'metadata.category': z.string().max(50).optional(),\n 'metadata.tags': z.array(z.string()).optional(),\n 'metadata.icon': z.string().max(50).optional(),\n steps: z.array(z.any()),\n transitions: z.array(z.any()),\n triggers: z.array(z.any()).default([]),\n})\n\n/**\n * Default Form Values\n */\nexport const defaultFormValues: WorkflowDefinitionFormValues = {\n workflowId: '',\n workflowName: '',\n description: null,\n version: 1,\n enabled: true,\n effectiveFrom: null,\n effectiveTo: null,\n 'metadata.category': '',\n 'metadata.tags': [],\n 'metadata.icon': '',\n steps: [],\n transitions: [],\n triggers: [],\n}\n\n/**\n * Create Field Definitions\n * Returns field configurations for the CrudForm\n */\nexport function createFieldDefinitions(t: (key: string) => string): CrudField[] {\n return [\n {\n id: 'workflowId',\n label: t('workflows.form.workflowId'),\n type: 'text',\n required: true,\n placeholder: t('workflows.form.placeholders.workflowId'),\n description: t('workflows.form.descriptions.workflowId'),\n },\n {\n id: 'workflowName',\n label: t('workflows.form.workflowName'),\n type: 'text',\n required: true,\n placeholder: t('workflows.form.placeholders.workflowName'),\n },\n {\n id: 'description',\n label: t('workflows.form.description'),\n type: 'textarea',\n placeholder: t('workflows.form.placeholders.description'),\n },\n {\n id: 'version',\n label: t('workflows.form.version'),\n type: 'number',\n required: true,\n description: t('workflows.form.descriptions.version'),\n },\n {\n id: 'enabled',\n label: t('workflows.form.enabled'),\n type: 'checkbox',\n description: t('workflows.form.descriptions.enabled'),\n },\n {\n id: 'effectiveFrom',\n label: t('workflows.form.effectiveFrom'),\n type: 'date',\n description: t('workflows.form.descriptions.effectiveFrom'),\n },\n {\n id: 'effectiveTo',\n label: t('workflows.form.effectiveTo'),\n type: 'date',\n description: t('workflows.form.descriptions.effectiveTo'),\n },\n {\n id: 'metadata.category',\n label: t('workflows.form.category'),\n type: 'text',\n placeholder: t('workflows.form.placeholders.category'),\n },\n {\n id: 'metadata.tags',\n label: t('workflows.form.tags'),\n type: 'tags',\n placeholder: t('workflows.form.placeholders.tags'),\n description: t('workflows.form.descriptions.tags'),\n },\n {\n id: 'metadata.icon',\n label: t('workflows.form.icon'),\n type: 'text',\n placeholder: t('workflows.form.placeholders.icon'),\n description: t('workflows.form.descriptions.icon'),\n },\n ]\n}\n\n/**\n * Create Form Groups\n * Returns grouped layout configuration for the CrudForm\n */\nexport function createFormGroups(\n t: (key: string) => string,\n StepsEditorComponent: React.ComponentType<any>,\n TransitionsEditorComponent: React.ComponentType<any>\n): CrudFormGroup[] {\n // Wrapper components to adapt CrudForm props\n const StepsEditorWrapper = (props: { value: any; setValue: (v: any) => void; error?: string; values?: any }) => {\n return <StepsEditorComponent value={props.value} onChange={props.setValue} error={props.error} />\n }\n\n const TransitionsEditorWrapper = (props: { value: any; setValue: (v: any) => void; error?: string; values?: any }) => {\n // Pass the steps from values (all form values) so transitions can reference them\n return <TransitionsEditorComponent value={props.value} onChange={props.setValue} steps={props.values?.steps || []} error={props.error} />\n }\n\n return [\n {\n id: 'basic',\n title: t('workflows.form.groups.basic'),\n column: 1,\n fields: [\n 'workflowId',\n 'workflowName',\n 'description',\n 'version',\n 'enabled',\n ],\n },\n {\n id: 'metadata',\n title: t('workflows.form.groups.metadata'),\n column: 1,\n fields: [\n 'metadata.category',\n 'metadata.tags',\n 'metadata.icon',\n 'effectiveFrom',\n 'effectiveTo',\n ],\n },\n {\n id: 'steps',\n title: t('workflows.form.groups.steps'),\n column: 1,\n fields: [\n {\n id: 'steps',\n label: t('workflows.form.stepsLabel'),\n type: 'custom',\n required: true,\n component: StepsEditorWrapper,\n },\n ],\n },\n {\n id: 'transitions',\n title: t('workflows.form.groups.transitions'),\n column: 1,\n fields: [\n {\n id: 'transitions',\n label: t('workflows.form.transitionsLabel'),\n type: 'custom',\n required: true,\n component: TransitionsEditorWrapper,\n },\n ],\n },\n ]\n}\n\nimport { toDateInputValue } from '@open-mercato/shared/lib/date/format'\n\n/**\n * Parse workflow definition to form values\n */\nexport function parseWorkflowToFormValues(workflow: any): WorkflowDefinitionFormValues {\n const updatedAt = workflow.updatedAt ?? workflow.updated_at ?? null\n const metadata = workflow.metadata || {}\n return {\n workflowId: workflow.workflowId || '',\n workflowName: workflow.workflowName || '',\n description: workflow.description || null,\n version: workflow.version || 1,\n enabled: workflow.enabled ?? true,\n effectiveFrom: toDateInputValue(workflow.effectiveFrom),\n effectiveTo: toDateInputValue(workflow.effectiveTo),\n // Hydrate the flat dot-path keys the CrudForm inputs actually read.\n 'metadata.category': metadata.category || '',\n 'metadata.tags': Array.isArray(metadata.tags) ? metadata.tags : [],\n 'metadata.icon': metadata.icon || '',\n steps: workflow.definition?.steps || [],\n transitions: workflow.definition?.transitions || [],\n triggers: workflow.definition?.triggers || [],\n id: workflow.id,\n updatedAt: typeof updatedAt === 'string' ? updatedAt : updatedAt ? String(updatedAt) : null,\n }\n}\n\n/**\n * Build API payload from form values\n */\nexport function buildWorkflowPayload(values: WorkflowDefinitionFormValues) {\n const triggers = values.triggers ?? []\n // Collapse the flat dot-path keys back into the nested metadata object the API\n // expects. Empty category/icon are dropped so they don't persist as blanks.\n const category = (values['metadata.category'] || '').trim()\n const icon = (values['metadata.icon'] || '').trim()\n const tags = Array.isArray(values['metadata.tags']) ? values['metadata.tags'] : []\n const metadata = {\n tags,\n ...(category ? { category } : {}),\n ...(icon ? { icon } : {}),\n }\n return {\n workflowId: values.workflowId,\n workflowName: values.workflowName,\n description: values.description || null,\n version: values.version,\n enabled: values.enabled,\n effectiveFrom: values.effectiveFrom || null,\n effectiveTo: values.effectiveTo || null,\n metadata,\n definition: {\n steps: values.steps,\n transitions: values.transitions,\n ...(triggers.length > 0 ? { triggers } : {}),\n },\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAyKW;AAtKX,SAAS,SAAS;AAmCX,MAAM,+BAA+B,EAAE,OAAO;AAAA,EACnD,YAAY,EAAE,OAAO,EAClB,IAAI,GAAG,yBAAyB,EAChC,IAAI,KAAK,4CAA4C,EACrD,MAAM,kBAAkB,0FAA0F;AAAA,EACrH,cAAc,EAAE,OAAO,EACpB,IAAI,GAAG,2BAA2B,EAClC,IAAI,KAAK,8CAA8C;AAAA,EAC1D,aAAa,EAAE,OAAO,EACnB,IAAI,KAAM,6CAA6C,EACvD,SAAS,EACT,SAAS;AAAA,EACZ,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC;AAAA,EAC/B,SAAS,EAAE,QAAQ;AAAA,EACnB,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EAC9C,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA;AAAA;AAAA,EAG5C,qBAAqB,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EACjD,iBAAiB,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS;AAAA,EAC9C,iBAAiB,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EAC7C,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC;AAAA,EACtB,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC;AAAA,EAC5B,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC;AACvC,CAAC;AAKM,MAAM,oBAAkD;AAAA,EAC7D,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,aAAa;AAAA,EACb,SAAS;AAAA,EACT,SAAS;AAAA,EACT,eAAe;AAAA,EACf,aAAa;AA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QAAQ,OAAO,eAAe,CAAC,IAAI,OAAO,eAAe,IAAI,CAAC;AACjF,QAAM,WAAW;AAAA,IACf;AAAA,IACA,GAAI,WAAW,EAAE,SAAS,IAAI,CAAC;AAAA,IAC/B,GAAI,OAAO,EAAE,KAAK,IAAI,CAAC;AAAA,EACzB;AACA,SAAO;AAAA,IACL,YAAY,OAAO;AAAA,IACnB,cAAc,OAAO;AAAA,IACrB,aAAa,OAAO,eAAe;AAAA,IACnC,SAAS,OAAO;AAAA,IAChB,SAAS,OAAO;AAAA,IAChB,eAAe,OAAO,iBAAiB;AAAA,IACvC,aAAa,OAAO,eAAe;AAAA,IACnC;AAAA,IACA,YAAY;AAAA,MACV,OAAO,OAAO;AAAA,MACd,aAAa,OAAO;AAAA,MACpB,GAAI,SAAS,SAAS,IAAI,EAAE,SAAS,IAAI,CAAC;AAAA,IAC5C;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Handle, Position } from "@xyflow/react";
|
|
4
|
+
import { WorkflowNodeCard } from "../WorkflowNodeCard.js";
|
|
5
|
+
function mapStatus(status) {
|
|
6
|
+
if (!status || status === "pending") return "not_started";
|
|
7
|
+
if (status === "running" || status === "in_progress") return "in_progress";
|
|
8
|
+
if (status === "completed") return "completed";
|
|
9
|
+
return "not_started";
|
|
10
|
+
}
|
|
11
|
+
function ParallelForkNode({ data, isConnectable, selected }) {
|
|
12
|
+
const nodeData = data;
|
|
13
|
+
return /* @__PURE__ */ jsxs("div", { className: "parallel-fork-node", title: nodeData.tooltip, children: [
|
|
14
|
+
/* @__PURE__ */ jsx(
|
|
15
|
+
Handle,
|
|
16
|
+
{
|
|
17
|
+
type: "target",
|
|
18
|
+
position: Position.Top,
|
|
19
|
+
id: "target",
|
|
20
|
+
isConnectable,
|
|
21
|
+
className: "!w-3 !h-3 !bg-primary !border-2 !border-background"
|
|
22
|
+
}
|
|
23
|
+
),
|
|
24
|
+
/* @__PURE__ */ jsx(
|
|
25
|
+
WorkflowNodeCard,
|
|
26
|
+
{
|
|
27
|
+
title: nodeData.label,
|
|
28
|
+
description: nodeData.description,
|
|
29
|
+
status: mapStatus(nodeData.status),
|
|
30
|
+
nodeType: "parallelFork",
|
|
31
|
+
selected
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
/* @__PURE__ */ jsx(
|
|
35
|
+
Handle,
|
|
36
|
+
{
|
|
37
|
+
type: "source",
|
|
38
|
+
position: Position.Bottom,
|
|
39
|
+
id: "source",
|
|
40
|
+
isConnectable,
|
|
41
|
+
className: "!w-3 !h-3 !bg-primary !border-2 !border-background"
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] });
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
ParallelForkNode
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=ParallelForkNode.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/modules/workflows/components/nodes/ParallelForkNode.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport { Handle, Position, NodeProps } from '@xyflow/react'\nimport { WorkflowNodeCard } from '../WorkflowNodeCard'\nimport { WorkflowStatus } from '../../lib/status-colors'\n\n/**\n * ParallelForkNode display data.\n *\n * A PARALLEL_FORK splits execution into N branches (one per outgoing `auto`\n * transition) that run concurrently and converge at the paired PARALLEL_JOIN\n * referenced by `joinStepId`.\n */\nexport interface ParallelForkNodeData {\n label: string\n description?: string\n joinStepId?: string\n status?: 'pending' | 'running' | 'completed' | 'error' | 'not_started' | 'in_progress'\n stepNumber?: number\n badge?: string\n tooltip?: string\n executionStatus?: 'completed' | 'active' | 'pending' | 'failed' | 'skipped'\n}\n\nfunction mapStatus(status?: string): WorkflowStatus {\n if (!status || status === 'pending') return 'not_started'\n if (status === 'running' || status === 'in_progress') return 'in_progress'\n if (status === 'completed') return 'completed'\n return 'not_started'\n}\n\n/**\n * ParallelForkNode - splits the workflow into concurrent branches.\n * One target handle (in); one source handle (out) that fans out to each branch.\n */\nexport function ParallelForkNode({ data, isConnectable, selected }: NodeProps) {\n const nodeData = data as unknown as ParallelForkNodeData\n\n return (\n <div className=\"parallel-fork-node\" title={nodeData.tooltip}>\n <Handle\n type=\"target\"\n position={Position.Top}\n id=\"target\"\n isConnectable={isConnectable}\n className=\"!w-3 !h-3 !bg-primary !border-2 !border-background\"\n />\n\n <WorkflowNodeCard\n title={nodeData.label}\n description={nodeData.description}\n status={mapStatus(nodeData.status)}\n nodeType=\"parallelFork\"\n selected={selected}\n />\n\n <Handle\n type=\"source\"\n position={Position.Bottom}\n id=\"source\"\n isConnectable={isConnectable}\n className=\"!w-3 !h-3 !bg-primary !border-2 !border-background\"\n />\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AAuCI,SACE,KADF;AArCJ,SAAS,QAAQ,gBAA2B;AAC5C,SAAS,wBAAwB;AAqBjC,SAAS,UAAU,QAAiC;AAClD,MAAI,CAAC,UAAU,WAAW,UAAW,QAAO;AAC5C,MAAI,WAAW,aAAa,WAAW,cAAe,QAAO;AAC7D,MAAI,WAAW,YAAa,QAAO;AACnC,SAAO;AACT;AAMO,SAAS,iBAAiB,EAAE,MAAM,eAAe,SAAS,GAAc;AAC7E,QAAM,WAAW;AAEjB,SACE,qBAAC,SAAI,WAAU,sBAAqB,OAAO,SAAS,SAClD;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,UAAU,SAAS;AAAA,QACnB,IAAG;AAAA,QACH;AAAA,QACA,WAAU;AAAA;AAAA,IACZ;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,SAAS;AAAA,QAChB,aAAa,SAAS;AAAA,QACtB,QAAQ,UAAU,SAAS,MAAM;AAAA,QACjC,UAAS;AAAA,QACT;AAAA;AAAA,IACF;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,UAAU,SAAS;AAAA,QACnB,IAAG;AAAA,QACH;AAAA,QACA,WAAU;AAAA;AAAA,IACZ;AAAA,KACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Handle, Position } from "@xyflow/react";
|
|
4
|
+
import { WorkflowNodeCard } from "../WorkflowNodeCard.js";
|
|
5
|
+
function mapStatus(status) {
|
|
6
|
+
if (!status || status === "pending") return "not_started";
|
|
7
|
+
if (status === "running" || status === "in_progress") return "in_progress";
|
|
8
|
+
if (status === "completed") return "completed";
|
|
9
|
+
return "not_started";
|
|
10
|
+
}
|
|
11
|
+
function ParallelJoinNode({ data, isConnectable, selected }) {
|
|
12
|
+
const nodeData = data;
|
|
13
|
+
return /* @__PURE__ */ jsxs("div", { className: "parallel-join-node", title: nodeData.tooltip, children: [
|
|
14
|
+
/* @__PURE__ */ jsx(
|
|
15
|
+
Handle,
|
|
16
|
+
{
|
|
17
|
+
type: "target",
|
|
18
|
+
position: Position.Top,
|
|
19
|
+
id: "target",
|
|
20
|
+
isConnectable,
|
|
21
|
+
className: "!w-3 !h-3 !bg-primary !border-2 !border-background"
|
|
22
|
+
}
|
|
23
|
+
),
|
|
24
|
+
/* @__PURE__ */ jsx(
|
|
25
|
+
WorkflowNodeCard,
|
|
26
|
+
{
|
|
27
|
+
title: nodeData.label,
|
|
28
|
+
description: nodeData.description,
|
|
29
|
+
status: mapStatus(nodeData.status),
|
|
30
|
+
nodeType: "parallelJoin",
|
|
31
|
+
selected
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
/* @__PURE__ */ jsx(
|
|
35
|
+
Handle,
|
|
36
|
+
{
|
|
37
|
+
type: "source",
|
|
38
|
+
position: Position.Bottom,
|
|
39
|
+
id: "source",
|
|
40
|
+
isConnectable,
|
|
41
|
+
className: "!w-3 !h-3 !bg-primary !border-2 !border-background"
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] });
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
ParallelJoinNode
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=ParallelJoinNode.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/modules/workflows/components/nodes/ParallelJoinNode.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport { Handle, Position, NodeProps } from '@xyflow/react'\nimport { WorkflowNodeCard } from '../WorkflowNodeCard'\nimport { WorkflowStatus } from '../../lib/status-colors'\n\n/**\n * ParallelJoinNode display data.\n *\n * A PARALLEL_JOIN synchronizes the branches created by its paired\n * PARALLEL_FORK (`forkStepId`) using wait-all semantics, then continues the\n * single outgoing transition once every branch has completed.\n */\nexport interface ParallelJoinNodeData {\n label: string\n description?: string\n forkStepId?: string\n status?: 'pending' | 'running' | 'completed' | 'error' | 'not_started' | 'in_progress'\n stepNumber?: number\n badge?: string\n tooltip?: string\n executionStatus?: 'completed' | 'active' | 'pending' | 'failed' | 'skipped'\n}\n\nfunction mapStatus(status?: string): WorkflowStatus {\n if (!status || status === 'pending') return 'not_started'\n if (status === 'running' || status === 'in_progress') return 'in_progress'\n if (status === 'completed') return 'completed'\n return 'not_started'\n}\n\n/**\n * ParallelJoinNode - synchronizes concurrent branches (wait-all).\n * One target handle (in) collecting all branches; one source handle (out).\n */\nexport function ParallelJoinNode({ data, isConnectable, selected }: NodeProps) {\n const nodeData = data as unknown as ParallelJoinNodeData\n\n return (\n <div className=\"parallel-join-node\" title={nodeData.tooltip}>\n <Handle\n type=\"target\"\n position={Position.Top}\n id=\"target\"\n isConnectable={isConnectable}\n className=\"!w-3 !h-3 !bg-primary !border-2 !border-background\"\n />\n\n <WorkflowNodeCard\n title={nodeData.label}\n description={nodeData.description}\n status={mapStatus(nodeData.status)}\n nodeType=\"parallelJoin\"\n selected={selected}\n />\n\n <Handle\n type=\"source\"\n position={Position.Bottom}\n id=\"source\"\n isConnectable={isConnectable}\n className=\"!w-3 !h-3 !bg-primary !border-2 !border-background\"\n />\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AAuCI,SACE,KADF;AArCJ,SAAS,QAAQ,gBAA2B;AAC5C,SAAS,wBAAwB;AAqBjC,SAAS,UAAU,QAAiC;AAClD,MAAI,CAAC,UAAU,WAAW,UAAW,QAAO;AAC5C,MAAI,WAAW,aAAa,WAAW,cAAe,QAAO;AAC7D,MAAI,WAAW,YAAa,QAAO;AACnC,SAAO;AACT;AAMO,SAAS,iBAAiB,EAAE,MAAM,eAAe,SAAS,GAAc;AAC7E,QAAM,WAAW;AAEjB,SACE,qBAAC,SAAI,WAAU,sBAAqB,OAAO,SAAS,SAClD;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,UAAU,SAAS;AAAA,QACnB,IAAG;AAAA,QACH;AAAA,QACA,WAAU;AAAA;AAAA,IACZ;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,SAAS;AAAA,QAChB,aAAa,SAAS;AAAA,QACtB,QAAQ,UAAU,SAAS,MAAM;AAAA,QACjC,UAAS;AAAA,QACT;AAAA;AAAA,IACF;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,UAAU,SAAS;AAAA,QACnB,IAAG;AAAA,QACH;AAAA,QACA,WAAU;AAAA;AAAA,IACZ;AAAA,KACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -5,9 +5,13 @@ import { AutomatedNode } from "./AutomatedNode.js";
|
|
|
5
5
|
import { SubWorkflowNode } from "./SubWorkflowNode.js";
|
|
6
6
|
import { WaitForSignalNode } from "./WaitForSignalNode.js";
|
|
7
7
|
import { WaitForTimerNode } from "./WaitForTimerNode.js";
|
|
8
|
+
import { ParallelForkNode } from "./ParallelForkNode.js";
|
|
9
|
+
import { ParallelJoinNode } from "./ParallelJoinNode.js";
|
|
8
10
|
export {
|
|
9
11
|
AutomatedNode,
|
|
10
12
|
EndNode,
|
|
13
|
+
ParallelForkNode,
|
|
14
|
+
ParallelJoinNode,
|
|
11
15
|
StartNode,
|
|
12
16
|
SubWorkflowNode,
|
|
13
17
|
UserTaskNode,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/modules/workflows/components/nodes/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { StartNode } from './StartNode'\nexport type { StartNodeData } from './StartNode'\n\nexport { EndNode } from './EndNode'\nexport type { EndNodeData } from './EndNode'\n\nexport { UserTaskNode } from './UserTaskNode'\nexport type { UserTaskNodeData } from './UserTaskNode'\n\nexport { AutomatedNode } from './AutomatedNode'\nexport type { AutomatedNodeData } from './AutomatedNode'\n\nexport { SubWorkflowNode } from './SubWorkflowNode'\nexport type { SubWorkflowNodeData } from './SubWorkflowNode'\n\nexport { WaitForSignalNode } from './WaitForSignalNode'\nexport type { WaitForSignalNodeData } from './WaitForSignalNode'\n\nexport { WaitForTimerNode } from './WaitForTimerNode'\nexport type { WaitForTimerNodeData } from './WaitForTimerNode'\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,iBAAiB;AAG1B,SAAS,eAAe;AAGxB,SAAS,oBAAoB;AAG7B,SAAS,qBAAqB;AAG9B,SAAS,uBAAuB;AAGhC,SAAS,yBAAyB;AAGlC,SAAS,wBAAwB;",
|
|
4
|
+
"sourcesContent": ["export { StartNode } from './StartNode'\nexport type { StartNodeData } from './StartNode'\n\nexport { EndNode } from './EndNode'\nexport type { EndNodeData } from './EndNode'\n\nexport { UserTaskNode } from './UserTaskNode'\nexport type { UserTaskNodeData } from './UserTaskNode'\n\nexport { AutomatedNode } from './AutomatedNode'\nexport type { AutomatedNodeData } from './AutomatedNode'\n\nexport { SubWorkflowNode } from './SubWorkflowNode'\nexport type { SubWorkflowNodeData } from './SubWorkflowNode'\n\nexport { WaitForSignalNode } from './WaitForSignalNode'\nexport type { WaitForSignalNodeData } from './WaitForSignalNode'\n\nexport { WaitForTimerNode } from './WaitForTimerNode'\nexport type { WaitForTimerNodeData } from './WaitForTimerNode'\n\nexport { ParallelForkNode } from './ParallelForkNode'\nexport type { ParallelForkNodeData } from './ParallelForkNode'\n\nexport { ParallelJoinNode } from './ParallelJoinNode'\nexport type { ParallelJoinNodeData } from './ParallelJoinNode'\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,iBAAiB;AAG1B,SAAS,eAAe;AAGxB,SAAS,oBAAoB;AAG7B,SAAS,qBAAqB;AAG9B,SAAS,uBAAuB;AAGhC,SAAS,yBAAyB;AAGlC,SAAS,wBAAwB;AAGjC,SAAS,wBAAwB;AAGjC,SAAS,wBAAwB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -136,6 +136,9 @@ __decorateClass([
|
|
|
136
136
|
__decorateClass([
|
|
137
137
|
Property({ name: "pending_transition", type: "jsonb", nullable: true })
|
|
138
138
|
], WorkflowInstance.prototype, "pendingTransition", 2);
|
|
139
|
+
__decorateClass([
|
|
140
|
+
Property({ name: "active_fork_step_id", type: "varchar", length: 100, nullable: true })
|
|
141
|
+
], WorkflowInstance.prototype, "activeForkStepId", 2);
|
|
139
142
|
__decorateClass([
|
|
140
143
|
Property({ name: "retry_count", type: "integer", default: 0 })
|
|
141
144
|
], WorkflowInstance.prototype, "retryCount", 2);
|
|
@@ -163,6 +166,73 @@ WorkflowInstance = __decorateClass([
|
|
|
163
166
|
Index({ name: "workflow_instances_tenant_org_idx", properties: ["tenantId", "organizationId"] })
|
|
164
167
|
], WorkflowInstance);
|
|
165
168
|
OptionalProps;
|
|
169
|
+
let WorkflowBranchInstance = class {
|
|
170
|
+
constructor() {
|
|
171
|
+
this.createdAt = /* @__PURE__ */ new Date();
|
|
172
|
+
this.updatedAt = /* @__PURE__ */ new Date();
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
__decorateClass([
|
|
176
|
+
PrimaryKey({ type: "uuid", defaultRaw: "gen_random_uuid()" })
|
|
177
|
+
], WorkflowBranchInstance.prototype, "id", 2);
|
|
178
|
+
__decorateClass([
|
|
179
|
+
Property({ name: "workflow_instance_id", type: "uuid" })
|
|
180
|
+
], WorkflowBranchInstance.prototype, "workflowInstanceId", 2);
|
|
181
|
+
__decorateClass([
|
|
182
|
+
Property({ name: "fork_step_id", type: "varchar", length: 100 })
|
|
183
|
+
], WorkflowBranchInstance.prototype, "forkStepId", 2);
|
|
184
|
+
__decorateClass([
|
|
185
|
+
Property({ name: "join_step_id", type: "varchar", length: 100 })
|
|
186
|
+
], WorkflowBranchInstance.prototype, "joinStepId", 2);
|
|
187
|
+
__decorateClass([
|
|
188
|
+
Property({ name: "branch_key", type: "varchar", length: 100 })
|
|
189
|
+
], WorkflowBranchInstance.prototype, "branchKey", 2);
|
|
190
|
+
__decorateClass([
|
|
191
|
+
Property({ name: "parent_branch_id", type: "uuid", nullable: true })
|
|
192
|
+
], WorkflowBranchInstance.prototype, "parentBranchId", 2);
|
|
193
|
+
__decorateClass([
|
|
194
|
+
Property({ name: "current_step_id", type: "varchar", length: 100 })
|
|
195
|
+
], WorkflowBranchInstance.prototype, "currentStepId", 2);
|
|
196
|
+
__decorateClass([
|
|
197
|
+
Property({ name: "status", type: "varchar", length: 30 })
|
|
198
|
+
], WorkflowBranchInstance.prototype, "status", 2);
|
|
199
|
+
__decorateClass([
|
|
200
|
+
Property({ name: "context_namespace", type: "jsonb" })
|
|
201
|
+
], WorkflowBranchInstance.prototype, "contextNamespace", 2);
|
|
202
|
+
__decorateClass([
|
|
203
|
+
Property({ name: "pending_transition", type: "jsonb", nullable: true })
|
|
204
|
+
], WorkflowBranchInstance.prototype, "pendingTransition", 2);
|
|
205
|
+
__decorateClass([
|
|
206
|
+
Property({ name: "error_message", type: "text", nullable: true })
|
|
207
|
+
], WorkflowBranchInstance.prototype, "errorMessage", 2);
|
|
208
|
+
__decorateClass([
|
|
209
|
+
Property({ name: "error_details", type: "jsonb", nullable: true })
|
|
210
|
+
], WorkflowBranchInstance.prototype, "errorDetails", 2);
|
|
211
|
+
__decorateClass([
|
|
212
|
+
Property({ name: "started_at", type: Date, nullable: true })
|
|
213
|
+
], WorkflowBranchInstance.prototype, "startedAt", 2);
|
|
214
|
+
__decorateClass([
|
|
215
|
+
Property({ name: "completed_at", type: Date, nullable: true })
|
|
216
|
+
], WorkflowBranchInstance.prototype, "completedAt", 2);
|
|
217
|
+
__decorateClass([
|
|
218
|
+
Property({ name: "tenant_id", type: "uuid" })
|
|
219
|
+
], WorkflowBranchInstance.prototype, "tenantId", 2);
|
|
220
|
+
__decorateClass([
|
|
221
|
+
Property({ name: "organization_id", type: "uuid" })
|
|
222
|
+
], WorkflowBranchInstance.prototype, "organizationId", 2);
|
|
223
|
+
__decorateClass([
|
|
224
|
+
Property({ name: "created_at", type: Date, onCreate: () => /* @__PURE__ */ new Date() })
|
|
225
|
+
], WorkflowBranchInstance.prototype, "createdAt", 2);
|
|
226
|
+
__decorateClass([
|
|
227
|
+
Property({ name: "updated_at", type: Date, onUpdate: () => /* @__PURE__ */ new Date() })
|
|
228
|
+
], WorkflowBranchInstance.prototype, "updatedAt", 2);
|
|
229
|
+
WorkflowBranchInstance = __decorateClass([
|
|
230
|
+
Entity({ tableName: "workflow_branch_instances" }),
|
|
231
|
+
Index({ name: "workflow_branch_instances_instance_status_idx", properties: ["workflowInstanceId", "status"] }),
|
|
232
|
+
Index({ name: "workflow_branch_instances_instance_fork_idx", properties: ["workflowInstanceId", "forkStepId"] }),
|
|
233
|
+
Index({ name: "workflow_branch_instances_tenant_org_idx", properties: ["tenantId", "organizationId"] })
|
|
234
|
+
], WorkflowBranchInstance);
|
|
235
|
+
OptionalProps;
|
|
166
236
|
let StepInstance = class {
|
|
167
237
|
constructor() {
|
|
168
238
|
this.retryCount = 0;
|
|
@@ -176,6 +246,9 @@ __decorateClass([
|
|
|
176
246
|
__decorateClass([
|
|
177
247
|
Property({ name: "workflow_instance_id", type: "uuid" })
|
|
178
248
|
], StepInstance.prototype, "workflowInstanceId", 2);
|
|
249
|
+
__decorateClass([
|
|
250
|
+
Property({ name: "branch_instance_id", type: "uuid", nullable: true })
|
|
251
|
+
], StepInstance.prototype, "branchInstanceId", 2);
|
|
179
252
|
__decorateClass([
|
|
180
253
|
Property({ name: "step_id", type: "varchar", length: 100 })
|
|
181
254
|
], StepInstance.prototype, "stepId", 2);
|
|
@@ -243,6 +316,9 @@ __decorateClass([
|
|
|
243
316
|
__decorateClass([
|
|
244
317
|
Property({ name: "step_instance_id", type: "uuid" })
|
|
245
318
|
], UserTask.prototype, "stepInstanceId", 2);
|
|
319
|
+
__decorateClass([
|
|
320
|
+
Property({ name: "branch_instance_id", type: "uuid", nullable: true })
|
|
321
|
+
], UserTask.prototype, "branchInstanceId", 2);
|
|
246
322
|
__decorateClass([
|
|
247
323
|
Property({ name: "task_name", type: "varchar", length: 255 })
|
|
248
324
|
], UserTask.prototype, "taskName", 2);
|
|
@@ -321,6 +397,9 @@ __decorateClass([
|
|
|
321
397
|
__decorateClass([
|
|
322
398
|
Property({ name: "step_instance_id", type: "uuid", nullable: true })
|
|
323
399
|
], WorkflowEvent.prototype, "stepInstanceId", 2);
|
|
400
|
+
__decorateClass([
|
|
401
|
+
Property({ name: "branch_instance_id", type: "uuid", nullable: true })
|
|
402
|
+
], WorkflowEvent.prototype, "branchInstanceId", 2);
|
|
324
403
|
__decorateClass([
|
|
325
404
|
Property({ name: "event_type", type: "varchar", length: 50 })
|
|
326
405
|
], WorkflowEvent.prototype, "eventType", 2);
|
|
@@ -409,6 +488,7 @@ WorkflowEventTrigger = __decorateClass([
|
|
|
409
488
|
var entities_default = [
|
|
410
489
|
WorkflowDefinition,
|
|
411
490
|
WorkflowInstance,
|
|
491
|
+
WorkflowBranchInstance,
|
|
412
492
|
StepInstance,
|
|
413
493
|
UserTask,
|
|
414
494
|
WorkflowEvent,
|
|
@@ -417,6 +497,7 @@ var entities_default = [
|
|
|
417
497
|
export {
|
|
418
498
|
StepInstance,
|
|
419
499
|
UserTask,
|
|
500
|
+
WorkflowBranchInstance,
|
|
420
501
|
WorkflowDefinition,
|
|
421
502
|
WorkflowEvent,
|
|
422
503
|
WorkflowEventTrigger,
|