@wildo-ai/saas-frontend-lib 1.1.16 → 1.1.18
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/LICENSE +114 -26
- package/LICENSE.enterprise +129 -0
- package/dist/esm/companion-exports.d.ts +5 -2
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/companion-exports.js +4 -2
- package/dist/esm/companion-exports.js.map +1 -1
- package/dist/esm/components/actions/action-bar.d.ts +16 -1
- package/dist/esm/components/actions/action-bar.d.ts.map +1 -1
- package/dist/esm/components/actions/action-bar.js.map +1 -1
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.d.ts.map +1 -1
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js +6 -14
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js.map +1 -1
- package/dist/esm/components/app/AppLayout_DecisionInbox.d.ts.map +1 -1
- package/dist/esm/components/app/AppLayout_DecisionInbox.js +2 -4
- package/dist/esm/components/app/AppLayout_DecisionInbox.js.map +1 -1
- package/dist/esm/components/app/AppLayout_Home.d.ts.map +1 -1
- package/dist/esm/components/app/AppLayout_Home.js +14 -7
- package/dist/esm/components/app/AppLayout_Home.js.map +1 -1
- package/dist/esm/components/app/AppLayout_IdentityPortalContainer.d.ts +13 -0
- package/dist/esm/components/app/AppLayout_IdentityPortalContainer.d.ts.map +1 -0
- package/dist/esm/components/app/AppLayout_IdentityPortalContainer.js +16 -0
- package/dist/esm/components/app/AppLayout_IdentityPortalContainer.js.map +1 -0
- package/dist/esm/components/app/DecisionInboxSection.d.ts +10 -0
- package/dist/esm/components/app/DecisionInboxSection.d.ts.map +1 -0
- package/dist/esm/components/app/DecisionInboxSection.js +15 -0
- package/dist/esm/components/app/DecisionInboxSection.js.map +1 -0
- package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.d.ts +13 -0
- package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.d.ts.map +1 -0
- package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.js +28 -0
- package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.js.map +1 -0
- package/dist/esm/components/app/IdentityPortalPage_Home.d.ts +10 -0
- package/dist/esm/components/app/IdentityPortalPage_Home.d.ts.map +1 -0
- package/dist/esm/components/app/IdentityPortalPage_Home.js +40 -0
- package/dist/esm/components/app/IdentityPortalPage_Home.js.map +1 -0
- package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.d.ts +16 -0
- package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.d.ts.map +1 -0
- package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.js +41 -0
- package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.js.map +1 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.d.ts +15 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.d.ts.map +1 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.js +268 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.js.map +1 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.d.ts +3 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.d.ts.map +1 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.js +35 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.js.map +1 -0
- package/dist/esm/components/auth/Auth_Main.d.ts.map +1 -1
- package/dist/esm/components/auth/Auth_Main.js +5 -0
- package/dist/esm/components/auth/Auth_Main.js.map +1 -1
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.d.ts +19 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.d.ts.map +1 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.js +156 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.js.map +1 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.d.ts +3 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.d.ts.map +1 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.js +107 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.js.map +1 -0
- package/dist/esm/components/auth/StepUpAuthDialog.d.ts +31 -10
- package/dist/esm/components/auth/StepUpAuthDialog.d.ts.map +1 -1
- package/dist/esm/components/auth/StepUpAuthDialog.js +81 -17
- package/dist/esm/components/auth/StepUpAuthDialog.js.map +1 -1
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.d.ts.map +1 -1
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js +19 -0
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js.map +1 -1
- package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.d.ts +11 -0
- package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.d.ts.map +1 -0
- package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.js +25 -0
- package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.js.map +1 -0
- package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.d.ts +11 -0
- package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.d.ts.map +1 -0
- package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.js +25 -0
- package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.js.map +1 -0
- package/dist/esm/components/billing/billing-pricing-table.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.js +40 -7
- package/dist/esm/components/billing/billing-pricing-table.js.map +1 -1
- package/dist/esm/components/billing/billing-subscription-status.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-subscription-status.js +9 -1
- package/dist/esm/components/billing/billing-subscription-status.js.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.js +3 -2
- package/dist/esm/components/billing/billing-usage-dashboard.js.map +1 -1
- package/dist/esm/components/compliance/EmbeddedSigningFrame.d.ts.map +1 -1
- package/dist/esm/components/compliance/EmbeddedSigningFrame.js +17 -6
- package/dist/esm/components/compliance/EmbeddedSigningFrame.js.map +1 -1
- package/dist/esm/components/data-display/AutomaticDisplayer.d.ts.map +1 -1
- package/dist/esm/components/data-display/AutomaticDisplayer.js +7 -2
- package/dist/esm/components/data-display/AutomaticDisplayer.js.map +1 -1
- package/dist/esm/components/data-display/DisplayField.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayField.js +67 -45
- package/dist/esm/components/data-display/DisplayField.js.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldEditable.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldEditable.js +4 -1
- package/dist/esm/components/data-display/DisplayFieldEditable.js.map +1 -1
- package/dist/esm/components/data-display/DisplayValueDispatcher.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayValueDispatcher.js +16 -6
- package/dist/esm/components/data-display/DisplayValueDispatcher.js.map +1 -1
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.d.ts.map +1 -1
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js +3 -1
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js.map +1 -1
- package/dist/esm/components/data-display/approval-seal.d.ts +7 -5
- package/dist/esm/components/data-display/approval-seal.d.ts.map +1 -1
- package/dist/esm/components/data-display/approval-seal.js +10 -4
- package/dist/esm/components/data-display/approval-seal.js.map +1 -1
- package/dist/esm/components/data-display/signature-requests.d.ts +81 -0
- package/dist/esm/components/data-display/signature-requests.d.ts.map +1 -0
- package/dist/esm/components/data-display/signature-requests.js +123 -0
- package/dist/esm/components/data-display/signature-requests.js.map +1 -0
- package/dist/esm/components/feedback/empty-state-marker.d.ts +16 -0
- package/dist/esm/components/feedback/empty-state-marker.d.ts.map +1 -0
- package/dist/esm/components/feedback/empty-state-marker.js +16 -0
- package/dist/esm/components/feedback/empty-state-marker.js.map +1 -0
- package/dist/esm/components/feedback/empty-state.d.ts.map +1 -1
- package/dist/esm/components/feedback/empty-state.js +2 -1
- package/dist/esm/components/feedback/empty-state.js.map +1 -1
- package/dist/esm/components/feedback/features/feature-unavailable-prompt.d.ts +7 -1
- package/dist/esm/components/feedback/features/feature-unavailable-prompt.d.ts.map +1 -1
- package/dist/esm/components/feedback/features/feature-unavailable-prompt.js +8 -2
- package/dist/esm/components/feedback/features/feature-unavailable-prompt.js.map +1 -1
- package/dist/esm/components/feedback/resource-empty-state.d.ts.map +1 -1
- package/dist/esm/components/feedback/resource-empty-state.js +2 -1
- package/dist/esm/components/feedback/resource-empty-state.js.map +1 -1
- package/dist/esm/components/flows-actors/approval.d.ts +25 -1
- package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/approval.js +22 -24
- package/dist/esm/components/flows-actors/approval.js.map +1 -1
- package/dist/esm/components/flows-actors/approval.labels.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/approval.labels.js +30 -0
- package/dist/esm/components/flows-actors/approval.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/flow-node.labels.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/flow-node.labels.js +4 -1
- package/dist/esm/components/flows-actors/flow-node.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/flow-step-visuals.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/flow-step-visuals.js +8 -2
- package/dist/esm/components/flows-actors/flow-step-visuals.js.map +1 -1
- package/dist/esm/components/flows-actors/human-decision-form.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/human-decision-form.js +4 -1
- package/dist/esm/components/flows-actors/human-decision-form.js.map +1 -1
- package/dist/esm/components/form/Form.d.ts +2 -0
- package/dist/esm/components/form/Form.d.ts.map +1 -1
- package/dist/esm/components/form/Form.js +1 -0
- package/dist/esm/components/form/Form.js.map +1 -1
- package/dist/esm/components/form/automated/AutomatedArrayField.d.ts.map +1 -1
- package/dist/esm/components/form/automated/AutomatedArrayField.js +7 -4
- package/dist/esm/components/form/automated/AutomatedArrayField.js.map +1 -1
- package/dist/esm/components/form/automated/AutosaveContext.d.ts.map +1 -1
- package/dist/esm/components/form/automated/AutosaveContext.js +8 -0
- package/dist/esm/components/form/automated/AutosaveContext.js.map +1 -1
- package/dist/esm/components/form/automated/FormField.d.ts +5 -3
- package/dist/esm/components/form/automated/FormField.d.ts.map +1 -1
- package/dist/esm/components/form/automated/FormField.js +38 -13
- package/dist/esm/components/form/automated/FormField.js.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js +75 -47
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.d.ts +1 -1
- package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.js +1 -1
- package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.js.map +1 -1
- package/dist/esm/components/form/validation-errors/form-validation.d.ts +5 -7
- package/dist/esm/components/form/validation-errors/form-validation.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/form-validation.js +7 -22
- package/dist/esm/components/form/validation-errors/form-validation.js.map +1 -1
- package/dist/esm/components/form/validation-errors/getFieldError.d.ts +25 -2
- package/dist/esm/components/form/validation-errors/getFieldError.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/getFieldError.js +29 -2
- package/dist/esm/components/form/validation-errors/getFieldError.js.map +1 -1
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts +5 -0
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js +3 -0
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js.map +1 -1
- package/dist/esm/components/form/validation-errors/save-attempt.d.ts +9 -0
- package/dist/esm/components/form/validation-errors/save-attempt.d.ts.map +1 -0
- package/dist/esm/components/form/validation-errors/save-attempt.js +42 -0
- package/dist/esm/components/form/validation-errors/save-attempt.js.map +1 -0
- package/dist/esm/components/form/validation-errors/unstarted-field-visit.d.ts +3 -1
- package/dist/esm/components/form/validation-errors/unstarted-field-visit.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/unstarted-field-visit.js +3 -1
- package/dist/esm/components/form/validation-errors/unstarted-field-visit.js.map +1 -1
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.d.ts +2 -2
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.js +3 -0
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.js.map +1 -1
- package/dist/esm/components/navigation/NavigationItemBadge.d.ts +16 -0
- package/dist/esm/components/navigation/NavigationItemBadge.d.ts.map +1 -1
- package/dist/esm/components/navigation/NavigationItemBadge.js +14 -2
- package/dist/esm/components/navigation/NavigationItemBadge.js.map +1 -1
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.d.ts +3 -3
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js +3 -3
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js.map +1 -1
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.d.ts +5 -13
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js +30 -255
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts +22 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js +57 -26
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js +40 -4
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js +26 -4
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.d.ts +31 -0
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.d.ts.map +1 -0
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.js +42 -0
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.js.map +1 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.d.ts +76 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.d.ts.map +1 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.js +268 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.js.map +1 -0
- package/dist/esm/components/navigation/command.d.ts +5 -0
- package/dist/esm/components/navigation/command.d.ts.map +1 -1
- package/dist/esm/components/navigation/command.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts +19 -0
- package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_DangerZone.js +51 -12
- package/dist/esm/components/resources/ResourceLayout_DangerZone.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.js +21 -7
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.js +17 -7
- package/dist/esm/components/resources/ResourceLayout_List.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts +1 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.js +4 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Search.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Search.js +12 -8
- package/dist/esm/components/resources/ResourceLayout_Search.js.map +1 -1
- package/dist/esm/components/resources/ResourceOwnedViewEmbeds.d.ts +1 -1
- package/dist/esm/components/resources/ResourceOwnedViewEmbeds.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceOwnedViewEmbeds.js +11 -4
- package/dist/esm/components/resources/ResourceOwnedViewEmbeds.js.map +1 -1
- package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.d.ts.map +1 -1
- package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.js +4 -1
- package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.js.map +1 -1
- package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.d.ts.map +1 -1
- package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.js +4 -1
- package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.js.map +1 -1
- package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.d.ts.map +1 -1
- package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.js +4 -1
- package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.js.map +1 -1
- package/dist/esm/components/resources/embeds/RelatedResourceSections.d.ts +1 -1
- package/dist/esm/components/resources/embeds/RelatedResourceSections.js.map +1 -1
- package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts +5 -5
- package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts.map +1 -1
- package/dist/esm/components/resources/embeds/ResourceEmbeds.js +21 -14
- package/dist/esm/components/resources/embeds/ResourceEmbeds.js.map +1 -1
- package/dist/esm/components/resources/skeleton/DisplayLayout.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/DisplayLayout.js +40 -4
- package/dist/esm/components/resources/skeleton/DisplayLayout.js.map +1 -1
- package/dist/esm/components/resources/skeleton/FormLayout.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/FormLayout.js +22 -6
- package/dist/esm/components/resources/skeleton/FormLayout.js.map +1 -1
- package/dist/esm/components/resources/skeleton/Group.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/Group.js +4 -1
- package/dist/esm/components/resources/skeleton/Group.js.map +1 -1
- package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.d.ts +1 -1
- package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js +1 -1
- package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js.map +1 -1
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts +21 -1
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.js +53 -9
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.js.map +1 -1
- package/dist/esm/components/sections/ContentSectionContainer.d.ts.map +1 -1
- package/dist/esm/components/sections/ContentSectionContainer.js +11 -7
- package/dist/esm/components/sections/ContentSectionContainer.js.map +1 -1
- package/dist/esm/components/sections/content-section.d.ts +1 -3
- package/dist/esm/components/sections/content-section.d.ts.map +1 -1
- package/dist/esm/components/sections/content-section.js.map +1 -1
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.js +2 -1
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.js.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts +12 -0
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js +28 -6
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js.map +1 -1
- package/dist/esm/components/settings/SettingsHub.d.ts +15 -0
- package/dist/esm/components/settings/SettingsHub.d.ts.map +1 -1
- package/dist/esm/components/settings/SettingsHub.js +14 -4
- package/dist/esm/components/settings/SettingsHub.js.map +1 -1
- package/dist/esm/components/typography/document-heading-level.d.ts +28 -0
- package/dist/esm/components/typography/document-heading-level.d.ts.map +1 -0
- package/dist/esm/components/typography/document-heading-level.js +63 -0
- package/dist/esm/components/typography/document-heading-level.js.map +1 -0
- package/dist/esm/components/views/chart-dashboard/ChartDashboard.d.ts +3 -2
- package/dist/esm/components/views/chart-dashboard/ChartDashboard.d.ts.map +1 -1
- package/dist/esm/components/views/chart-dashboard/ChartDashboard.js +4 -3
- package/dist/esm/components/views/chart-dashboard/ChartDashboard.js.map +1 -1
- package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.d.ts +1 -1
- package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.d.ts.map +1 -1
- package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartKpiFigure.d.ts +33 -0
- package/dist/esm/components/views/chart-view/ChartKpiFigure.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartKpiFigure.js +63 -4
- package/dist/esm/components/views/chart-view/ChartKpiFigure.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.js +52 -22
- package/dist/esm/components/views/chart-view/ChartView.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.labels.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.labels.js +76 -3
- package/dist/esm/components/views/chart-view/ChartView.labels.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.lazy.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.lazy.js +2 -1
- package/dist/esm/components/views/chart-view/ChartView.lazy.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartWidget.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartWidget.js +12 -4
- package/dist/esm/components/views/chart-view/ChartWidget.js.map +1 -1
- package/dist/esm/components/views/chart-view/chart-export.utils.d.ts +8 -0
- package/dist/esm/components/views/chart-view/chart-export.utils.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/chart-export.utils.js +15 -25
- package/dist/esm/components/views/chart-view/chart-export.utils.js.map +1 -1
- package/dist/esm/components/views/chart-view/chart-view-defaults.d.ts +6 -0
- package/dist/esm/components/views/chart-view/chart-view-defaults.d.ts.map +1 -0
- package/dist/esm/components/views/chart-view/chart-view-defaults.js +6 -0
- package/dist/esm/components/views/chart-view/chart-view-defaults.js.map +1 -0
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts +47 -12
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.js +87 -32
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js +8 -8
- package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/composed.builder.js +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/composed.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.js +7 -3
- package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.js +6 -2
- package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js +8 -2
- package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.js +13 -9
- package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.d.ts +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js +9 -8
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.js +2 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.d.ts +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js +10 -11
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.js +2 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.js +5 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js +7 -3
- package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.js +13 -13
- package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/useResourceChartData.d.ts +1 -1
- package/dist/esm/components/views/chart-view/useResourceChartData.js +1 -1
- package/dist/esm/components/views/chart-view/useResourceChartData.js.map +1 -1
- package/dist/esm/components/views/composite-view/CompositeView.d.ts +6 -0
- package/dist/esm/components/views/composite-view/CompositeView.d.ts.map +1 -1
- package/dist/esm/components/views/composite-view/CompositeView.js +6 -2
- package/dist/esm/components/views/composite-view/CompositeView.js.map +1 -1
- package/dist/esm/components/views/execution-view/ExecutionView.d.ts +7 -0
- package/dist/esm/components/views/execution-view/ExecutionView.d.ts.map +1 -1
- package/dist/esm/components/views/execution-view/ExecutionView.js +11 -1
- package/dist/esm/components/views/execution-view/ExecutionView.js.map +1 -1
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts +7 -0
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts.map +1 -1
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js +6 -2
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js.map +1 -1
- package/dist/esm/components/views/full-custom-view/FullCustomView.d.ts +7 -0
- package/dist/esm/components/views/full-custom-view/FullCustomView.d.ts.map +1 -1
- package/dist/esm/components/views/full-custom-view/FullCustomView.js +8 -3
- package/dist/esm/components/views/full-custom-view/FullCustomView.js.map +1 -1
- package/dist/esm/components/views/onboarding-view/OnboardingView.d.ts +7 -0
- package/dist/esm/components/views/onboarding-view/OnboardingView.d.ts.map +1 -1
- package/dist/esm/components/views/onboarding-view/OnboardingView.js +11 -1
- package/dist/esm/components/views/onboarding-view/OnboardingView.js.map +1 -1
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.d.ts +2 -2
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.js +2 -2
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.js.map +1 -1
- package/dist/esm/core/app-shell/app-shell.schemas.d.ts +87 -16
- package/dist/esm/core/app-shell/app-shell.schemas.d.ts.map +1 -1
- package/dist/esm/core/app-shell/app-shell.schemas.js +16 -0
- package/dist/esm/core/app-shell/app-shell.schemas.js.map +1 -1
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.d.ts +4 -4
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js +3 -3
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js.map +1 -1
- package/dist/esm/core/app-shell/useIdentityPortalShellLayout.d.ts +45 -0
- package/dist/esm/core/app-shell/useIdentityPortalShellLayout.d.ts.map +1 -0
- package/dist/esm/core/app-shell/useIdentityPortalShellLayout.js +72 -0
- package/dist/esm/core/app-shell/useIdentityPortalShellLayout.js.map +1 -0
- package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts +4 -3
- package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js +4 -3
- package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js.map +1 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts +15 -8
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js +22 -21
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js.map +1 -1
- package/dist/esm/core/billing/BillingContext.d.ts +27 -4
- package/dist/esm/core/billing/BillingContext.d.ts.map +1 -1
- package/dist/esm/core/billing/BillingContext.js +61 -2
- package/dist/esm/core/billing/BillingContext.js.map +1 -1
- package/dist/esm/core/billing/useBillingAction.d.ts.map +1 -1
- package/dist/esm/core/billing/useBillingAction.js +3 -2
- package/dist/esm/core/billing/useBillingAction.js.map +1 -1
- package/dist/esm/core/components-registry/RegisteredComponentRoot.d.ts +19 -0
- package/dist/esm/core/components-registry/RegisteredComponentRoot.d.ts.map +1 -0
- package/dist/esm/core/components-registry/RegisteredComponentRoot.js +23 -0
- package/dist/esm/core/components-registry/RegisteredComponentRoot.js.map +1 -0
- package/dist/esm/core/components-registry/register-framework-layouts.d.ts.map +1 -1
- package/dist/esm/core/components-registry/register-framework-layouts.js +4 -0
- package/dist/esm/core/components-registry/register-framework-layouts.js.map +1 -1
- package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts +159 -0
- package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/app-configuration-frontend.schemas.js +68 -3
- package/dist/esm/core/config/app-configuration-frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/app-level-components.frontend.schemas.d.ts +2 -2
- package/dist/esm/core/config/app-level-components.frontend.schemas.js +2 -2
- package/dist/esm/core/config/app-level-components.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/chart-view.frontend.schemas.d.ts +59 -18
- package/dist/esm/core/config/chart-view.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/chart-view.frontend.schemas.js +42 -7
- package/dist/esm/core/config/chart-view.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/composite-view.schemas.d.ts +8 -1
- package/dist/esm/core/config/composite-view.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/composite-view.schemas.js +1 -0
- package/dist/esm/core/config/composite-view.schemas.js.map +1 -1
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.d.ts +1 -1
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.js +1 -1
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.js.map +1 -1
- package/dist/esm/core/config/engine-settings-destinations.d.ts +6 -0
- package/dist/esm/core/config/engine-settings-destinations.d.ts.map +1 -1
- package/dist/esm/core/config/engine-settings-destinations.js +12 -0
- package/dist/esm/core/config/engine-settings-destinations.js.map +1 -1
- package/dist/esm/core/config/execution-view.schemas.d.ts +1 -1
- package/dist/esm/core/config/execution-view.schemas.js.map +1 -1
- package/dist/esm/core/config/identity-portal-settings.frontend.d.ts +17 -0
- package/dist/esm/core/config/identity-portal-settings.frontend.d.ts.map +1 -0
- package/dist/esm/core/config/identity-portal-settings.frontend.js +64 -0
- package/dist/esm/core/config/identity-portal-settings.frontend.js.map +1 -0
- package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts +8 -8
- package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/launcher-items.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/settings-hub-gating.frontend.utils.d.ts +1 -1
- package/dist/esm/core/config/settings-hub-gating.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/config/settings-hub-gating.frontend.utils.js +1 -1
- package/dist/esm/core/config/settings-hub-gating.frontend.utils.js.map +1 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts +17 -6
- package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/useSettingsHubConfig.d.ts.map +1 -1
- package/dist/esm/core/config/useSettingsHubConfig.js +1 -0
- package/dist/esm/core/config/useSettingsHubConfig.js.map +1 -1
- package/dist/esm/core/config/useVisibleSettingsHubConfig.d.ts +7 -0
- package/dist/esm/core/config/useVisibleSettingsHubConfig.d.ts.map +1 -1
- package/dist/esm/core/config/useVisibleSettingsHubConfig.js +9 -1
- package/dist/esm/core/config/useVisibleSettingsHubConfig.js.map +1 -1
- package/dist/esm/core/config/verify-launcher-content.d.ts +7 -1
- package/dist/esm/core/config/verify-launcher-content.d.ts.map +1 -1
- package/dist/esm/core/config/verify-launcher-content.js +31 -0
- package/dist/esm/core/config/verify-launcher-content.js.map +1 -1
- package/dist/esm/core/errors/GlobalErrorHandler.d.ts.map +1 -1
- package/dist/esm/core/errors/GlobalErrorHandler.js +10 -0
- package/dist/esm/core/errors/GlobalErrorHandler.js.map +1 -1
- package/dist/esm/core/errors/backend-refusal.frontend.d.ts +1 -1
- package/dist/esm/core/errors/backend-refusal.frontend.d.ts.map +1 -1
- package/dist/esm/core/errors/backend-refusal.frontend.js.map +1 -1
- package/dist/esm/core/events/NotificationContext.d.ts.map +1 -1
- package/dist/esm/core/events/NotificationContext.js +19 -2
- package/dist/esm/core/events/NotificationContext.js.map +1 -1
- package/dist/esm/core/events/notification-display-policy.frontend.schemas.d.ts +21 -2
- package/dist/esm/core/events/notification-display-policy.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/events/notification-display-policy.frontend.schemas.js +25 -4
- package/dist/esm/core/events/notification-display-policy.frontend.schemas.js.map +1 -1
- package/dist/esm/core/execution/useExecution.d.ts +3 -3
- package/dist/esm/core/execution/useExecution.js.map +1 -1
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.d.ts +1 -1
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js +1 -1
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js.map +1 -1
- package/dist/esm/core/features/FeatureGate.d.ts +13 -1
- package/dist/esm/core/features/FeatureGate.d.ts.map +1 -1
- package/dist/esm/core/features/FeatureGate.js +6 -1
- package/dist/esm/core/features/FeatureGate.js.map +1 -1
- package/dist/esm/core/features/InPlaceFeatureLock.d.ts +28 -0
- package/dist/esm/core/features/InPlaceFeatureLock.d.ts.map +1 -0
- package/dist/esm/core/features/InPlaceFeatureLock.js +49 -0
- package/dist/esm/core/features/InPlaceFeatureLock.js.map +1 -0
- package/dist/esm/core/features/PlanRefusalPrompt.d.ts +12 -0
- package/dist/esm/core/features/PlanRefusalPrompt.d.ts.map +1 -0
- package/dist/esm/core/features/PlanRefusalPrompt.js +90 -0
- package/dist/esm/core/features/PlanRefusalPrompt.js.map +1 -0
- package/dist/esm/core/features/RequiredFeaturesGate.d.ts +39 -0
- package/dist/esm/core/features/RequiredFeaturesGate.d.ts.map +1 -0
- package/dist/esm/core/features/RequiredFeaturesGate.js +51 -0
- package/dist/esm/core/features/RequiredFeaturesGate.js.map +1 -0
- package/dist/esm/core/features/feature-unavailability.frontend.utils.d.ts +6 -0
- package/dist/esm/core/features/feature-unavailability.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/features/feature-unavailability.frontend.utils.js +27 -10
- package/dist/esm/core/features/feature-unavailability.frontend.utils.js.map +1 -1
- package/dist/esm/core/features/plan-refusal.frontend.d.ts +43 -0
- package/dist/esm/core/features/plan-refusal.frontend.d.ts.map +1 -0
- package/dist/esm/core/features/plan-refusal.frontend.js +67 -0
- package/dist/esm/core/features/plan-refusal.frontend.js.map +1 -0
- package/dist/esm/core/features/required-features-gate-presentation.d.ts +21 -0
- package/dist/esm/core/features/required-features-gate-presentation.d.ts.map +1 -0
- package/dist/esm/core/features/required-features-gate-presentation.js +26 -0
- package/dist/esm/core/features/required-features-gate-presentation.js.map +1 -0
- package/dist/esm/core/features/useFeatureAvailability.d.ts.map +1 -1
- package/dist/esm/core/features/useFeatureAvailability.js +4 -0
- package/dist/esm/core/features/useFeatureAvailability.js.map +1 -1
- package/dist/esm/core/features/useOperationFeatureAvailability.d.ts +2 -0
- package/dist/esm/core/features/useOperationFeatureAvailability.d.ts.map +1 -1
- package/dist/esm/core/features/useOperationFeatureAvailability.js +6 -1
- package/dist/esm/core/features/useOperationFeatureAvailability.js.map +1 -1
- package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts +11 -0
- package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts.map +1 -1
- package/dist/esm/core/flows-actors/FlowsActorsContext.js +117 -3
- package/dist/esm/core/flows-actors/FlowsActorsContext.js.map +1 -1
- package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.d.ts.map +1 -1
- package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.js +3 -1
- package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.js.map +1 -1
- package/dist/esm/core/navigation/NavigationContentAreas.d.ts.map +1 -1
- package/dist/esm/core/navigation/NavigationContentAreas.js +28 -9
- package/dist/esm/core/navigation/NavigationContentAreas.js.map +1 -1
- package/dist/esm/{components/views/chart-dashboard/chart-dashboard.utils.d.ts → core/navigation/chart-read-gate.d.ts} +11 -7
- package/dist/esm/core/navigation/chart-read-gate.d.ts.map +1 -0
- package/dist/esm/{components/views/chart-dashboard/chart-dashboard.utils.js → core/navigation/chart-read-gate.js} +27 -11
- package/dist/esm/core/navigation/chart-read-gate.js.map +1 -0
- package/dist/esm/core/navigation/home-resolution.d.ts +36 -0
- package/dist/esm/core/navigation/home-resolution.d.ts.map +1 -0
- package/dist/esm/core/navigation/home-resolution.js +46 -0
- package/dist/esm/core/navigation/home-resolution.js.map +1 -0
- package/dist/esm/core/navigation/launcher-resolution.d.ts +2 -34
- package/dist/esm/core/navigation/launcher-resolution.d.ts.map +1 -1
- package/dist/esm/core/navigation/launcher-resolution.js +13 -18
- package/dist/esm/core/navigation/launcher-resolution.js.map +1 -1
- package/dist/esm/core/navigation/launcher-runtime-availability.d.ts +1 -1
- package/dist/esm/core/navigation/launcher-runtime-availability.d.ts.map +1 -1
- package/dist/esm/core/navigation/launcher-runtime-availability.js +7 -2
- package/dist/esm/core/navigation/launcher-runtime-availability.js.map +1 -1
- package/dist/esm/core/navigation/primary-destination-layout.d.ts +2 -2
- package/dist/esm/core/navigation/primary-destination-layout.d.ts.map +1 -1
- package/dist/esm/core/navigation/primary-destination-layout.js +1 -1
- package/dist/esm/core/navigation/primary-destination-layout.js.map +1 -1
- package/dist/esm/core/navigation/useChartReadDecision.d.ts +26 -0
- package/dist/esm/core/navigation/useChartReadDecision.d.ts.map +1 -0
- package/dist/esm/core/navigation/useChartReadDecision.js +58 -0
- package/dist/esm/core/navigation/useChartReadDecision.js.map +1 -0
- package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.d.ts +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.d.ts.map +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.js.map +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.d.ts +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.d.ts.map +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.js.map +1 -1
- package/dist/esm/core/navigation/view-title-resolution.d.ts +21 -0
- package/dist/esm/core/navigation/view-title-resolution.d.ts.map +1 -1
- package/dist/esm/core/navigation/view-title-resolution.js +25 -0
- package/dist/esm/core/navigation/view-title-resolution.js.map +1 -1
- package/dist/esm/core/navigation/viewer-field-reader.d.ts +81 -0
- package/dist/esm/core/navigation/viewer-field-reader.d.ts.map +1 -0
- package/dist/esm/core/navigation/viewer-field-reader.js +113 -0
- package/dist/esm/core/navigation/viewer-field-reader.js.map +1 -0
- package/dist/esm/core/navigation/viewer-roles.d.ts +40 -0
- package/dist/esm/core/navigation/viewer-roles.d.ts.map +1 -0
- package/dist/esm/core/navigation/viewer-roles.js +26 -0
- package/dist/esm/core/navigation/viewer-roles.js.map +1 -0
- package/dist/esm/core/requests/user-interaction-clock.d.ts +32 -0
- package/dist/esm/core/requests/user-interaction-clock.d.ts.map +1 -0
- package/dist/esm/core/requests/user-interaction-clock.js +47 -0
- package/dist/esm/core/requests/user-interaction-clock.js.map +1 -0
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.d.ts.map +1 -1
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.js +2 -0
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.js.map +1 -1
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts +66 -10
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js +63 -8
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js.map +1 -1
- package/dist/esm/core/requests/wildo-http-client.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/requests/wildo-http-client.frontend.service.js +13 -0
- package/dist/esm/core/requests/wildo-http-client.frontend.service.js.map +1 -1
- package/dist/esm/core/resources/hooks/useOperationEnabled.d.ts.map +1 -1
- package/dist/esm/core/resources/hooks/useOperationEnabled.js +45 -3
- package/dist/esm/core/resources/hooks/useOperationEnabled.js.map +1 -1
- package/dist/esm/core/resources/resource-addressability.frontend.utils.d.ts +1 -1
- package/dist/esm/core/resources/resource-addressability.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/resources/resource-addressability.frontend.utils.js.map +1 -1
- package/dist/esm/core/resources/resources-repository.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/resources/resources-repository.frontend.service.js +2 -0
- package/dist/esm/core/resources/resources-repository.frontend.service.js.map +1 -1
- package/dist/esm/core/resources/resources.frontend.schemas.d.ts +29 -23
- package/dist/esm/core/resources/resources.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/resources/resources.frontend.schemas.js +20 -20
- package/dist/esm/core/resources/resources.frontend.schemas.js.map +1 -1
- package/dist/esm/core/resources/rmm/ResourceMutationManager.d.ts.map +1 -1
- package/dist/esm/core/resources/rmm/ResourceMutationManager.js +4 -0
- package/dist/esm/core/resources/rmm/ResourceMutationManager.js.map +1 -1
- package/dist/esm/core/resources/useResourceOperationActions.d.ts.map +1 -1
- package/dist/esm/core/resources/useResourceOperationActions.js +7 -7
- package/dist/esm/core/resources/useResourceOperationActions.js.map +1 -1
- package/dist/esm/core/runtime/AppRouter.d.ts.map +1 -1
- package/dist/esm/core/runtime/AppRouter.js +11 -33
- package/dist/esm/core/runtime/AppRouter.js.map +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.d.ts +15 -1
- package/dist/esm/core/runtime/ApplicationMainContext.d.ts.map +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.js +41 -23
- package/dist/esm/core/runtime/ApplicationMainContext.js.map +1 -1
- package/dist/esm/core/runtime/IdentityPortalRouter.d.ts +20 -0
- package/dist/esm/core/runtime/IdentityPortalRouter.d.ts.map +1 -0
- package/dist/esm/core/runtime/IdentityPortalRouter.js +31 -0
- package/dist/esm/core/runtime/IdentityPortalRouter.js.map +1 -0
- package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts +9 -0
- package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts.map +1 -1
- package/dist/esm/core/runtime/domain-module.frontend.definitions.js +3 -2
- package/dist/esm/core/runtime/domain-module.frontend.definitions.js.map +1 -1
- package/dist/esm/core/runtime/frontend-companion-resource-inputs.d.ts +21 -0
- package/dist/esm/core/runtime/frontend-companion-resource-inputs.d.ts.map +1 -1
- package/dist/esm/core/runtime/frontend-companion-resource-inputs.js +19 -1
- package/dist/esm/core/runtime/frontend-companion-resource-inputs.js.map +1 -1
- package/dist/esm/core/runtime/identity-routes.d.ts +13 -0
- package/dist/esm/core/runtime/identity-routes.d.ts.map +1 -0
- package/dist/esm/core/runtime/identity-routes.js +50 -0
- package/dist/esm/core/runtime/identity-routes.js.map +1 -0
- package/dist/esm/core/runtime/routes.frontend.definitions.d.ts +19 -0
- package/dist/esm/core/runtime/routes.frontend.definitions.d.ts.map +1 -1
- package/dist/esm/core/runtime/routes.frontend.definitions.js +20 -1
- package/dist/esm/core/runtime/routes.frontend.definitions.js.map +1 -1
- package/dist/esm/core/runtime/runtime.frontend.schemas.d.ts +3 -1
- package/dist/esm/core/runtime/runtime.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/runtime/runtime.frontend.schemas.js +2 -0
- package/dist/esm/core/runtime/runtime.frontend.schemas.js.map +1 -1
- package/dist/esm/core/runtime/start-application.frontend.service.d.ts +7 -0
- package/dist/esm/core/runtime/start-application.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/runtime/start-application.frontend.service.js +4 -2
- package/dist/esm/core/runtime/start-application.frontend.service.js.map +1 -1
- package/dist/esm/core/search/command-score.d.ts +33 -0
- package/dist/esm/core/search/command-score.d.ts.map +1 -0
- package/dist/esm/core/search/command-score.js +109 -0
- package/dist/esm/core/search/command-score.js.map +1 -0
- package/dist/esm/core/security/AuthSessionContext.d.ts.map +1 -1
- package/dist/esm/core/security/AuthSessionContext.js +4 -0
- package/dist/esm/core/security/AuthSessionContext.js.map +1 -1
- package/dist/esm/core/security/StepUpAuthContext.d.ts +3 -2
- package/dist/esm/core/security/StepUpAuthContext.d.ts.map +1 -1
- package/dist/esm/core/security/StepUpAuthContext.js +7 -2
- package/dist/esm/core/security/StepUpAuthContext.js.map +1 -1
- package/dist/esm/core/security/federated-reauthentication.frontend.d.ts +13 -2
- package/dist/esm/core/security/federated-reauthentication.frontend.d.ts.map +1 -1
- package/dist/esm/core/security/federated-reauthentication.frontend.js +21 -1
- package/dist/esm/core/security/federated-reauthentication.frontend.js.map +1 -1
- package/dist/esm/core/security/useAuthenticatedRouteEntry.d.ts +24 -0
- package/dist/esm/core/security/useAuthenticatedRouteEntry.d.ts.map +1 -0
- package/dist/esm/core/security/useAuthenticatedRouteEntry.js +37 -0
- package/dist/esm/core/security/useAuthenticatedRouteEntry.js.map +1 -0
- package/dist/esm/core/ui/design-token.utils.d.ts +9 -0
- package/dist/esm/core/ui/design-token.utils.d.ts.map +1 -1
- package/dist/esm/core/ui/design-token.utils.js +24 -3
- package/dist/esm/core/ui/design-token.utils.js.map +1 -1
- package/dist/esm/core/ui/themes/focus-indicator.d.ts +1 -1
- package/dist/esm/core/ui/themes/focus-indicator.js +1 -1
- package/dist/esm/core/ui/themes/focus-indicator.js.map +1 -1
- package/dist/esm/core/ui/ui.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/index.d.ts +19 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +22 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/testing/mock-builders.d.ts +1 -1
- package/dist/esm/testing/mock-builders.d.ts.map +1 -1
- package/dist/esm/testing/mock-builders.js +1 -0
- package/dist/esm/testing/mock-builders.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +9 -6
- package/dist/esm/components/views/chart-dashboard/chart-dashboard.utils.d.ts.map +0 -1
- package/dist/esm/components/views/chart-dashboard/chart-dashboard.utils.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOperationEnabled.d.ts","sourceRoot":"","sources":["../../../../../src/core/resources/hooks/useOperationEnabled.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,EAEL,KAAK,8BAA8B,EAEpC,MAAM,qFAAqF,CAAC;AAC7F,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,+DAA+D,CAAC;AAC7H,OAAO,EACL,KAAK,YAAY,EAEjB,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"useOperationEnabled.d.ts","sourceRoot":"","sources":["../../../../../src/core/resources/hooks/useOperationEnabled.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,EAEL,KAAK,8BAA8B,EAEpC,MAAM,qFAAqF,CAAC;AAC7F,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,+DAA+D,CAAC;AAC7H,OAAO,EACL,KAAK,YAAY,EAEjB,KAAK,QAAQ,EAIuB,MAAM,uBAAuB,CAAC;AAIpE,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,mEAAmE,CAAC;AAK3E,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAEpC,MAAM,WAAW,yBAAyB,CAAC,WAAW,GAAG,GAAG;IAC1D,gCAAgC;IAChC,SAAS,EAAE,uCAAuC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;I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OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,uCAAuC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,GAChE,MAAM,CAER;AAuED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,GAAG,GAAG,EACnD,MAAM,EAAE,yBAAyB,CAAC,WAAW,CAAC,GAC7C,yBAAyB,CAgK3B;AAyDD,wBAAgB,oBAAoB,CAAC,WAAW,GAAG,GAAG,EACpD,UAAU,EAAE,uCAAuC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,EACpE,MAAM,GAAE,0BAA0B,CAAC,WAAW,CAAM,GACnD,GAAG,CAAC,MAAM,EAAE,qBAAqB,CAAC,CA2KpC"}
|
|
@@ -16,11 +16,12 @@
|
|
|
16
16
|
* });
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
-
import { useMemo } from 'react';
|
|
19
|
+
import { useContext, useMemo } from 'react';
|
|
20
20
|
import { useResourceRegistry } from '../../../core/resources/useResourceRegistry.js';
|
|
21
21
|
import { useUserOrgs } from '../../../core/security/useUserOrgs.js';
|
|
22
22
|
import { evaluateEnabledCondition, getOperationContextNeeds, } from '../../../core/resources/utils/operation-enabled-condition.frontend.utils.js';
|
|
23
|
-
import { FeatureUnavailabilityBehavior, ResourcesConfig_OperationPathUtils, bulkOperationRunsInBackground } from '@wildo-ai/saas-models';
|
|
23
|
+
import { FeatureUnavailabilityBehavior, ResourcesConfig_OperationPathUtils, bulkOperationRunsInBackground, requiredRequestFieldWithheldForRow } from '@wildo-ai/saas-models';
|
|
24
|
+
import { ApplicationContext } from '../../../core/runtime/ApplicationContext.shared.js';
|
|
24
25
|
import { useState, useEffect } from 'react';
|
|
25
26
|
import { useFeatures } from '../../../core/features/useFeatures.js';
|
|
26
27
|
import { resolveOperationFeatureAvailability, } from '../../../core/features/useOperationFeatureAvailability.js';
|
|
@@ -41,8 +42,26 @@ function requiresFeaturesBeforeSubmission(operation) {
|
|
|
41
42
|
return false;
|
|
42
43
|
return Array.isArray(required) || !required.appliesWhen;
|
|
43
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Whether the operation's request cannot be filled for this row (#4059): a field its request DTO requires is one its
|
|
47
|
+
* `requestFieldOffers` leave out for the row, so every submission would be refused. Such an operation is unavailable,
|
|
48
|
+
* exactly as if its `enabledCondition` had answered false, so a `WHEN_AVAILABLE` action is hidden rather than opening a
|
|
49
|
+
* form that can only fail. See `requiredRequestFieldWithheldForRow`, which owns the rule.
|
|
50
|
+
*
|
|
51
|
+
* Judged only for a single-row operation with its row loaded: a bulk operation has no one row to judge it against, and
|
|
52
|
+
* while the row loads nothing is known, so both stay available and the form (or the backend) decides.
|
|
53
|
+
*/
|
|
54
|
+
function requestUnfillableForRow(operation, currentObject, appConfig) {
|
|
55
|
+
if (operation.isBulkOperation === true || !currentObject || typeof currentObject !== 'object')
|
|
56
|
+
return false;
|
|
57
|
+
return requiredRequestFieldWithheldForRow(operation, {
|
|
58
|
+
appConfig,
|
|
59
|
+
currentObject: currentObject,
|
|
60
|
+
}) !== undefined;
|
|
61
|
+
}
|
|
44
62
|
function operationNeedsDeferredGate(operation) {
|
|
45
|
-
|
|
63
|
+
// An operation with request-field offers may be unavailable for the row too (#4059), so it is held until judged.
|
|
64
|
+
return Boolean(operation.enabledCondition || operation.requiredFeatures || operation.requestFieldOffers);
|
|
46
65
|
}
|
|
47
66
|
/**
|
|
48
67
|
* Derives a value-stable {@link ExecutionContext_InitiatorIds} from the
|
|
@@ -84,6 +103,9 @@ export function useOperationEnabled(params) {
|
|
|
84
103
|
const { getResourcesRegistry, doOperation } = useResourceRegistry();
|
|
85
104
|
const { user, permissions } = useUserOrgs();
|
|
86
105
|
const appScope = useAppScopeSafe();
|
|
106
|
+
// The application's shared configuration, which a request-field offer decides from (#4059). Absent outside an
|
|
107
|
+
// application, where every offer narrows nothing.
|
|
108
|
+
const appConfig = useContext(ApplicationContext)?.appConfig;
|
|
87
109
|
const billing = useBillingSafe();
|
|
88
110
|
const resourcesRegistry = getResourcesRegistry();
|
|
89
111
|
const { resolvedFeatures, resolvedFeaturesResponse, featureDefinitions, unavailabilityPolicy, isLoading: featuresLoading, } = useFeatures();
|
|
@@ -105,6 +127,7 @@ export function useOperationEnabled(params) {
|
|
|
105
127
|
unavailabilityPolicy,
|
|
106
128
|
userRoles,
|
|
107
129
|
billingEnabled: billing?.isEnabled ?? false,
|
|
130
|
+
mayPurchase: billing?.mayPurchase ?? false,
|
|
108
131
|
});
|
|
109
132
|
}, [
|
|
110
133
|
operation,
|
|
@@ -116,6 +139,7 @@ export function useOperationEnabled(params) {
|
|
|
116
139
|
permissions,
|
|
117
140
|
appScope?.currentOrganizationId,
|
|
118
141
|
billing?.isEnabled,
|
|
142
|
+
billing?.mayPurchase,
|
|
119
143
|
]);
|
|
120
144
|
const [isEnabled, setIsEnabled] = useState(() => !operationNeedsDeferredGate(operation));
|
|
121
145
|
const [isLoading, setIsLoading] = useState(() => operationNeedsDeferredGate(operation));
|
|
@@ -133,6 +157,12 @@ export function useOperationEnabled(params) {
|
|
|
133
157
|
setIsLoading(false);
|
|
134
158
|
return;
|
|
135
159
|
}
|
|
160
|
+
// A request whose required field cannot be offered for this row can only be refused (#4059).
|
|
161
|
+
if (requestUnfillableForRow(operation, currentObject, appConfig)) {
|
|
162
|
+
setIsEnabled(false);
|
|
163
|
+
setIsLoading(false);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
136
166
|
// Check if operation has enabledCondition
|
|
137
167
|
if (!('enabledCondition' in operation) || !operation.enabledCondition) {
|
|
138
168
|
// No enabledCondition means always enabled
|
|
@@ -182,6 +212,7 @@ export function useOperationEnabled(params) {
|
|
|
182
212
|
contextNeeds.needsUserContext,
|
|
183
213
|
doOperation,
|
|
184
214
|
featureAvailability,
|
|
215
|
+
appConfig,
|
|
185
216
|
]);
|
|
186
217
|
return {
|
|
187
218
|
isEnabled,
|
|
@@ -253,6 +284,9 @@ export function useOperationsEnabled(operations, params = {}) {
|
|
|
253
284
|
const { getResourcesRegistry, doOperation } = useResourceRegistry();
|
|
254
285
|
const { user, permissions } = useUserOrgs();
|
|
255
286
|
const appScope = useAppScopeSafe();
|
|
287
|
+
// The application's shared configuration, which a request-field offer decides from (#4059). Absent outside an
|
|
288
|
+
// application, where every offer narrows nothing.
|
|
289
|
+
const appConfig = useContext(ApplicationContext)?.appConfig;
|
|
256
290
|
const billing = useBillingSafe();
|
|
257
291
|
const resourcesRegistry = getResourcesRegistry();
|
|
258
292
|
const { resolvedFeatures, resolvedFeaturesResponse, featureDefinitions, unavailabilityPolicy, isLoading: featuresLoading, } = useFeatures();
|
|
@@ -280,6 +314,7 @@ export function useOperationsEnabled(operations, params = {}) {
|
|
|
280
314
|
unavailabilityPolicy,
|
|
281
315
|
userRoles,
|
|
282
316
|
billingEnabled: billing?.isEnabled ?? false,
|
|
317
|
+
mayPurchase: billing?.mayPurchase ?? false,
|
|
283
318
|
};
|
|
284
319
|
const evaluateAll = async () => {
|
|
285
320
|
const results = new Map();
|
|
@@ -292,6 +327,11 @@ export function useOperationsEnabled(operations, params = {}) {
|
|
|
292
327
|
results.set(operationKey, { isEnabled: false, featureAvailability });
|
|
293
328
|
return;
|
|
294
329
|
}
|
|
330
|
+
// A request whose required field cannot be offered for this row can only be refused (#4059).
|
|
331
|
+
if (requestUnfillableForRow(operation, currentObject, appConfig)) {
|
|
332
|
+
results.set(operationKey, { isEnabled: false, featureAvailability });
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
295
335
|
if (!('enabledCondition' in operation) || !operation.enabledCondition) {
|
|
296
336
|
results.set(operationKey, { isEnabled: true, featureAvailability });
|
|
297
337
|
return;
|
|
@@ -365,6 +405,8 @@ export function useOperationsEnabled(operations, params = {}) {
|
|
|
365
405
|
unavailabilityPolicy,
|
|
366
406
|
featuresLoading,
|
|
367
407
|
billing?.isEnabled,
|
|
408
|
+
billing?.mayPurchase,
|
|
409
|
+
appConfig,
|
|
368
410
|
]);
|
|
369
411
|
return enabledMap;
|
|
370
412
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOperationEnabled.js","sourceRoot":"","sources":["../../../../../src/core/resources/hooks/useOperationEnabled.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wDAAwD,CAAC;AAC7F,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC5E,OAAO,EACL,wBAAwB,EAExB,wBAAwB,GACzB,MAAM,qFAAqF,CAAC;AAE7F,OAAO,EAIL,6BAA6B,EAC7B,kCAAkC,EAAE,6BAA6B,EAAwC,MAAM,uBAAuB,CAAC;AACzI,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC5E,OAAO,EACL,mCAAmC,GAEpC,MAAM,mEAAmE,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,yEAAyE,CAAC;AAiFlH,MAAM,UAAU,wBAAwB,CACtC,SAAiE;IAEjE,OAAO,kCAAkC,CAAC,mCAAmC,CAAC,SAAgB,CAAC,CAAC;AAClG,CAAC;AAED;;;;GAIG;AACH,SAAS,gCAAgC,CACvC,SAAoF;IAEpF,MAAM,QAAQ,GAAG,SAAS,EAAE,gBAAgB,CAAC;IAC7C,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5B,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;AAC1D,CAAC;AA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["/**\n * React hook for checking if an operation is enabled.\n * \n * This hook evaluates the enabledCondition for an operation based on:\n * - Current object (for READ/UPDATE/DELETE)\n * - Input DTO (for CREATE)\n * - User context (from UserOrgsContext)\n * - Object context (fetched if needed)\n * \n * Usage:\n * ```tsx\n * const { isEnabled, isLoading } = useOperationEnabled({\n * operation: myOperation,\n * currentObject: myObject,\n * resourceType: 'TODOS'\n * });\n * ```\n */\n\nimport { useMemo } from 'react';\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\nimport { useUserOrgs } from '~wildo-frontend-lib/core/security/useUserOrgs';\nimport {\n evaluateEnabledCondition,\n type EvaluateEnabledConditionParams,\n getOperationContextNeeds,\n} from '~wildo-frontend-lib/core/resources/utils/operation-enabled-condition.frontend.utils';\nimport type { FrontendResourceConfiguration_Operation } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport {\n type ResourceType,\n type ExecutionContext_InitiatorIds,\n type DataMode,\n FeatureUnavailabilityBehavior,\n ResourcesConfig_OperationPathUtils, bulkOperationRunsInBackground, ResourceOperation_ServiceRuntimeMode } from '@wildo-ai/saas-models';\nimport { useState, useEffect } from 'react';\nimport { useFeatures } from '~wildo-frontend-lib/core/features/useFeatures';\nimport {\n resolveOperationFeatureAvailability,\n type FeatureAvailability,\n} from '~wildo-frontend-lib/core/features/useOperationFeatureAvailability';\nimport { useAppScopeSafe } from '~wildo-frontend-lib/core/scope/useAppScope';\nimport { useBillingSafe } from '~wildo-frontend-lib/core/billing/useBilling';\nimport { buildFeaturePolicyRoles } from '~wildo-frontend-lib/core/features/feature-unavailability.frontend.utils';\n\nexport type { FeatureAvailability };\n\nexport interface UseOperationEnabledParams<TMainSchema = any> {\n /** The operation to evaluate */\n operation: FrontendResourceConfiguration_Operation<any, any, any>;\n /** Current object (for READ/UPDATE/DELETE operations) */\n currentObject?: TMainSchema;\n /** Input DTO (for CREATE operations) */\n inputDto?: Partial<TMainSchema>;\n /** Object context (parent/child relationships) - optional, will be fetched if needed */\n objectContext?: any;\n /** Resource type */\n resourceType: ResourceType;\n /** Whether to enable evaluation (default: true) */\n enabled?: boolean;\n}\n\nexport interface UseOperationEnabledResult {\n /** Whether the operation is enabled */\n isEnabled: boolean;\n /** Whether evaluation is in progress */\n isLoading: boolean;\n /** Error if evaluation failed */\n error: Error | null;\n /** Context needs for the operation */\n contextNeeds: {\n needsObjectContext: boolean;\n needsUserContext: boolean;\n };\n /** Feature availability information (undefined if no requiredFeatures on operation) */\n featureAvailability?: FeatureAvailability;\n}\n\n/** Result type for the batch useOperationsEnabled hook */\nexport interface OperationEnabledEntry {\n isEnabled: boolean;\n featureAvailability?: FeatureAvailability;\n /**\n * For a BULK operation judged row by row (`selectionObjects`): the indices, in `selectionObjects`,\n * of the rows that FAIL its condition. Present only when some do. It is what lets the bar say\n * \"2 of 5 selected can't…\" and offer to keep only the eligible rows, instead of a bare greyed button.\n */\n ineligibleSelectionIndices?: readonly number[];\n}\n\nexport interface UseOperationsEnabledParams<TMainSchema = any> {\n currentObject?: TMainSchema;\n inputDto?: Partial<TMainSchema>;\n objectContext?: EvaluateEnabledConditionParams<TMainSchema>['objectContext'];\n resourceType?: ResourceType;\n enabled?: boolean;\n /**\n * The rows a BULK operation would act on. A bulk twin inherits its single-row variant's\n * `enabledCondition`, which reads `currentObject` — so it is judged against EACH selected row.\n * An INLINE twin is enabled only when every row passes. That is the backend's rule\n * (`ServicesRegistryHandlerBackendService`, the multi-row branch of the enabled-state gate): the\n * write is one write over the whole selection, so offering it on \"most rows qualify\" would only\n * trade a disabled button for a refusal after the click. A BACKGROUND twin is enabled while at least\n * one row passes: its run changes the eligible rows and reports each refused one.\n *\n * Ignored for a non-bulk operation, which keeps `currentObject`. When absent, a bulk operation is\n * judged against `currentObject` as before.\n */\n selectionObjects?: readonly TMainSchema[];\n /**\n * The data mode `currentObject` and `selectionObjects` were fetched in, when the caller knows it: a collection list\n * passes its LIST data mode (`SUMMARY` by default). Forwarded to `evaluateEnabledCondition`, where a development build\n * names a condition that reads a field a SUMMARY row cannot carry (#2467).\n */\n subjectDataMode?: DataMode;\n /**\n * The organization the evaluated operations' requests will name, when the caller knows it — an\n * action surface reads it from its own route context. It becomes `initiatorIds.organizationId`, the\n * value the backend's evaluation of the same condition sees. When absent, the ambient selection\n * (`appScope.primaryScopeValues.organizationId`) is used, as before (#1461).\n */\n organizationId?: string;\n}\n\nexport function buildOperationEnabledKey(\n operation: FrontendResourceConfiguration_Operation<any, any, any>,\n): string {\n return ResourcesConfig_OperationPathUtils.createOperationPathKeyFromOperation(operation as any);\n}\n\n/**\n * Whether the operation requires a feature before anything is submitted: a requirement that is not conditional on\n * the request body. While the resolved features load, such an operation is held disabled; one whose requirement\n * carries `appliesWhen` is not, because only the submitted body can decide it.\n */\nfunction requiresFeaturesBeforeSubmission(\n operation: FrontendResourceConfiguration_Operation<any, any, any> | null | undefined,\n): boolean {\n const required = operation?.requiredFeatures;\n if (!required) return false;\n return Array.isArray(required) || !required.appliesWhen;\n}\n\nfunction operationNeedsDeferredGate(\n operation: FrontendResourceConfiguration_Operation<any, any, any>,\n): boolean {\n return Boolean(operation.enabledCondition || operation.requiredFeatures);\n}\n\n/**\n * Derives a value-stable {@link ExecutionContext_InitiatorIds} from the\n * individual initiator primitives.\n *\n * Both enabled-condition hooks below feed `initiatorIds` into an effect's\n * dependency array. Building it directly from the `user` object and the\n * `appScope.primaryScopeValues` object made its identity churn whenever EITHER\n * source object's reference changed — most notably an access-token refresh,\n * which rebuilds `primaryScopeValues` (the access token is one of its `useMemo`\n * dependencies) even when the decoded user / organization / application ids are\n * unchanged. That needlessly re-fired the (async) evaluation effect. Keying the\n * memo on the three extracted primitives keeps the returned object\n * referentially stable until an id genuinely changes.\n */\nfunction useStableInitiatorIds(\n userId: string | null | undefined,\n organizationId: string | null | undefined,\n applicationId: string | null | undefined,\n): ExecutionContext_InitiatorIds | undefined {\n return useMemo((): ExecutionContext_InitiatorIds | undefined => {\n const ids: ExecutionContext_InitiatorIds = {};\n if (userId) ids.userId = userId;\n if (organizationId) ids.organizationId = organizationId;\n if (applicationId) ids.applicationId = applicationId;\n return Object.keys(ids).length > 0 ? ids : undefined;\n }, [userId, organizationId, applicationId]);\n}\n\n/**\n * Hook to check if an operation is enabled based on enabledCondition.\n * \n * Automatically handles:\n * - Context needs extraction\n * - User context from UserOrgsContext\n * - Object context fetching (if needed)\n * - Caching based on operation, object, and user\n */\nexport function useOperationEnabled<TMainSchema = any>(\n params: UseOperationEnabledParams<TMainSchema>\n): UseOperationEnabledResult {\n const {\n operation,\n currentObject,\n inputDto,\n objectContext: providedObjectContext,\n resourceType,\n enabled = true,\n } = params;\n\n const { getResourcesRegistry, doOperation } = useResourceRegistry();\n const { user, permissions } = useUserOrgs();\n const appScope = useAppScopeSafe();\n const billing = useBillingSafe();\n const resourcesRegistry = getResourcesRegistry();\n const {\n resolvedFeatures,\n resolvedFeaturesResponse,\n featureDefinitions,\n unavailabilityPolicy,\n isLoading: featuresLoading,\n } = useFeatures();\n\n // Extract context needs (static, doesn't need to be in effect)\n const contextNeeds = useMemo(\n () => getOperationContextNeeds(operation),\n [operation]\n );\n\n const initiatorIds = useStableInitiatorIds(\n user?._id,\n appScope?.primaryScopeValues?.organizationId,\n appScope?.primaryScopeValues?.applicationId,\n );\n\n // ── Feature availability check (synchronous, from context) ──\n const featureAvailability = useMemo((): FeatureAvailability | undefined => {\n if (featuresLoading) {\n return requiresFeaturesBeforeSubmission(operation)\n ? { isAvailable: false, behavior: FeatureUnavailabilityBehavior.DISABLE }\n : undefined;\n }\n const userRoles = buildFeaturePolicyRoles(\n permissions,\n appScope?.currentOrganizationId ?? null,\n );\n\n return resolveOperationFeatureAvailability(operation, {\n resolvedFeatures,\n resolvedFeaturesResponse,\n featureDefinitions,\n unavailabilityPolicy,\n userRoles,\n billingEnabled: billing?.isEnabled ?? false,\n });\n }, [\n operation,\n featuresLoading,\n resolvedFeatures,\n resolvedFeaturesResponse,\n featureDefinitions,\n unavailabilityPolicy,\n permissions,\n appScope?.currentOrganizationId,\n billing?.isEnabled,\n ]);\n\n const [isEnabled, setIsEnabled] = useState<boolean>(() => !operationNeedsDeferredGate(operation));\n const [isLoading, setIsLoading] = useState<boolean>(() => operationNeedsDeferredGate(operation));\n const [error, setError] = useState<Error | null>(null);\n\n useEffect(() => {\n // Skip evaluation if disabled or no operation\n if (!enabled || !operation) {\n setIsEnabled(true);\n setIsLoading(false);\n return;\n }\n\n // ── Feature check first (fast, synchronous) ──\n if (featureAvailability && !featureAvailability.isAvailable) {\n setIsEnabled(false);\n setIsLoading(false);\n return;\n }\n\n // Check if operation has enabledCondition\n if (!('enabledCondition' in operation) || !operation.enabledCondition) {\n // No enabledCondition means always enabled\n setIsEnabled(true);\n setIsLoading(false);\n return;\n }\n\n // If needsUserContext but no user, operation is disabled\n if (contextNeeds.needsUserContext && !user) {\n setIsEnabled(false);\n setIsLoading(false);\n return;\n }\n\n // Evaluate enabledCondition\n setIsLoading(true);\n setError(null);\n\n evaluateEnabledCondition({\n operation,\n currentObject,\n inputDto,\n userContext: user || undefined,\n initiatorIds,\n objectContext: providedObjectContext,\n resourcesRegistry,\n resourceType,\n doOperation,\n })\n .then((enabled) => {\n setIsEnabled(enabled);\n setIsLoading(false);\n })\n .catch((err) => {\n setError(err instanceof Error ? err : new Error('Unknown error'));\n setIsEnabled(false); // Default to disabled on error for safety\n setIsLoading(false);\n });\n }, [\n enabled,\n operation,\n currentObject,\n inputDto,\n providedObjectContext,\n user,\n initiatorIds,\n resourcesRegistry,\n resourceType,\n contextNeeds.needsUserContext,\n doOperation,\n featureAvailability,\n ]);\n\n return {\n isEnabled,\n isLoading,\n error,\n contextNeeds,\n featureAvailability,\n };\n}\n\n/**\n * Hook to check if multiple operations are enabled.\n * Useful for filtering operation lists.\n * \n * Evaluation order per operation:\n * 1. Feature check (fast, synchronous from context) — if failed, isEnabled=false with featureAvailability\n * 2. enabledCondition (may be async) — if failed, isEnabled=false, featureAvailability=undefined (not a feature issue)\n * \n * @param operations - Array of operations to check\n * @param currentObject - Current object (optional)\n * @param resourceType - Resource type\n * @returns Map of operation-path keys to { isEnabled, featureAvailability? }\n */\n/** Shallow value-equality for a single feature-availability descriptor. */\nfunction featureAvailabilityEqual(\n a: FeatureAvailability | undefined,\n b: FeatureAvailability | undefined,\n): boolean {\n if (a === b) return true;\n if (!a || !b) return false;\n const ka = Object.keys(a) as (keyof FeatureAvailability)[];\n const kb = Object.keys(b);\n if (ka.length !== kb.length) return false;\n for (const k of ka) {\n if (a[k] !== b[k]) return false;\n }\n return true;\n}\n\n/**\n * Value-equality for the operations-enabled map. The async evaluation rebuilds a\n * fresh `Map` on every run, and its effect re-fires whenever any input identity\n * churns (e.g. a recomputed `operations`/`filteredOps` array). Without this guard\n * `setEnabledMap(freshMap)` re-renders on every commit even when nothing changed —\n * the recomputed map feeds the action-bar `items` memo, which re-renders the row\n * operations (and their Radix tooltips/menus) in a tight loop that pegs the CPU.\n * Comparing by value lets `setEnabledMap` bail when the enabled-states are\n * unchanged, breaking the loop while still propagating any real change.\n */\nfunction operationsEnabledMapsEqual(\n a: Map<string, OperationEnabledEntry>,\n b: Map<string, OperationEnabledEntry>,\n): boolean {\n if (a === b) return true;\n if (a.size !== b.size) return false;\n for (const [key, av] of a) {\n const bv = b.get(key);\n if (!bv) return false;\n if (av.isEnabled !== bv.isEnabled) return false;\n if ((av.ineligibleSelectionIndices ?? []).join(',') !== (bv.ineligibleSelectionIndices ?? []).join(',')) return false;\n if (!featureAvailabilityEqual(av.featureAvailability, bv.featureAvailability)) return false;\n }\n return true;\n}\n\nexport function useOperationsEnabled<TMainSchema = any>(\n operations: FrontendResourceConfiguration_Operation<any, any, any>[],\n params: UseOperationsEnabledParams<TMainSchema> = {},\n): Map<string, OperationEnabledEntry> {\n const {\n currentObject,\n inputDto,\n objectContext: providedObjectContext,\n resourceType,\n enabled = true,\n selectionObjects,\n organizationId: addressedOrganizationId,\n subjectDataMode,\n } = params;\n const { getResourcesRegistry, doOperation } = useResourceRegistry();\n const { user, permissions } = useUserOrgs();\n const appScope = useAppScopeSafe();\n const billing = useBillingSafe();\n const resourcesRegistry = getResourcesRegistry();\n const {\n resolvedFeatures,\n resolvedFeaturesResponse,\n featureDefinitions,\n unavailabilityPolicy,\n isLoading: featuresLoading,\n } = useFeatures();\n\n const initiatorIds = useStableInitiatorIds(\n user?._id,\n addressedOrganizationId ?? appScope?.primaryScopeValues?.organizationId,\n appScope?.primaryScopeValues?.applicationId,\n );\n\n const [enabledMap, setEnabledMap] = useState<Map<string, OperationEnabledEntry>>(new Map());\n\n useEffect(() => {\n if (!enabled) {\n const bypassMap = new Map<string, OperationEnabledEntry>();\n operations.forEach((operation) => {\n bypassMap.set(buildOperationEnabledKey(operation), { isEnabled: true });\n });\n setEnabledMap((prev) => (operationsEnabledMapsEqual(prev, bypassMap) ? prev : bypassMap));\n return;\n }\n\n if (!operations.length || !resourceType) {\n setEnabledMap((prev) => (prev.size === 0 ? prev : new Map()));\n return;\n }\n\n let cancelled = false;\n\n const userRoles = buildFeaturePolicyRoles(\n permissions,\n appScope?.currentOrganizationId ?? null,\n );\n\n const featureCtx = {\n resolvedFeatures,\n resolvedFeaturesResponse,\n featureDefinitions,\n unavailabilityPolicy,\n userRoles,\n billingEnabled: billing?.isEnabled ?? false,\n };\n\n const evaluateAll = async () => {\n const results = new Map<string, OperationEnabledEntry>();\n\n await Promise.all(\n operations.map(async (operation) => {\n const operationKey = buildOperationEnabledKey(operation);\n\n const featureAvailability = featuresLoading\n ? (requiresFeaturesBeforeSubmission(operation) ? { isAvailable: false as const, behavior: FeatureUnavailabilityBehavior.DISABLE } : undefined)\n : resolveOperationFeatureAvailability(operation, featureCtx);\n\n if (featureAvailability && !featureAvailability.isAvailable) {\n results.set(operationKey, { isEnabled: false, featureAvailability });\n return;\n }\n\n if (!('enabledCondition' in operation) || !operation.enabledCondition) {\n results.set(operationKey, { isEnabled: true, featureAvailability });\n return;\n }\n\n const needs = getOperationContextNeeds(operation);\n if (needs.needsUserContext && !user) {\n results.set(operationKey, { isEnabled: false, featureAvailability });\n return;\n }\n\n try {\n const evaluateFor = (subject: TMainSchema | undefined) => evaluateEnabledCondition({\n operation,\n currentObject: subject,\n inputDto,\n userContext: user || undefined,\n initiatorIds,\n objectContext: providedObjectContext,\n resourcesRegistry,\n resourceType,\n doOperation,\n ...(subjectDataMode ? { subjectDataMode } : {}),\n });\n if (operation.isBulkOperation === true && selectionObjects && selectionObjects.length > 0) {\n const perRow = await Promise.all(selectionObjects.map((row) => evaluateFor(row)));\n const ineligible = perRow.flatMap((passes, index) => (passes ? [] : [index]));\n results.set(operationKey, {\n // INLINE: one atomic write, so every selected row must be allowed — the backend's rule. A\n // BACKGROUND run applies to the eligible rows and reports each refused one in its summary,\n // so it is offered while at least one row passes; the bar still says how many will be refused\n // (`ineligibleSelectionIndices`). Disabling it on any refusal hid the very behaviour the\n // background lane exists for (#2062 review M2).\n isEnabled: bulkOperationRunsInBackground(operation as { serviceRuntimeMode?: ResourceOperation_ServiceRuntimeMode })\n ? ineligible.length < perRow.length\n : ineligible.length === 0,\n featureAvailability,\n ...(ineligible.length > 0 ? { ineligibleSelectionIndices: ineligible } : {}),\n });\n } else {\n results.set(operationKey, { isEnabled: await evaluateFor(currentObject), featureAvailability });\n }\n } catch (error) {\n results.set(operationKey, { isEnabled: false, featureAvailability });\n }\n })\n );\n\n if (!cancelled) {\n setEnabledMap((prev) => (operationsEnabledMapsEqual(prev, results) ? prev : results));\n }\n };\n\n evaluateAll();\n\n return () => { cancelled = true; };\n }, [\n enabled,\n operations,\n currentObject,\n selectionObjects,\n subjectDataMode,\n inputDto,\n providedObjectContext,\n user,\n initiatorIds,\n permissions,\n appScope?.currentOrganizationId,\n resourcesRegistry,\n resourceType,\n doOperation,\n resolvedFeatures,\n resolvedFeaturesResponse,\n featureDefinitions,\n unavailabilityPolicy,\n featuresLoading,\n billing?.isEnabled,\n ]);\n\n return enabledMap;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"useOperationEnabled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BAC7E,CAAC,CAAC;oBACL,CAAC;yBAAM,CAAC;wBACN,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC,aAAa,CAAC,EAAE,mBAAmB,EAAE,CAAC,CAAC;oBAClG,CAAC;gBACH,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC,CAAC;gBACvE,CAAC;YACH,CAAC,CAAC,CACH,CAAC;YAEF,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,aAAa,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,0BAA0B,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACxF,CAAC;QACH,CAAC,CAAC;QAEF,WAAW,EAAE,CAAC;QAEd,OAAO,GAAG,EAAE,GAAG,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC,EAAE;QACD,OAAO;QACP,UAAU;QACV,aAAa;QACb,gBAAgB;QAChB,eAAe;QACf,QAAQ;QACR,qBAAqB;QACrB,IAAI;QACJ,YAAY;QACZ,WAAW;QACX,QAAQ,EAAE,qBAAqB;QAC/B,iBAAiB;QACjB,YAAY;QACZ,WAAW;QACX,gBAAgB;QAChB,wBAAwB;QACxB,kBAAkB;QAClB,oBAAoB;QACpB,eAAe;QACf,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,WAAW;QACpB,SAAS;KACV,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["/**\n * React hook for checking if an operation is enabled.\n * \n * This hook evaluates the enabledCondition for an operation based on:\n * - Current object (for READ/UPDATE/DELETE)\n * - Input DTO (for CREATE)\n * - User context (from UserOrgsContext)\n * - Object context (fetched if needed)\n * \n * Usage:\n * ```tsx\n * const { isEnabled, isLoading } = useOperationEnabled({\n * operation: myOperation,\n * currentObject: myObject,\n * resourceType: 'TODOS'\n * });\n * ```\n */\n\nimport { useContext, useMemo } from 'react';\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\nimport { useUserOrgs } from '~wildo-frontend-lib/core/security/useUserOrgs';\nimport {\n evaluateEnabledCondition,\n type EvaluateEnabledConditionParams,\n getOperationContextNeeds,\n} from '~wildo-frontend-lib/core/resources/utils/operation-enabled-condition.frontend.utils';\nimport type { FrontendResourceConfiguration_Operation } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport {\n type ResourceType,\n type ExecutionContext_InitiatorIds,\n type DataMode,\n type AppConfiguration_Shared,\n FeatureUnavailabilityBehavior,\n ResourcesConfig_OperationPathUtils, bulkOperationRunsInBackground, ResourceOperation_ServiceRuntimeMode,\n requiredRequestFieldWithheldForRow } from '@wildo-ai/saas-models';\nimport { ApplicationContext } from '~wildo-frontend-lib/core/runtime/ApplicationContext.shared';\nimport { useState, useEffect } from 'react';\nimport { useFeatures } from '~wildo-frontend-lib/core/features/useFeatures';\nimport {\n resolveOperationFeatureAvailability,\n type FeatureAvailability,\n} from '~wildo-frontend-lib/core/features/useOperationFeatureAvailability';\nimport { useAppScopeSafe } from '~wildo-frontend-lib/core/scope/useAppScope';\nimport { useBillingSafe } from '~wildo-frontend-lib/core/billing/useBilling';\nimport { buildFeaturePolicyRoles } from '~wildo-frontend-lib/core/features/feature-unavailability.frontend.utils';\n\nexport type { FeatureAvailability };\n\nexport interface UseOperationEnabledParams<TMainSchema = any> {\n /** The operation to evaluate */\n operation: FrontendResourceConfiguration_Operation<any, any, any>;\n /** Current object (for READ/UPDATE/DELETE operations) */\n currentObject?: TMainSchema;\n /** Input DTO (for CREATE operations) */\n inputDto?: Partial<TMainSchema>;\n /** Object context (parent/child relationships) - optional, will be fetched if needed */\n objectContext?: any;\n /** Resource type */\n resourceType: ResourceType;\n /** Whether to enable evaluation (default: true) */\n enabled?: boolean;\n}\n\nexport interface UseOperationEnabledResult {\n /** Whether the operation is enabled */\n isEnabled: boolean;\n /** Whether evaluation is in progress */\n isLoading: boolean;\n /** Error if evaluation failed */\n error: Error | null;\n /** Context needs for the operation */\n contextNeeds: {\n needsObjectContext: boolean;\n needsUserContext: boolean;\n };\n /** Feature availability information (undefined if no requiredFeatures on operation) */\n featureAvailability?: FeatureAvailability;\n}\n\n/** Result type for the batch useOperationsEnabled hook */\nexport interface OperationEnabledEntry {\n isEnabled: boolean;\n featureAvailability?: FeatureAvailability;\n /**\n * For a BULK operation judged row by row (`selectionObjects`): the indices, in `selectionObjects`,\n * of the rows that FAIL its condition. Present only when some do. It is what lets the bar say\n * \"2 of 5 selected can't…\" and offer to keep only the eligible rows, instead of a bare greyed button.\n */\n ineligibleSelectionIndices?: readonly number[];\n}\n\nexport interface UseOperationsEnabledParams<TMainSchema = any> {\n currentObject?: TMainSchema;\n inputDto?: Partial<TMainSchema>;\n objectContext?: EvaluateEnabledConditionParams<TMainSchema>['objectContext'];\n resourceType?: ResourceType;\n enabled?: boolean;\n /**\n * The rows a BULK operation would act on. A bulk twin inherits its single-row variant's\n * `enabledCondition`, which reads `currentObject` — so it is judged against EACH selected row.\n * An INLINE twin is enabled only when every row passes. That is the backend's rule\n * (`ServicesRegistryHandlerBackendService`, the multi-row branch of the enabled-state gate): the\n * write is one write over the whole selection, so offering it on \"most rows qualify\" would only\n * trade a disabled button for a refusal after the click. A BACKGROUND twin is enabled while at least\n * one row passes: its run changes the eligible rows and reports each refused one.\n *\n * Ignored for a non-bulk operation, which keeps `currentObject`. When absent, a bulk operation is\n * judged against `currentObject` as before.\n */\n selectionObjects?: readonly TMainSchema[];\n /**\n * The data mode `currentObject` and `selectionObjects` were fetched in, when the caller knows it: a collection list\n * passes its LIST data mode (`SUMMARY` by default). Forwarded to `evaluateEnabledCondition`, where a development build\n * names a condition that reads a field a SUMMARY row cannot carry (#2467).\n */\n subjectDataMode?: DataMode;\n /**\n * The organization the evaluated operations' requests will name, when the caller knows it — an\n * action surface reads it from its own route context. It becomes `initiatorIds.organizationId`, the\n * value the backend's evaluation of the same condition sees. When absent, the ambient selection\n * (`appScope.primaryScopeValues.organizationId`) is used, as before (#1461).\n */\n organizationId?: string;\n}\n\nexport function buildOperationEnabledKey(\n operation: FrontendResourceConfiguration_Operation<any, any, any>,\n): string {\n return ResourcesConfig_OperationPathUtils.createOperationPathKeyFromOperation(operation as any);\n}\n\n/**\n * Whether the operation requires a feature before anything is submitted: a requirement that is not conditional on\n * the request body. While the resolved features load, such an operation is held disabled; one whose requirement\n * carries `appliesWhen` is not, because only the submitted body can decide it.\n */\nfunction requiresFeaturesBeforeSubmission(\n operation: FrontendResourceConfiguration_Operation<any, any, any> | null | undefined,\n): boolean {\n const required = operation?.requiredFeatures;\n if (!required) return false;\n return Array.isArray(required) || !required.appliesWhen;\n}\n\n/**\n * Whether the operation's request cannot be filled for this row (#4059): a field its request DTO requires is one its\n * `requestFieldOffers` leave out for the row, so every submission would be refused. Such an operation is unavailable,\n * exactly as if its `enabledCondition` had answered false, so a `WHEN_AVAILABLE` action is hidden rather than opening a\n * form that can only fail. See `requiredRequestFieldWithheldForRow`, which owns the rule.\n *\n * Judged only for a single-row operation with its row loaded: a bulk operation has no one row to judge it against, and\n * while the row loads nothing is known, so both stay available and the form (or the backend) decides.\n */\nfunction requestUnfillableForRow(\n operation: FrontendResourceConfiguration_Operation<any, any, any>,\n currentObject: unknown,\n appConfig: Partial<AppConfiguration_Shared> | undefined,\n): boolean {\n if (operation.isBulkOperation === true || !currentObject || typeof currentObject !== 'object') return false;\n return requiredRequestFieldWithheldForRow(operation as never, {\n appConfig,\n currentObject: currentObject as Record<string, unknown>,\n }) !== undefined;\n}\n\nfunction operationNeedsDeferredGate(\n operation: FrontendResourceConfiguration_Operation<any, any, any>,\n): boolean {\n // An operation with request-field offers may be unavailable for the row too (#4059), so it is held until judged.\n return Boolean(operation.enabledCondition || operation.requiredFeatures || operation.requestFieldOffers);\n}\n\n/**\n * Derives a value-stable {@link ExecutionContext_InitiatorIds} from the\n * individual initiator primitives.\n *\n * Both enabled-condition hooks below feed `initiatorIds` into an effect's\n * dependency array. Building it directly from the `user` object and the\n * `appScope.primaryScopeValues` object made its identity churn whenever EITHER\n * source object's reference changed — most notably an access-token refresh,\n * which rebuilds `primaryScopeValues` (the access token is one of its `useMemo`\n * dependencies) even when the decoded user / organization / application ids are\n * unchanged. That needlessly re-fired the (async) evaluation effect. Keying the\n * memo on the three extracted primitives keeps the returned object\n * referentially stable until an id genuinely changes.\n */\nfunction useStableInitiatorIds(\n userId: string | null | undefined,\n organizationId: string | null | undefined,\n applicationId: string | null | undefined,\n): ExecutionContext_InitiatorIds | undefined {\n return useMemo((): ExecutionContext_InitiatorIds | undefined => {\n const ids: ExecutionContext_InitiatorIds = {};\n if (userId) ids.userId = userId;\n if (organizationId) ids.organizationId = organizationId;\n if (applicationId) ids.applicationId = applicationId;\n return Object.keys(ids).length > 0 ? ids : undefined;\n }, [userId, organizationId, applicationId]);\n}\n\n/**\n * Hook to check if an operation is enabled based on enabledCondition.\n * \n * Automatically handles:\n * - Context needs extraction\n * - User context from UserOrgsContext\n * - Object context fetching (if needed)\n * - Caching based on operation, object, and user\n */\nexport function useOperationEnabled<TMainSchema = any>(\n params: UseOperationEnabledParams<TMainSchema>\n): UseOperationEnabledResult {\n const {\n operation,\n currentObject,\n inputDto,\n objectContext: providedObjectContext,\n resourceType,\n enabled = true,\n } = params;\n\n const { getResourcesRegistry, doOperation } = useResourceRegistry();\n const { user, permissions } = useUserOrgs();\n const appScope = useAppScopeSafe();\n // The application's shared configuration, which a request-field offer decides from (#4059). Absent outside an\n // application, where every offer narrows nothing.\n const appConfig = useContext(ApplicationContext)?.appConfig as Partial<AppConfiguration_Shared> | undefined;\n const billing = useBillingSafe();\n const resourcesRegistry = getResourcesRegistry();\n const {\n resolvedFeatures,\n resolvedFeaturesResponse,\n featureDefinitions,\n unavailabilityPolicy,\n isLoading: featuresLoading,\n } = useFeatures();\n\n // Extract context needs (static, doesn't need to be in effect)\n const contextNeeds = useMemo(\n () => getOperationContextNeeds(operation),\n [operation]\n );\n\n const initiatorIds = useStableInitiatorIds(\n user?._id,\n appScope?.primaryScopeValues?.organizationId,\n appScope?.primaryScopeValues?.applicationId,\n );\n\n // ── Feature availability check (synchronous, from context) ──\n const featureAvailability = useMemo((): FeatureAvailability | undefined => {\n if (featuresLoading) {\n return requiresFeaturesBeforeSubmission(operation)\n ? { isAvailable: false, behavior: FeatureUnavailabilityBehavior.DISABLE }\n : undefined;\n }\n const userRoles = buildFeaturePolicyRoles(\n permissions,\n appScope?.currentOrganizationId ?? null,\n );\n\n return resolveOperationFeatureAvailability(operation, {\n resolvedFeatures,\n resolvedFeaturesResponse,\n featureDefinitions,\n unavailabilityPolicy,\n userRoles,\n billingEnabled: billing?.isEnabled ?? false,\n mayPurchase: billing?.mayPurchase ?? false,\n });\n }, [\n operation,\n featuresLoading,\n resolvedFeatures,\n resolvedFeaturesResponse,\n featureDefinitions,\n unavailabilityPolicy,\n permissions,\n appScope?.currentOrganizationId,\n billing?.isEnabled,\n billing?.mayPurchase,\n ]);\n\n const [isEnabled, setIsEnabled] = useState<boolean>(() => !operationNeedsDeferredGate(operation));\n const [isLoading, setIsLoading] = useState<boolean>(() => operationNeedsDeferredGate(operation));\n const [error, setError] = useState<Error | null>(null);\n\n useEffect(() => {\n // Skip evaluation if disabled or no operation\n if (!enabled || !operation) {\n setIsEnabled(true);\n setIsLoading(false);\n return;\n }\n\n // ── Feature check first (fast, synchronous) ──\n if (featureAvailability && !featureAvailability.isAvailable) {\n setIsEnabled(false);\n setIsLoading(false);\n return;\n }\n\n // A request whose required field cannot be offered for this row can only be refused (#4059).\n if (requestUnfillableForRow(operation, currentObject, appConfig)) {\n setIsEnabled(false);\n setIsLoading(false);\n return;\n }\n\n // Check if operation has enabledCondition\n if (!('enabledCondition' in operation) || !operation.enabledCondition) {\n // No enabledCondition means always enabled\n setIsEnabled(true);\n setIsLoading(false);\n return;\n }\n\n // If needsUserContext but no user, operation is disabled\n if (contextNeeds.needsUserContext && !user) {\n setIsEnabled(false);\n setIsLoading(false);\n return;\n }\n\n // Evaluate enabledCondition\n setIsLoading(true);\n setError(null);\n\n evaluateEnabledCondition({\n operation,\n currentObject,\n inputDto,\n userContext: user || undefined,\n initiatorIds,\n objectContext: providedObjectContext,\n resourcesRegistry,\n resourceType,\n doOperation,\n })\n .then((enabled) => {\n setIsEnabled(enabled);\n setIsLoading(false);\n })\n .catch((err) => {\n setError(err instanceof Error ? err : new Error('Unknown error'));\n setIsEnabled(false); // Default to disabled on error for safety\n setIsLoading(false);\n });\n }, [\n enabled,\n operation,\n currentObject,\n inputDto,\n providedObjectContext,\n user,\n initiatorIds,\n resourcesRegistry,\n resourceType,\n contextNeeds.needsUserContext,\n doOperation,\n featureAvailability,\n appConfig,\n ]);\n\n return {\n isEnabled,\n isLoading,\n error,\n contextNeeds,\n featureAvailability,\n };\n}\n\n/**\n * Hook to check if multiple operations are enabled.\n * Useful for filtering operation lists.\n * \n * Evaluation order per operation:\n * 1. Feature check (fast, synchronous from context) — if failed, isEnabled=false with featureAvailability\n * 2. enabledCondition (may be async) — if failed, isEnabled=false, featureAvailability=undefined (not a feature issue)\n * \n * @param operations - Array of operations to check\n * @param currentObject - Current object (optional)\n * @param resourceType - Resource type\n * @returns Map of operation-path keys to { isEnabled, featureAvailability? }\n */\n/** Shallow value-equality for a single feature-availability descriptor. */\nfunction featureAvailabilityEqual(\n a: FeatureAvailability | undefined,\n b: FeatureAvailability | undefined,\n): boolean {\n if (a === b) return true;\n if (!a || !b) return false;\n const ka = Object.keys(a) as (keyof FeatureAvailability)[];\n const kb = Object.keys(b);\n if (ka.length !== kb.length) return false;\n for (const k of ka) {\n if (a[k] !== b[k]) return false;\n }\n return true;\n}\n\n/**\n * Value-equality for the operations-enabled map. The async evaluation rebuilds a\n * fresh `Map` on every run, and its effect re-fires whenever any input identity\n * churns (e.g. a recomputed `operations`/`filteredOps` array). Without this guard\n * `setEnabledMap(freshMap)` re-renders on every commit even when nothing changed —\n * the recomputed map feeds the action-bar `items` memo, which re-renders the row\n * operations (and their Radix tooltips/menus) in a tight loop that pegs the CPU.\n * Comparing by value lets `setEnabledMap` bail when the enabled-states are\n * unchanged, breaking the loop while still propagating any real change.\n */\nfunction operationsEnabledMapsEqual(\n a: Map<string, OperationEnabledEntry>,\n b: Map<string, OperationEnabledEntry>,\n): boolean {\n if (a === b) return true;\n if (a.size !== b.size) return false;\n for (const [key, av] of a) {\n const bv = b.get(key);\n if (!bv) return false;\n if (av.isEnabled !== bv.isEnabled) return false;\n if ((av.ineligibleSelectionIndices ?? []).join(',') !== (bv.ineligibleSelectionIndices ?? []).join(',')) return false;\n if (!featureAvailabilityEqual(av.featureAvailability, bv.featureAvailability)) return false;\n }\n return true;\n}\n\nexport function useOperationsEnabled<TMainSchema = any>(\n operations: FrontendResourceConfiguration_Operation<any, any, any>[],\n params: UseOperationsEnabledParams<TMainSchema> = {},\n): Map<string, OperationEnabledEntry> {\n const {\n currentObject,\n inputDto,\n objectContext: providedObjectContext,\n resourceType,\n enabled = true,\n selectionObjects,\n organizationId: addressedOrganizationId,\n subjectDataMode,\n } = params;\n const { getResourcesRegistry, doOperation } = useResourceRegistry();\n const { user, permissions } = useUserOrgs();\n const appScope = useAppScopeSafe();\n // The application's shared configuration, which a request-field offer decides from (#4059). Absent outside an\n // application, where every offer narrows nothing.\n const appConfig = useContext(ApplicationContext)?.appConfig as Partial<AppConfiguration_Shared> | undefined;\n const billing = useBillingSafe();\n const resourcesRegistry = getResourcesRegistry();\n const {\n resolvedFeatures,\n resolvedFeaturesResponse,\n featureDefinitions,\n unavailabilityPolicy,\n isLoading: featuresLoading,\n } = useFeatures();\n\n const initiatorIds = useStableInitiatorIds(\n user?._id,\n addressedOrganizationId ?? appScope?.primaryScopeValues?.organizationId,\n appScope?.primaryScopeValues?.applicationId,\n );\n\n const [enabledMap, setEnabledMap] = useState<Map<string, OperationEnabledEntry>>(new Map());\n\n useEffect(() => {\n if (!enabled) {\n const bypassMap = new Map<string, OperationEnabledEntry>();\n operations.forEach((operation) => {\n bypassMap.set(buildOperationEnabledKey(operation), { isEnabled: true });\n });\n setEnabledMap((prev) => (operationsEnabledMapsEqual(prev, bypassMap) ? prev : bypassMap));\n return;\n }\n\n if (!operations.length || !resourceType) {\n setEnabledMap((prev) => (prev.size === 0 ? prev : new Map()));\n return;\n }\n\n let cancelled = false;\n\n const userRoles = buildFeaturePolicyRoles(\n permissions,\n appScope?.currentOrganizationId ?? null,\n );\n\n const featureCtx = {\n resolvedFeatures,\n resolvedFeaturesResponse,\n featureDefinitions,\n unavailabilityPolicy,\n userRoles,\n billingEnabled: billing?.isEnabled ?? false,\n mayPurchase: billing?.mayPurchase ?? false,\n };\n\n const evaluateAll = async () => {\n const results = new Map<string, OperationEnabledEntry>();\n\n await Promise.all(\n operations.map(async (operation) => {\n const operationKey = buildOperationEnabledKey(operation);\n\n const featureAvailability = featuresLoading\n ? (requiresFeaturesBeforeSubmission(operation) ? { isAvailable: false as const, behavior: FeatureUnavailabilityBehavior.DISABLE } : undefined)\n : resolveOperationFeatureAvailability(operation, featureCtx);\n\n if (featureAvailability && !featureAvailability.isAvailable) {\n results.set(operationKey, { isEnabled: false, featureAvailability });\n return;\n }\n\n // A request whose required field cannot be offered for this row can only be refused (#4059).\n if (requestUnfillableForRow(operation, currentObject, appConfig)) {\n results.set(operationKey, { isEnabled: false, featureAvailability });\n return;\n }\n\n if (!('enabledCondition' in operation) || !operation.enabledCondition) {\n results.set(operationKey, { isEnabled: true, featureAvailability });\n return;\n }\n\n const needs = getOperationContextNeeds(operation);\n if (needs.needsUserContext && !user) {\n results.set(operationKey, { isEnabled: false, featureAvailability });\n return;\n }\n\n try {\n const evaluateFor = (subject: TMainSchema | undefined) => evaluateEnabledCondition({\n operation,\n currentObject: subject,\n inputDto,\n userContext: user || undefined,\n initiatorIds,\n objectContext: providedObjectContext,\n resourcesRegistry,\n resourceType,\n doOperation,\n ...(subjectDataMode ? { subjectDataMode } : {}),\n });\n if (operation.isBulkOperation === true && selectionObjects && selectionObjects.length > 0) {\n const perRow = await Promise.all(selectionObjects.map((row) => evaluateFor(row)));\n const ineligible = perRow.flatMap((passes, index) => (passes ? [] : [index]));\n results.set(operationKey, {\n // INLINE: one atomic write, so every selected row must be allowed — the backend's rule. A\n // BACKGROUND run applies to the eligible rows and reports each refused one in its summary,\n // so it is offered while at least one row passes; the bar still says how many will be refused\n // (`ineligibleSelectionIndices`). Disabling it on any refusal hid the very behaviour the\n // background lane exists for (#2062 review M2).\n isEnabled: bulkOperationRunsInBackground(operation as { serviceRuntimeMode?: ResourceOperation_ServiceRuntimeMode })\n ? ineligible.length < perRow.length\n : ineligible.length === 0,\n featureAvailability,\n ...(ineligible.length > 0 ? { ineligibleSelectionIndices: ineligible } : {}),\n });\n } else {\n results.set(operationKey, { isEnabled: await evaluateFor(currentObject), featureAvailability });\n }\n } catch (error) {\n results.set(operationKey, { isEnabled: false, featureAvailability });\n }\n })\n );\n\n if (!cancelled) {\n setEnabledMap((prev) => (operationsEnabledMapsEqual(prev, results) ? prev : results));\n }\n };\n\n evaluateAll();\n\n return () => { cancelled = true; };\n }, [\n enabled,\n operations,\n currentObject,\n selectionObjects,\n subjectDataMode,\n inputDto,\n providedObjectContext,\n user,\n initiatorIds,\n permissions,\n appScope?.currentOrganizationId,\n resourcesRegistry,\n resourceType,\n doOperation,\n resolvedFeatures,\n resolvedFeaturesResponse,\n featureDefinitions,\n unavailabilityPolicy,\n featuresLoading,\n billing?.isEnabled,\n billing?.mayPurchase,\n appConfig,\n ]);\n\n return enabledMap;\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CoreResourceOperation, type ResourceRelationship, type ResourceType } from '@wildo-ai/saas-models';
|
|
2
2
|
import type { FrontendResourceOperationContext } from '../../core/resources/resources.frontend.schemas';
|
|
3
3
|
import type { AnyFrontendResourceConfiguration, FrontendResourceConfiguration_Operation, FrontendResourcesRegistry } from '../../core/resources/resources.frontend.schemas';
|
|
4
|
-
import { type LauncherEffectiveRoles } from '../../core/navigation/
|
|
4
|
+
import { type LauncherEffectiveRoles } from '../../core/navigation/viewer-roles';
|
|
5
5
|
export declare enum FrontendResourceOperationAddressingMode {
|
|
6
6
|
CHILD_ID = "child-id",
|
|
7
7
|
PARENT_CONTEXT_SINGLETON = "parent-context-singleton",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-addressability.frontend.utils.d.ts","sourceRoot":"","sources":["../../../../src/core/resources/resource-addressability.frontend.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EAOrB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,+DAA+D,CAAC;AACtH,OAAO,KAAK,EACV,gCAAgC,EAChC,uCAAuC,EACvC,yBAAyB,EAC1B,MAAM,+DAA+D,CAAC;
|
|
1
|
+
{"version":3,"file":"resource-addressability.frontend.utils.d.ts","sourceRoot":"","sources":["../../../../src/core/resources/resource-addressability.frontend.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EAOrB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,+DAA+D,CAAC;AACtH,OAAO,KAAK,EACV,gCAAgC,EAChC,uCAAuC,EACvC,yBAAyB,EAC1B,MAAM,+DAA+D,CAAC;AAGvE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kDAAkD,CAAC;AAO/F,oBAAY,uCAAuC;IACjD,QAAQ,aAAa;IACrB,wBAAwB,6BAA6B;IACrD,4BAA4B,iCAAiC;CAC9D;AAED,MAAM,WAAW,4CAA4C;IAC3D,IAAI,EAAE,uCAAuC,CAAC,wBAAwB,C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CAA6C,EAAE,eAAe,GAAG,WAAW,GAAG,6BAA6B,CAAC,GAAG;IAC3H;;;OAGG;IACH,MAAM,EAAE,sBAAsB,CAAC;CAChC,GACA,uCAAuC,GAAG,SAAS,CA2BrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-addressability.frontend.utils.js","sourceRoot":"","sources":["../../../../src/core/resources/resource-addressability.frontend.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,6DAA6D,EAC7D,kBAAkB,EAClB,qBAAqB,EAErB,+BAA+B,GAGhC,MAAM,uBAAuB,CAAC;AAO/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,+DAA+D,CAAC;AACvG,OAAO,EAAE,yBAAyB,EAA+B,MAAM,yDAAyD,CAAC;AACjI,OAAO,EACL,4BAA4B,EAC5B,qCAAqC,EACrC,0CAA0C,GAC3C,MAAM,uEAAuE,CAAC;AAE/E,MAAM,CAAN,IAAY,uCAIX;AAJD,WAAY,uCAAuC;IACjD,gEAAqB,CAAA;IACrB,gGAAqD,CAAA;IACrD,wGAA6D,CAAA;AAC/D,CAAC,EAJW,uCAAuC,KAAvC,uCAAuC,QAIlD;AA4ED,MAAM,UAAU,+BAA+B,CAC7C,SAAkD,EAClD,YAAmC,EACnC,cAAiF;IAEjF,MAAM,kBAAkB,GAAG,cAAc,CAAC,uBAAuB,CAAC;IAClE,OAAO,CAAC,SAAS,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,EAAE,CAC7D,CAAC,aAAa,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAClD,SAAS,CAAC,eAAe,KAAK,kBAAkB;WAC7C,SAAS,CAAC,iBAAiB,KAAK,kBAAkB;WAClD,SAAS,CAAC,YAAY,KAAK,YAAY,CAC3C,CACF,CAAC;AACJ,CAAC;AAED,SAAS,uCAAu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AAM,CAAC,MAAM,CAAC,cAAc,EAAE,kBAAkB,IAAI,EAAE,CAAC,CAAC;IAC7E,mHAAmH;IACnH,qHAAqH;IACrH,qHAAqH;IACrH,kHAAkH;IAClH,iEAAiE;IACjE,EAAE;IACF,yHAAyH;IACzH,qHAAqH;IACrH,8GAA8G;IAC9G,MAAM,qBAAqB,GAAG,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,yBAAyB,CAAC;QAClG,YAAY;QACZ,KAAK,EAAE,SAAS,CAAC,KAAK;QACtB,mBAAmB,EAAE,SAAS,CAAC,mBAAmB;QAClD,qBAAqB,EAAE,SAAS,CAAC,qBAAqB;QACtD,uCAAuC,EAAE,SAAS,CAAC,uCAAuC;QAC1F,oBAAoB,EAAE,MAAM,CAAC,cAAc,EAAE,oBAAoB;KAClE,EAAE,MAAM,CAAC,CAAC,CAAC;IACZ,OAAO,mDAAmD,CAAC;QACzD,GAAG,UAAU;QACb,UAAU,EAAE,qBAAqB;QACjC,aAAa,EAAE,qBAAqB,CAAC,MAAM;QAC3C,SAAS,EAAE,KAAK;QAChB,2BAA2B,EAAE,IAAI;KAClC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n CoreResourceOperation,\n CoreResourceType,\n getContextAddressedCompositionSingletonRelationshipCandidates,\n RelationshipNature,\n Resources_SharedUtils,\n type ResourceConfiguration_ResourceRelationships,\n ResourceRelationshipCardinality,\n type ResourceRelationship,\n type ResourceType,\n} from '@wildo-ai/saas-models';\nimport type { FrontendResourceOperationContext } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport type {\n AnyFrontendResourceConfiguration,\n FrontendResourceConfiguration_Operation,\n FrontendResourcesRegistry,\n} from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport { isOperationAddressable } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport { viewerMayPerformOperation, type LauncherEffectiveRoles } from '~wildo-frontend-lib/core/navigation/launcher-resolution';\nimport {\n getOperationsForCoreSemantic,\n pickPreferredOperationForCoreSemantic,\n resolveEffectiveCoreOperationFromOperation,\n} from '~wildo-frontend-lib/core/resources/operation-semantics.frontend.utils';\n\nexport enum FrontendResourceOperationAddressingMode {\n CHILD_ID = 'child-id',\n PARENT_CONTEXT_SINGLETON = 'parent-context-singleton',\n ASSOCIATION_COMPLETE_CONTEXT = 'association-complete-context',\n}\n\nexport interface FrontendParentContextSingletonAddressability {\n mode: FrontendResourceOperationAddressingMode.PARENT_CONTEXT_SINGLETON;\n relationship: ResourceRelationship;\n parentResourceType: ResourceType;\n parentResourceFieldIdentifier?: string;\n foreignKeyField: string;\n isSatisfiedByCurrentContext: boolean;\n}\n\nexport interface FrontendResourceOperationAddressabilityView {\n operation: FrontendResourceConfiguration_Operation;\n supportsChildId: boolean;\n singletonParentContext?: FrontendParentContextSingletonAddressability;\n associationCompleteContext?: FrontendAssociationCompleteContextAddressability;\n}\n\nexport interface FrontendAssociationCompleteContextParent {\n relationship: ResourceRelationship;\n parentResourceType: ResourceType;\n parentResourceFieldIdentifier?: string;\n foreignKeyField: string;\n}\n\nexport interface FrontendAssociationCompleteContextAddressability {\n mode: FrontendResourceOperationAddressingMode.ASSOCIATION_COMPLETE_CONTEXT;\n parents: FrontendAssociationCompleteContextParent[];\n isSatisfiedByCurrentContext: boolean;\n}\n\nexport interface ResolveFrontendResourceOperationAddressabilityParams {\n resourceConfig: AnyFrontendResourceConfiguration;\n operation: FrontendResourceConfiguration_Operation;\n registry: FrontendResourcesRegistry;\n contextResourceIdentifiers?: FrontendResourceOperationContext['contextResourceIdentifiers'];\n contextualParameters?: Record<string, string | number>;\n}\n\nexport interface PickPreferredOperationForAddressabilityParams {\n resourceConfig: AnyFrontendResourceConfiguration | undefined;\n operations: readonly FrontendResourceConfiguration_Operation[];\n coreOperation: CoreResourceOperation;\n registry: FrontendResourcesRegistry;\n hasResourceId?: boolean;\n allowBulk?: boolean;\n requireFrontendAddressable?: boolean;\n /**\n * Require the LITERAL core operation, refusing a custom verb that merely BORROWS its semantic.\n *\n * `getOperationsForCoreSemantic` matches on the EFFECTIVE core operation, so asking for `UPDATE`\n * returns `update` alongside every custom verb that declares `resourceOperationLike: UPDATE` —\n * `claimDomain`, `verifyDomain`, `moveUnit`, `archive`. That is right for a caller asking \"is this\n * record writable at all?\", and wrong for a caller about to DISPATCH a write, because a custom verb\n * is a named action with its OWN request contract. Sending `{ enforceSso: true }` to `claim-domain`\n * is not an update of `enforceSso`; it is a malformed domain claim.\n *\n * The distinction is invisible in the picker's ordinary result because the addressability filter\n * runs BEFORE the preference sort: a route-less literal `update` is removed, and the custom verb\n * that survives is then \"preferred\" by default rather than by choice.\n */\n requireLiteralCoreOperation?: boolean;\n /**\n * Prefer the variant carrying this key, when one survives the other filters.\n *\n * A keyed collection operation is a LANE: `organizations | LIST: directory` lists tenants the\n * caller does not belong to, so opening one of its rows through the DEFAULT READ (a member's read)\n * can only answer 403. The list passes its own `variantKey`, and a same-keyed READ wins. When no\n * same-keyed candidate survives, the ordinary preference applies unchanged, which is what keeps a\n * resource whose lanes share one READ working as before.\n */\n preferredVariantKey?: string;\n contextResourceIdentifiers?: FrontendResourceOperationContext['contextResourceIdentifiers'];\n contextualParameters?: Record<string, string | number>;\n}\n\nexport function operationTargetsCurrentResource(\n operation: FrontendResourceConfiguration_Operation,\n resourceType: ResourceType | string,\n resourceConfig: Pick<AnyFrontendResourceConfiguration, 'resourceFieldIdentifier'>,\n): boolean {\n const ownFieldIdentifier = resourceConfig.resourceFieldIdentifier;\n return (operation.initiatorInfos ?? []).some((initiatorInfo) =>\n (initiatorInfo.parameters ?? []).some((parameter) =>\n parameter.fieldIdentifier === ownFieldIdentifier\n || parameter.relationshipField === ownFieldIdentifier\n || parameter.resourceType === resourceType\n )\n );\n}\n\nfunction normalizeOperationResourceRelationships(\n resourceRelationships: ResourceConfiguration_ResourceRelationships,\n registry: FrontendResourcesRegistry,\n): ResourceConfiguration_ResourceRelationships {\n return (\n Resources_SharedUtils.ensureCompiledRelationshipBuckets as (\n relationships: ResourceConfiguration_ResourceRelationships,\n allResourceFieldIdentifiers?: Record<string, string>\n ) => ResourceConfiguration_ResourceRelationships\n ).call(Resources_SharedUtils, resourceRelationships, registry.allResourceFieldIdentifiers);\n}\n\nexport function shouldRequireCurrentContextAddressabilityForOperation(params: {\n operation: FrontendResourceConfiguration_Operation;\n resourceType: ResourceType | string;\n resourceConfig: Pick<AnyFrontendResourceConfiguration, 'resourceFieldIdentifier'>;\n}): boolean {\n if (params.operation.isBulkOperation === true) {\n return false;\n }\n\n const effectiveCoreOperation = resolveEffectiveCoreOperationFromOperation(params.operation);\n return effectiveCoreOperation === CoreResourceOperation.READ\n || effectiveCoreOperation === CoreResourceOperation.UPDATE\n || effectiveCoreOperation === CoreResourceOperation.DELETE\n || (\n effectiveCoreOperation === undefined\n && operationTargetsCurrentResource(\n params.operation,\n params.resourceType,\n params.resourceConfig,\n )\n );\n}\n\nfunction getContextValueId(value: unknown): string | undefined {\n if (typeof value === 'string' && value.length > 0) {\n return value;\n }\n\n if (value && typeof value === 'object') {\n const resourceId = (value as { resourceId?: unknown }).resourceId;\n if (typeof resourceId === 'string' && resourceId.length > 0) {\n return resourceId;\n }\n }\n\n return undefined;\n}\n\nfunction hasContextValue(params: {\n parentResourceType: ResourceType;\n parentResourceFieldIdentifier?: string;\n foreignKeyField: string;\n contextResourceIdentifiers?: FrontendResourceOperationContext['contextResourceIdentifiers'];\n contextualParameters?: Record<string, string | number>;\n}): boolean {\n const contextIdentifiers = params.contextResourceIdentifiers ?? {};\n if (getContextValueId(contextIdentifiers[params.parentResourceType])) {\n return true;\n }\n if (getContextValueId(contextIdentifiers[params.foreignKeyField])) {\n return true;\n }\n if (params.parentResourceFieldIdentifier && getContextValueId(contextIdentifiers[params.parentResourceFieldIdentifier])) {\n return true;\n }\n\n const contextualParameters = params.contextualParameters ?? {};\n const foreignKeyContextValue = contextualParameters[params.foreignKeyField];\n if (foreignKeyContextValue !== undefined && String(foreignKeyContextValue).length > 0) {\n return true;\n }\n const parentFieldContextValue = params.parentResourceFieldIdentifier\n ? contextualParameters[params.parentResourceFieldIdentifier]\n : undefined;\n if (parentFieldContextValue !== undefined && String(parentFieldContextValue).length > 0) {\n return true;\n }\n\n return false;\n}\n\nfunction hasForeignKeySpecificContextValue(params: {\n foreignKeyField: string;\n contextResourceIdentifiers?: FrontendResourceOperationContext['contextResourceIdentifiers'];\n contextualParameters?: Record<string, string | number>;\n}): boolean {\n const contextIdentifiers = params.contextResourceIdentifiers ?? {};\n if (getContextValueId(contextIdentifiers[params.foreignKeyField])) {\n return true;\n }\n\n const contextValue = params.contextualParameters?.[params.foreignKeyField];\n return contextValue !== undefined && String(contextValue).length > 0;\n}\n\nfunction routeSupportsChildId(\n operation: FrontendResourceConfiguration_Operation,\n resourceFieldIdentifier: string,\n): boolean {\n const initiatorInfos = operation.initiatorInfos ?? [];\n if (initiatorInfos.length === 0) {\n return false;\n }\n\n return initiatorInfos.some((initiatorInfo) =>\n initiatorInfo.parameters?.some((parameter) => parameter.fieldIdentifier === resourceFieldIdentifier)\n );\n}\n\nfunction routeHasSatisfiedChildIdPath(params: {\n operation: FrontendResourceConfiguration_Operation;\n resourceFieldIdentifier: string;\n hasResourceId?: boolean;\n contextResourceIdentifiers?: FrontendResourceOperationContext['contextResourceIdentifiers'];\n contextualParameters?: Record<string, string | number>;\n}): boolean {\n const initiatorInfos = params.operation.initiatorInfos ?? [];\n if (initiatorInfos.length === 0) {\n return false;\n }\n\n return initiatorInfos.some((initiatorInfo) => {\n const parameters = initiatorInfo.parameters ?? [];\n const hasChildId = parameters.some((parameter) => parameter.fieldIdentifier === params.resourceFieldIdentifier);\n if (!hasChildId) {\n return false;\n }\n\n return parameters.every((parameter) => {\n const candidateKeys = [\n parameter.fieldIdentifier,\n parameter.relationshipField,\n parameter.resourceType,\n ].filter((key): key is string => typeof key === 'string' && key.length > 0);\n\n if (candidateKeys.length === 0) {\n return false;\n }\n\n return candidateKeys.some((key) => {\n if (key === params.resourceFieldIdentifier && params.hasResourceId === true) {\n return true;\n }\n\n if (getContextValueId(params.contextResourceIdentifiers?.[key])) {\n return true;\n }\n\n const contextualValue = params.contextualParameters?.[key];\n return contextualValue !== undefined && String(contextualValue).length > 0;\n });\n });\n });\n}\n\nfunction routeSupportsParentContextSingleton(params: {\n operation: FrontendResourceConfiguration_Operation;\n resourceFieldIdentifier: string;\n parentResourceType: ResourceType;\n parentResourceFieldIdentifier?: string;\n foreignKeyField: string;\n}): boolean {\n const initiatorInfos = params.operation.initiatorInfos ?? [];\n return initiatorInfos.some((initiatorInfo) => {\n const parameters = initiatorInfo.parameters ?? [];\n const hasChildId = parameters.some((parameter) => parameter.fieldIdentifier === params.resourceFieldIdentifier);\n if (hasChildId) {\n return false;\n }\n\n return parameters.some((parameter) =>\n parameter.resourceType === params.parentResourceType\n || parameter.fieldIdentifier === params.foreignKeyField\n || parameter.fieldIdentifier === params.parentResourceFieldIdentifier\n || parameter.relationshipField === params.foreignKeyField\n );\n });\n}\n\nfunction routeSupportsAssociationCompleteContext(params: {\n operation: FrontendResourceConfiguration_Operation;\n resourceFieldIdentifier: string;\n parents: FrontendAssociationCompleteContextParent[];\n}): boolean {\n const initiatorInfos = params.operation.initiatorInfos ?? [];\n const duplicatedParentResourceTypes = new Set(\n params.parents\n .map((parent) => parent.parentResourceType)\n .filter((resourceType, _index, resourceTypes) =>\n resourceTypes.filter((candidate) => candidate === resourceType).length > 1\n )\n );\n return initiatorInfos.some((initiatorInfo) => {\n const parameters = initiatorInfo.parameters ?? [];\n const hasChildId = parameters.some((parameter) => parameter.fieldIdentifier === params.resourceFieldIdentifier);\n if (hasChildId) {\n return false;\n }\n\n return params.parents.every((parent) =>\n parameters.some((parameter) => {\n const hasForeignKeySpecificMatch = parameter.fieldIdentifier === parent.foreignKeyField\n || parameter.relationshipField === parent.foreignKeyField;\n if (duplicatedParentResourceTypes.has(parent.parentResourceType)) {\n return hasForeignKeySpecificMatch;\n }\n\n return hasForeignKeySpecificMatch\n || parameter.fieldIdentifier === parent.parentResourceFieldIdentifier\n || parameter.resourceType === parent.parentResourceType;\n })\n );\n });\n}\n\nfunction isDuplicatedParentResourceType(\n parent: FrontendAssociationCompleteContextParent,\n parents: FrontendAssociationCompleteContextParent[],\n): boolean {\n return parents.filter((candidate) => candidate.parentResourceType === parent.parentResourceType).length > 1;\n}\n\nfunction hasAssociationCompleteContextValue(params: {\n parent: FrontendAssociationCompleteContextParent;\n parents: FrontendAssociationCompleteContextParent[];\n contextResourceIdentifiers?: FrontendResourceOperationContext['contextResourceIdentifiers'];\n contextualParameters?: Record<string, string | number>;\n}): boolean {\n if (isDuplicatedParentResourceType(params.parent, params.parents)) {\n return hasForeignKeySpecificContextValue({\n foreignKeyField: params.parent.foreignKeyField,\n contextResourceIdentifiers: params.contextResourceIdentifiers,\n contextualParameters: params.contextualParameters,\n });\n }\n\n return hasContextValue({\n parentResourceType: params.parent.parentResourceType,\n parentResourceFieldIdentifier: params.parent.parentResourceFieldIdentifier,\n foreignKeyField: params.parent.foreignKeyField,\n contextResourceIdentifiers: params.contextResourceIdentifiers,\n contextualParameters: params.contextualParameters,\n });\n}\n\nfunction resolveSingletonParentRelationship(params: {\n operation: FrontendResourceConfiguration_Operation;\n resourceConfig: AnyFrontendResourceConfiguration;\n registry: FrontendResourcesRegistry;\n}): FrontendParentContextSingletonAddressability | undefined {\n // Frontend addressability intentionally requires route/initiator evidence in\n // addition to backend relationship metadata. Backend resolution remains the\n // authorization source of truth; this layer only decides whether a URL surface\n // can be called from the current runtime context.\n const effectiveOperation = resolveEffectiveCoreOperationFromOperation(params.operation);\n if (\n effectiveOperation !== CoreResourceOperation.READ\n &&\n effectiveOperation !== CoreResourceOperation.UPDATE\n && effectiveOperation !== CoreResourceOperation.DELETE\n ) {\n return undefined;\n }\n\n if (params.operation.isBulkOperation === true || !params.operation.resourceRelationships) {\n return undefined;\n }\n\n const operationRelationships = normalizeOperationResourceRelationships(\n params.operation.resourceRelationships,\n params.registry,\n );\n const matches = getContextAddressedCompositionSingletonRelationshipCandidates(operationRelationships)\n .filter((candidate) => {\n const parentResourceFieldIdentifier = params.registry.resourceConfigurations[candidate.parentResourceType]?.resourceFieldIdentifier;\n return routeSupportsParentContextSingleton({\n operation: params.operation,\n resourceFieldIdentifier: params.resourceConfig.resourceFieldIdentifier,\n parentResourceType: candidate.parentResourceType,\n parentResourceFieldIdentifier,\n foreignKeyField: candidate.foreignKeyField,\n });\n });\n\n if (matches.length !== 1) {\n return undefined;\n }\n\n const candidate = matches[0];\n const relationship = candidate.relationship;\n return {\n mode: FrontendResourceOperationAddressingMode.PARENT_CONTEXT_SINGLETON,\n relationship,\n parentResourceType: candidate.parentResourceType,\n parentResourceFieldIdentifier: params.registry.resourceConfigurations[candidate.parentResourceType]?.resourceFieldIdentifier,\n foreignKeyField: candidate.foreignKeyField,\n isSatisfiedByCurrentContext: false,\n };\n}\n\nfunction resolveAssociationCompleteContext(params: {\n operation: FrontendResourceConfiguration_Operation;\n resourceConfig: AnyFrontendResourceConfiguration;\n registry: FrontendResourcesRegistry;\n}): FrontendAssociationCompleteContextAddressability | undefined {\n const effectiveOperation = resolveEffectiveCoreOperationFromOperation(params.operation);\n if (\n effectiveOperation !== CoreResourceOperation.READ\n &&\n effectiveOperation !== CoreResourceOperation.UPDATE\n && effectiveOperation !== CoreResourceOperation.DELETE\n ) {\n return undefined;\n }\n\n if (params.operation.isBulkOperation === true || !params.operation.resourceRelationships) {\n return undefined;\n }\n\n const operationResourceType = params.operation.resourceIdentifier\n ?? (params.resourceConfig as { resourceIdentifier?: ResourceType }).resourceIdentifier;\n if (!operationResourceType) {\n return undefined;\n }\n\n const operationRelationships = normalizeOperationResourceRelationships(\n params.operation.resourceRelationships,\n params.registry,\n );\n const parents = (operationRelationships.parentRelationships ?? [])\n .filter((relationship) =>\n relationship.nature === RelationshipNature.ASSOCIATION\n && relationship.jointResourceType === operationResourceType\n && relationship.resourceType2 === operationResourceType\n && relationship.cardinality1 === ResourceRelationshipCardinality.ONE\n && relationship.cardinality2 === ResourceRelationshipCardinality.MANY\n )\n .map((relationship): FrontendAssociationCompleteContextParent | undefined => {\n const parentResourceFieldIdentifier = params.registry.resourceConfigurations[relationship.resourceType1]?.resourceFieldIdentifier;\n const foreignKeyField = Resources_SharedUtils.tryResolveRelationshipForeignKeyIdentity(\n relationship,\n params.registry.allResourceFieldIdentifiers,\n )?.fieldIdentifier;\n if (!foreignKeyField) {\n return undefined;\n }\n\n const parent: FrontendAssociationCompleteContextParent = {\n relationship,\n parentResourceType: relationship.resourceType1,\n foreignKeyField,\n };\n\n if (parentResourceFieldIdentifier) {\n parent.parentResourceFieldIdentifier = parentResourceFieldIdentifier;\n }\n\n return parent;\n })\n .filter((parent): parent is FrontendAssociationCompleteContextParent => parent !== undefined);\n\n if (parents.length !== 2) {\n return undefined;\n }\n\n if (new Set(parents.map((parent) => parent.foreignKeyField)).size !== parents.length) {\n return undefined;\n }\n\n if (!routeSupportsAssociationCompleteContext({\n operation: params.operation,\n resourceFieldIdentifier: params.resourceConfig.resourceFieldIdentifier,\n parents,\n })) {\n return undefined;\n }\n\n return {\n mode: FrontendResourceOperationAddressingMode.ASSOCIATION_COMPLETE_CONTEXT,\n parents,\n isSatisfiedByCurrentContext: false,\n };\n}\n\nexport function resolveFrontendResourceOperationAddressability(\n params: ResolveFrontendResourceOperationAddressabilityParams,\n): FrontendResourceOperationAddressabilityView {\n const singletonParentContext = resolveSingletonParentRelationship(params);\n const associationCompleteContext = resolveAssociationCompleteContext(params);\n const satisfiedSingletonParentContext = singletonParentContext\n ? {\n ...singletonParentContext,\n isSatisfiedByCurrentContext: hasContextValue({\n parentResourceType: singletonParentContext.parentResourceType,\n parentResourceFieldIdentifier: singletonParentContext.parentResourceFieldIdentifier,\n foreignKeyField: singletonParentContext.foreignKeyField,\n contextResourceIdentifiers: params.contextResourceIdentifiers,\n contextualParameters: params.contextualParameters,\n }),\n }\n : undefined;\n const satisfiedAssociationCompleteContext = associationCompleteContext\n ? {\n ...associationCompleteContext,\n isSatisfiedByCurrentContext: associationCompleteContext.parents.every((parent) =>\n hasAssociationCompleteContextValue({\n parent,\n parents: associationCompleteContext.parents,\n contextResourceIdentifiers: params.contextResourceIdentifiers,\n contextualParameters: params.contextualParameters,\n })\n ),\n }\n : undefined;\n\n return {\n operation: params.operation,\n supportsChildId: routeSupportsChildId(\n params.operation,\n params.resourceConfig.resourceFieldIdentifier,\n ),\n singletonParentContext: satisfiedSingletonParentContext,\n associationCompleteContext: satisfiedAssociationCompleteContext,\n };\n}\n\nexport function isFrontendOperationAddressableForCurrentContext(\n params: ResolveFrontendResourceOperationAddressabilityParams & { hasResourceId?: boolean },\n): boolean {\n const addressability = resolveFrontendResourceOperationAddressability(params);\n return (params.hasResourceId === true && routeHasSatisfiedChildIdPath({\n operation: params.operation,\n resourceFieldIdentifier: params.resourceConfig.resourceFieldIdentifier,\n hasResourceId: params.hasResourceId,\n contextResourceIdentifiers: params.contextResourceIdentifiers,\n contextualParameters: params.contextualParameters,\n }))\n || addressability.singletonParentContext?.isSatisfiedByCurrentContext === true\n || addressability.associationCompleteContext?.isSatisfiedByCurrentContext === true;\n}\n\nexport function pickPreferredOperationForCoreSemanticAddressability(\n params: PickPreferredOperationForAddressabilityParams,\n): FrontendResourceConfiguration_Operation | undefined {\n if (!params.resourceConfig) {\n return undefined;\n }\n\n const semanticMatches = getOperationsForCoreSemantic(\n params.operations,\n params.coreOperation,\n {\n allowBulk: params.allowBulk,\n },\n ).filter((operation) =>\n params.requireFrontendAddressable !== true\n || isOperationAddressable(operation.operationFrontendConfig)\n ).filter((operation) =>\n params.requireLiteralCoreOperation !== true\n || operation.operationIdentifier === params.coreOperation\n );\n const addressableMatches = semanticMatches.filter((operation) =>\n isFrontendOperationAddressableForCurrentContext({\n resourceConfig: params.resourceConfig!,\n operation,\n registry: params.registry,\n hasResourceId: params.hasResourceId,\n contextResourceIdentifiers: params.contextResourceIdentifiers,\n contextualParameters: params.contextualParameters,\n })\n );\n\n if (addressableMatches.length === 0) {\n return undefined;\n }\n\n const sameLaneMatches = params.preferredVariantKey\n ? addressableMatches.filter((operation) => operation.variantKey === params.preferredVariantKey)\n : [];\n\n return pickPreferredOperationForCoreSemantic(sameLaneMatches.length > 0 ? sameLaneMatches : addressableMatches, params.coreOperation, {\n allowBulk: params.allowBulk,\n });\n}\n\n/**\n * The organization a record's write lands in (#2473): the record itself when it IS an organization, otherwise the\n * organization its context names. `undefined` when neither says, which a viewer hook reads as the current\n * organization.\n *\n * The in-place write pick needs it to ask about the viewer's roles in the RIGHT tenant: on the directory page an\n * operator reads a tenant that is not their current organization, and their own organization's roles say nothing\n * about what they may do there.\n */\nexport function resolveRecordOrganizationId(\n resourceType: string | undefined,\n resourceId: string | undefined,\n contextResourceIdentifiers: Record<string, unknown> | undefined,\n): string | undefined {\n if (resourceType === CoreResourceType.ORGANIZATIONS && resourceId) return resourceId;\n const entry = contextResourceIdentifiers?.[CoreResourceType.ORGANIZATIONS];\n const id = typeof entry === 'string' ? entry : (entry as { resourceId?: unknown } | undefined)?.resourceId;\n return typeof id === 'string' && id.length > 0 ? id : undefined;\n}\n\n/**\n * The operation an INLINE FIELD WRITE may dispatch through — the literal `update`, addressable from\n * the current context, or nothing.\n *\n * Every inline-edit seam resolves its target through this one function rather than calling the\n * general picker with its own options, because the two questions differ and got conflated:\n *\n * - *\"can this record be written?\"* admits a custom verb. `pickPreferredOperationForCoreSemanticAddressability`\n * answers that, and should keep answering it.\n * - *\"through what do I send this ONE field?\"* admits only the generic update route. A named verb\n * carries its own request contract, so a field value posted to it is not a partial update of the\n * record — it is a malformed call to something else.\n *\n * What made the conflation invisible: the addressability filter runs before the preference sort, so\n * a resource whose literal `update` is `INTERNAL_CALL` (route-less, every scope-level configuration\n * record in the security lane) had the literal removed and a custom verb promoted silently. SSO\n * config has three — `claimDomain`, `verifyDomain`, `revokeDomain`, each a real PUT — so its settings\n * pane rendered every writable field as a live control bound to domain claiming. SCIM provisioning,\n * whose literal `update` is route-less too and which declares no custom verb, resolved to nothing and\n * stayed read-only. Identical configuration records, opposite behaviour, and the WRONG one looked\n * like the working one.\n *\n * Returning `undefined` renders the fields read-only, which is the honest answer while the literal\n * route does not exist. Giving a configuration record a writable surface is a decision about that\n * record's operations, taken there.\n */\nexport function pickInlineFieldWriteOperation(\n params: Omit<PickPreferredOperationForAddressabilityParams, 'coreOperation' | 'allowBulk' | 'requireLiteralCoreOperation'> & {\n /**\n * The viewer, with their roles IN THE ORGANIZATION the record belongs to (`useViewerEffectiveRolesInOrganization`).\n * Required, so no in-place edit is offered without asking whether this viewer may perform it (#2473).\n */\n viewer: LauncherEffectiveRoles;\n },\n): FrontendResourceConfiguration_Operation | undefined {\n const { viewer, ...pickParams } = params;\n const resourceType = String(params.resourceConfig?.resourceIdentifier ?? '');\n // Only the writes this viewer may perform are candidates: the decision the backend's operation gate makes, through\n // the shell's one role predicate. Without this, a platform operator reading another tenant through the directory was\n // offered `name` in place, the write went to an `ORG_ADMIN`-only UPDATE, the backend refused it, and the refusal was\n // recorded as an attempted cross-tenant crossing. A viewer who may perform none gets read-only fields: the honest\n // answer, exactly as for a record with no literal route (below).\n //\n // A viewer OUTSIDE the record's tenant reaches it only through a variant that declares the crossing, which the predicate\n // decides (`viewerIsKnownOutsideOrganization`, #2600): the organizations resource has an `admin` UPDATE gated on the\n // super-administrator role and deliberately NOT crossed, and the role check alone offered it to the operator.\n const performableOperations = pickParams.operations.filter((operation) => viewerMayPerformOperation({\n resourceType,\n roles: operation.roles,\n operationIdentifier: operation.operationIdentifier,\n resourceOperationLike: operation.resourceOperationLike,\n admitsCrossTenantPlatformAdministration: operation.admitsCrossTenantPlatformAdministration,\n resourcePrimaryScope: params.resourceConfig?.resourcePrimaryScope,\n }, viewer));\n return pickPreferredOperationForCoreSemanticAddressability({\n ...pickParams,\n operations: performableOperations,\n coreOperation: CoreResourceOperation.UPDATE,\n allowBulk: false,\n requireLiteralCoreOperation: true,\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"resource-addressability.frontend.utils.js","sourceRoot":"","sources":["../../../../src/core/resources/resource-addressability.frontend.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,6DAA6D,EAC7D,kBAAkB,EAClB,qBAAqB,EAErB,+BAA+B,GAGhC,MAAM,uBAAuB,CAAC;AAO/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,+DAA+D,CAAC;AACvG,OAAO,EAAE,yBAAyB,EAAE,MAAM,yDAAyD,CAAC;AAEpG,OAAO,EACL,4BAA4B,EAC5B,qCAAqC,EACrC,0CAA0C,GAC3C,MAAM,uEAAuE,CAAC;AAE/E,MAAM,CAAN,IAAY,uCAIX;AAJD,WAAY,uCAAuC;IACjD,gEAAqB,CAAA;IACrB,gGAAqD,CAAA;IACrD,wGAA6D,CAAA;AAC/D,CAAC,EAJW,uCAAuC,KAAvC,uCAAuC,QAIlD;AA4ED,MAAM,UAAU,+BAA+B,CAC7C,SAAkD,EAClD,YAAmC,EACnC,cAAiF;IAEjF,MAAM,kBAAkB,GAAG,cAAc,CAAC,uBAAuB,CAAC;IAClE,OAAO,CAAC,SAAS,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,EAAE,CAC7D,CAAC,aAAa,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAClD,SAAS,CAAC,eAAe,KAAK,kBAAkB;WAC7C,SAAS,CAAC,iBAAiB,KAAK,kBAAkB;WAClD,SAAS,CAAC,YAAY,KAAK,YAAY,CAC3C,CACF,CAAC;AACJ,CAAC;AAED,SAAS,uCAAuC,CAC9C,qBAAkE,EAClE,QAAmC;IAEnC,OACE,qBAAqB,CAAC,iCAIvB,CAAC,IAAI,CAAC,qBAAqB,EAAE,qBAAqB,EAAE,QAAQ,CAAC,2BAA2B,CAAC,CAAC;AAC7F,CAAC;AAED,MAAM,U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qHAAqH;IACrH,8GAA8G;IAC9G,MAAM,qBAAqB,GAAG,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,yBAAyB,CAAC;QAClG,YAAY;QACZ,KAAK,EAAE,SAAS,CAAC,KAAK;QACtB,mBAAmB,EAAE,SAAS,CAAC,mBAAmB;QAClD,qBAAqB,EAAE,SAAS,CAAC,qBAAqB;QACtD,uCAAuC,EAAE,SAAS,CAAC,uCAAuC;QAC1F,oBAAoB,EAAE,MAAM,CAAC,cAAc,EAAE,oBAAoB;KAClE,EAAE,MAAM,CAAC,CAAC,CAAC;IACZ,OAAO,mDAAmD,CAAC;QACzD,GAAG,UAAU;QACb,UAAU,EAAE,qBAAqB;QACjC,aAAa,EAAE,qBAAqB,CAAC,MAAM;QAC3C,SAAS,EAAE,KAAK;QAChB,2BAA2B,EAAE,IAAI;KAClC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n CoreResourceOperation,\n CoreResourceType,\n getContextAddressedCompositionSingletonRelationshipCandidates,\n RelationshipNature,\n Resources_SharedUtils,\n type ResourceConfiguration_ResourceRelationships,\n ResourceRelationshipCardinality,\n type ResourceRelationship,\n type ResourceType,\n} from '@wildo-ai/saas-models';\nimport type { FrontendResourceOperationContext } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport type {\n AnyFrontendResourceConfiguration,\n FrontendResourceConfiguration_Operation,\n FrontendResourcesRegistry,\n} from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport { isOperationAddressable } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport { viewerMayPerformOperation } from '~wildo-frontend-lib/core/navigation/launcher-resolution';\nimport { type LauncherEffectiveRoles } from '~wildo-frontend-lib/core/navigation/viewer-roles';\nimport {\n getOperationsForCoreSemantic,\n pickPreferredOperationForCoreSemantic,\n resolveEffectiveCoreOperationFromOperation,\n} from '~wildo-frontend-lib/core/resources/operation-semantics.frontend.utils';\n\nexport enum FrontendResourceOperationAddressingMode {\n CHILD_ID = 'child-id',\n PARENT_CONTEXT_SINGLETON = 'parent-context-singleton',\n ASSOCIATION_COMPLETE_CONTEXT = 'association-complete-context',\n}\n\nexport interface FrontendParentContextSingletonAddressability {\n mode: FrontendResourceOperationAddressingMode.PARENT_CONTEXT_SINGLETON;\n relationship: ResourceRelationship;\n parentResourceType: ResourceType;\n parentResourceFieldIdentifier?: string;\n foreignKeyField: string;\n isSatisfiedByCurrentContext: boolean;\n}\n\nexport interface FrontendResourceOperationAddressabilityView {\n operation: FrontendResourceConfiguration_Operation;\n supportsChildId: boolean;\n singletonParentContext?: FrontendParentContextSingletonAddressability;\n associationCompleteContext?: FrontendAssociationCompleteContextAddressability;\n}\n\nexport interface FrontendAssociationCompleteContextParent {\n relationship: ResourceRelationship;\n parentResourceType: ResourceType;\n parentResourceFieldIdentifier?: string;\n foreignKeyField: string;\n}\n\nexport interface FrontendAssociationCompleteContextAddressability {\n mode: FrontendResourceOperationAddressingMode.ASSOCIATION_COMPLETE_CONTEXT;\n parents: FrontendAssociationCompleteContextParent[];\n isSatisfiedByCurrentContext: boolean;\n}\n\nexport interface ResolveFrontendResourceOperationAddressabilityParams {\n resourceConfig: AnyFrontendResourceConfiguration;\n operation: FrontendResourceConfiguration_Operation;\n registry: FrontendResourcesRegistry;\n contextResourceIdentifiers?: FrontendResourceOperationContext['contextResourceIdentifiers'];\n contextualParameters?: Record<string, string | number>;\n}\n\nexport interface PickPreferredOperationForAddressabilityParams {\n resourceConfig: AnyFrontendResourceConfiguration | undefined;\n operations: readonly FrontendResourceConfiguration_Operation[];\n coreOperation: CoreResourceOperation;\n registry: FrontendResourcesRegistry;\n hasResourceId?: boolean;\n allowBulk?: boolean;\n requireFrontendAddressable?: boolean;\n /**\n * Require the LITERAL core operation, refusing a custom verb that merely BORROWS its semantic.\n *\n * `getOperationsForCoreSemantic` matches on the EFFECTIVE core operation, so asking for `UPDATE`\n * returns `update` alongside every custom verb that declares `resourceOperationLike: UPDATE` —\n * `claimDomain`, `verifyDomain`, `moveUnit`, `archive`. That is right for a caller asking \"is this\n * record writable at all?\", and wrong for a caller about to DISPATCH a write, because a custom verb\n * is a named action with its OWN request contract. Sending `{ enforceSso: true }` to `claim-domain`\n * is not an update of `enforceSso`; it is a malformed domain claim.\n *\n * The distinction is invisible in the picker's ordinary result because the addressability filter\n * runs BEFORE the preference sort: a route-less literal `update` is removed, and the custom verb\n * that survives is then \"preferred\" by default rather than by choice.\n */\n requireLiteralCoreOperation?: boolean;\n /**\n * Prefer the variant carrying this key, when one survives the other filters.\n *\n * A keyed collection operation is a LANE: `organizations | LIST: directory` lists tenants the\n * caller does not belong to, so opening one of its rows through the DEFAULT READ (a member's read)\n * can only answer 403. The list passes its own `variantKey`, and a same-keyed READ wins. When no\n * same-keyed candidate survives, the ordinary preference applies unchanged, which is what keeps a\n * resource whose lanes share one READ working as before.\n */\n preferredVariantKey?: string;\n contextResourceIdentifiers?: FrontendResourceOperationContext['contextResourceIdentifiers'];\n contextualParameters?: Record<string, string | number>;\n}\n\nexport function operationTargetsCurrentResource(\n operation: FrontendResourceConfiguration_Operation,\n resourceType: ResourceType | string,\n resourceConfig: Pick<AnyFrontendResourceConfiguration, 'resourceFieldIdentifier'>,\n): boolean {\n const ownFieldIdentifier = resourceConfig.resourceFieldIdentifier;\n return (operation.initiatorInfos ?? []).some((initiatorInfo) =>\n (initiatorInfo.parameters ?? []).some((parameter) =>\n parameter.fieldIdentifier === ownFieldIdentifier\n || parameter.relationshipField === ownFieldIdentifier\n || parameter.resourceType === resourceType\n )\n );\n}\n\nfunction normalizeOperationResourceRelationships(\n resourceRelationships: ResourceConfiguration_ResourceRelationships,\n registry: FrontendResourcesRegistry,\n): ResourceConfiguration_ResourceRelationships {\n return (\n Resources_SharedUtils.ensureCompiledRelationshipBuckets as (\n relationships: ResourceConfiguration_ResourceRelationships,\n allResourceFieldIdentifiers?: Record<string, string>\n ) => ResourceConfiguration_ResourceRelationships\n ).call(Resources_SharedUtils, resourceRelationships, registry.allResourceFieldIdentifiers);\n}\n\nexport function shouldRequireCurrentContextAddressabilityForOperation(params: {\n operation: FrontendResourceConfiguration_Operation;\n resourceType: ResourceType | string;\n resourceConfig: Pick<AnyFrontendResourceConfiguration, 'resourceFieldIdentifier'>;\n}): boolean {\n if (params.operation.isBulkOperation === true) {\n return false;\n }\n\n const effectiveCoreOperation = resolveEffectiveCoreOperationFromOperation(params.operation);\n return effectiveCoreOperation === CoreResourceOperation.READ\n || effectiveCoreOperation === CoreResourceOperation.UPDATE\n || effectiveCoreOperation === CoreResourceOperation.DELETE\n || (\n effectiveCoreOperation === undefined\n && operationTargetsCurrentResource(\n params.operation,\n params.resourceType,\n params.resourceConfig,\n )\n );\n}\n\nfunction getContextValueId(value: unknown): string | undefined {\n if (typeof value === 'string' && value.length > 0) {\n return value;\n }\n\n if (value && typeof value === 'object') {\n const resourceId = (value as { resourceId?: unknown }).resourceId;\n if (typeof resourceId === 'string' && resourceId.length > 0) {\n return resourceId;\n }\n }\n\n return undefined;\n}\n\nfunction hasContextValue(params: {\n parentResourceType: ResourceType;\n parentResourceFieldIdentifier?: string;\n foreignKeyField: string;\n contextResourceIdentifiers?: FrontendResourceOperationContext['contextResourceIdentifiers'];\n contextualParameters?: Record<string, string | number>;\n}): boolean {\n const contextIdentifiers = params.contextResourceIdentifiers ?? {};\n if (getContextValueId(contextIdentifiers[params.parentResourceType])) {\n return true;\n }\n if (getContextValueId(contextIdentifiers[params.foreignKeyField])) {\n return true;\n }\n if (params.parentResourceFieldIdentifier && getContextValueId(contextIdentifiers[params.parentResourceFieldIdentifier])) {\n return true;\n }\n\n const contextualParameters = params.contextualParameters ?? {};\n const foreignKeyContextValue = contextualParameters[params.foreignKeyField];\n if (foreignKeyContextValue !== undefined && String(foreignKeyContextValue).length > 0) {\n return true;\n }\n const parentFieldContextValue = params.parentResourceFieldIdentifier\n ? contextualParameters[params.parentResourceFieldIdentifier]\n : undefined;\n if (parentFieldContextValue !== undefined && String(parentFieldContextValue).length > 0) {\n return true;\n }\n\n return false;\n}\n\nfunction hasForeignKeySpecificContextValue(params: {\n foreignKeyField: string;\n contextResourceIdentifiers?: FrontendResourceOperationContext['contextResourceIdentifiers'];\n contextualParameters?: Record<string, string | number>;\n}): boolean {\n const contextIdentifiers = params.contextResourceIdentifiers ?? {};\n if (getContextValueId(contextIdentifiers[params.foreignKeyField])) {\n return true;\n }\n\n const contextValue = params.contextualParameters?.[params.foreignKeyField];\n return contextValue !== undefined && String(contextValue).length > 0;\n}\n\nfunction routeSupportsChildId(\n operation: FrontendResourceConfiguration_Operation,\n resourceFieldIdentifier: string,\n): boolean {\n const initiatorInfos = operation.initiatorInfos ?? [];\n if (initiatorInfos.length === 0) {\n return false;\n }\n\n return initiatorInfos.some((initiatorInfo) =>\n initiatorInfo.parameters?.some((parameter) => parameter.fieldIdentifier === resourceFieldIdentifier)\n );\n}\n\nfunction routeHasSatisfiedChildIdPath(params: {\n operation: FrontendResourceConfiguration_Operation;\n resourceFieldIdentifier: string;\n hasResourceId?: boolean;\n contextResourceIdentifiers?: FrontendResourceOperationContext['contextResourceIdentifiers'];\n contextualParameters?: Record<string, string | number>;\n}): boolean {\n const initiatorInfos = params.operation.initiatorInfos ?? [];\n if (initiatorInfos.length === 0) {\n return false;\n }\n\n return initiatorInfos.some((initiatorInfo) => {\n const parameters = initiatorInfo.parameters ?? [];\n const hasChildId = parameters.some((parameter) => parameter.fieldIdentifier === params.resourceFieldIdentifier);\n if (!hasChildId) {\n return false;\n }\n\n return parameters.every((parameter) => {\n const candidateKeys = [\n parameter.fieldIdentifier,\n parameter.relationshipField,\n parameter.resourceType,\n ].filter((key): key is string => typeof key === 'string' && key.length > 0);\n\n if (candidateKeys.length === 0) {\n return false;\n }\n\n return candidateKeys.some((key) => {\n if (key === params.resourceFieldIdentifier && params.hasResourceId === true) {\n return true;\n }\n\n if (getContextValueId(params.contextResourceIdentifiers?.[key])) {\n return true;\n }\n\n const contextualValue = params.contextualParameters?.[key];\n return contextualValue !== undefined && String(contextualValue).length > 0;\n });\n });\n });\n}\n\nfunction routeSupportsParentContextSingleton(params: {\n operation: FrontendResourceConfiguration_Operation;\n resourceFieldIdentifier: string;\n parentResourceType: ResourceType;\n parentResourceFieldIdentifier?: string;\n foreignKeyField: string;\n}): boolean {\n const initiatorInfos = params.operation.initiatorInfos ?? [];\n return initiatorInfos.some((initiatorInfo) => {\n const parameters = initiatorInfo.parameters ?? [];\n const hasChildId = parameters.some((parameter) => parameter.fieldIdentifier === params.resourceFieldIdentifier);\n if (hasChildId) {\n return false;\n }\n\n return parameters.some((parameter) =>\n parameter.resourceType === params.parentResourceType\n || parameter.fieldIdentifier === params.foreignKeyField\n || parameter.fieldIdentifier === params.parentResourceFieldIdentifier\n || parameter.relationshipField === params.foreignKeyField\n );\n });\n}\n\nfunction routeSupportsAssociationCompleteContext(params: {\n operation: FrontendResourceConfiguration_Operation;\n resourceFieldIdentifier: string;\n parents: FrontendAssociationCompleteContextParent[];\n}): boolean {\n const initiatorInfos = params.operation.initiatorInfos ?? [];\n const duplicatedParentResourceTypes = new Set(\n params.parents\n .map((parent) => parent.parentResourceType)\n .filter((resourceType, _index, resourceTypes) =>\n resourceTypes.filter((candidate) => candidate === resourceType).length > 1\n )\n );\n return initiatorInfos.some((initiatorInfo) => {\n const parameters = initiatorInfo.parameters ?? [];\n const hasChildId = parameters.some((parameter) => parameter.fieldIdentifier === params.resourceFieldIdentifier);\n if (hasChildId) {\n return false;\n }\n\n return params.parents.every((parent) =>\n parameters.some((parameter) => {\n const hasForeignKeySpecificMatch = parameter.fieldIdentifier === parent.foreignKeyField\n || parameter.relationshipField === parent.foreignKeyField;\n if (duplicatedParentResourceTypes.has(parent.parentResourceType)) {\n return hasForeignKeySpecificMatch;\n }\n\n return hasForeignKeySpecificMatch\n || parameter.fieldIdentifier === parent.parentResourceFieldIdentifier\n || parameter.resourceType === parent.parentResourceType;\n })\n );\n });\n}\n\nfunction isDuplicatedParentResourceType(\n parent: FrontendAssociationCompleteContextParent,\n parents: FrontendAssociationCompleteContextParent[],\n): boolean {\n return parents.filter((candidate) => candidate.parentResourceType === parent.parentResourceType).length > 1;\n}\n\nfunction hasAssociationCompleteContextValue(params: {\n parent: FrontendAssociationCompleteContextParent;\n parents: FrontendAssociationCompleteContextParent[];\n contextResourceIdentifiers?: FrontendResourceOperationContext['contextResourceIdentifiers'];\n contextualParameters?: Record<string, string | number>;\n}): boolean {\n if (isDuplicatedParentResourceType(params.parent, params.parents)) {\n return hasForeignKeySpecificContextValue({\n foreignKeyField: params.parent.foreignKeyField,\n contextResourceIdentifiers: params.contextResourceIdentifiers,\n contextualParameters: params.contextualParameters,\n });\n }\n\n return hasContextValue({\n parentResourceType: params.parent.parentResourceType,\n parentResourceFieldIdentifier: params.parent.parentResourceFieldIdentifier,\n foreignKeyField: params.parent.foreignKeyField,\n contextResourceIdentifiers: params.contextResourceIdentifiers,\n contextualParameters: params.contextualParameters,\n });\n}\n\nfunction resolveSingletonParentRelationship(params: {\n operation: FrontendResourceConfiguration_Operation;\n resourceConfig: AnyFrontendResourceConfiguration;\n registry: FrontendResourcesRegistry;\n}): FrontendParentContextSingletonAddressability | undefined {\n // Frontend addressability intentionally requires route/initiator evidence in\n // addition to backend relationship metadata. Backend resolution remains the\n // authorization source of truth; this layer only decides whether a URL surface\n // can be called from the current runtime context.\n const effectiveOperation = resolveEffectiveCoreOperationFromOperation(params.operation);\n if (\n effectiveOperation !== CoreResourceOperation.READ\n &&\n effectiveOperation !== CoreResourceOperation.UPDATE\n && effectiveOperation !== CoreResourceOperation.DELETE\n ) {\n return undefined;\n }\n\n if (params.operation.isBulkOperation === true || !params.operation.resourceRelationships) {\n return undefined;\n }\n\n const operationRelationships = normalizeOperationResourceRelationships(\n params.operation.resourceRelationships,\n params.registry,\n );\n const matches = getContextAddressedCompositionSingletonRelationshipCandidates(operationRelationships)\n .filter((candidate) => {\n const parentResourceFieldIdentifier = params.registry.resourceConfigurations[candidate.parentResourceType]?.resourceFieldIdentifier;\n return routeSupportsParentContextSingleton({\n operation: params.operation,\n resourceFieldIdentifier: params.resourceConfig.resourceFieldIdentifier,\n parentResourceType: candidate.parentResourceType,\n parentResourceFieldIdentifier,\n foreignKeyField: candidate.foreignKeyField,\n });\n });\n\n if (matches.length !== 1) {\n return undefined;\n }\n\n const candidate = matches[0];\n const relationship = candidate.relationship;\n return {\n mode: FrontendResourceOperationAddressingMode.PARENT_CONTEXT_SINGLETON,\n relationship,\n parentResourceType: candidate.parentResourceType,\n parentResourceFieldIdentifier: params.registry.resourceConfigurations[candidate.parentResourceType]?.resourceFieldIdentifier,\n foreignKeyField: candidate.foreignKeyField,\n isSatisfiedByCurrentContext: false,\n };\n}\n\nfunction resolveAssociationCompleteContext(params: {\n operation: FrontendResourceConfiguration_Operation;\n resourceConfig: AnyFrontendResourceConfiguration;\n registry: FrontendResourcesRegistry;\n}): FrontendAssociationCompleteContextAddressability | undefined {\n const effectiveOperation = resolveEffectiveCoreOperationFromOperation(params.operation);\n if (\n effectiveOperation !== CoreResourceOperation.READ\n &&\n effectiveOperation !== CoreResourceOperation.UPDATE\n && effectiveOperation !== CoreResourceOperation.DELETE\n ) {\n return undefined;\n }\n\n if (params.operation.isBulkOperation === true || !params.operation.resourceRelationships) {\n return undefined;\n }\n\n const operationResourceType = params.operation.resourceIdentifier\n ?? (params.resourceConfig as { resourceIdentifier?: ResourceType }).resourceIdentifier;\n if (!operationResourceType) {\n return undefined;\n }\n\n const operationRelationships = normalizeOperationResourceRelationships(\n params.operation.resourceRelationships,\n params.registry,\n );\n const parents = (operationRelationships.parentRelationships ?? [])\n .filter((relationship) =>\n relationship.nature === RelationshipNature.ASSOCIATION\n && relationship.jointResourceType === operationResourceType\n && relationship.resourceType2 === operationResourceType\n && relationship.cardinality1 === ResourceRelationshipCardinality.ONE\n && relationship.cardinality2 === ResourceRelationshipCardinality.MANY\n )\n .map((relationship): FrontendAssociationCompleteContextParent | undefined => {\n const parentResourceFieldIdentifier = params.registry.resourceConfigurations[relationship.resourceType1]?.resourceFieldIdentifier;\n const foreignKeyField = Resources_SharedUtils.tryResolveRelationshipForeignKeyIdentity(\n relationship,\n params.registry.allResourceFieldIdentifiers,\n )?.fieldIdentifier;\n if (!foreignKeyField) {\n return undefined;\n }\n\n const parent: FrontendAssociationCompleteContextParent = {\n relationship,\n parentResourceType: relationship.resourceType1,\n foreignKeyField,\n };\n\n if (parentResourceFieldIdentifier) {\n parent.parentResourceFieldIdentifier = parentResourceFieldIdentifier;\n }\n\n return parent;\n })\n .filter((parent): parent is FrontendAssociationCompleteContextParent => parent !== undefined);\n\n if (parents.length !== 2) {\n return undefined;\n }\n\n if (new Set(parents.map((parent) => parent.foreignKeyField)).size !== parents.length) {\n return undefined;\n }\n\n if (!routeSupportsAssociationCompleteContext({\n operation: params.operation,\n resourceFieldIdentifier: params.resourceConfig.resourceFieldIdentifier,\n parents,\n })) {\n return undefined;\n }\n\n return {\n mode: FrontendResourceOperationAddressingMode.ASSOCIATION_COMPLETE_CONTEXT,\n parents,\n isSatisfiedByCurrentContext: false,\n };\n}\n\nexport function resolveFrontendResourceOperationAddressability(\n params: ResolveFrontendResourceOperationAddressabilityParams,\n): FrontendResourceOperationAddressabilityView {\n const singletonParentContext = resolveSingletonParentRelationship(params);\n const associationCompleteContext = resolveAssociationCompleteContext(params);\n const satisfiedSingletonParentContext = singletonParentContext\n ? {\n ...singletonParentContext,\n isSatisfiedByCurrentContext: hasContextValue({\n parentResourceType: singletonParentContext.parentResourceType,\n parentResourceFieldIdentifier: singletonParentContext.parentResourceFieldIdentifier,\n foreignKeyField: singletonParentContext.foreignKeyField,\n contextResourceIdentifiers: params.contextResourceIdentifiers,\n contextualParameters: params.contextualParameters,\n }),\n }\n : undefined;\n const satisfiedAssociationCompleteContext = associationCompleteContext\n ? {\n ...associationCompleteContext,\n isSatisfiedByCurrentContext: associationCompleteContext.parents.every((parent) =>\n hasAssociationCompleteContextValue({\n parent,\n parents: associationCompleteContext.parents,\n contextResourceIdentifiers: params.contextResourceIdentifiers,\n contextualParameters: params.contextualParameters,\n })\n ),\n }\n : undefined;\n\n return {\n operation: params.operation,\n supportsChildId: routeSupportsChildId(\n params.operation,\n params.resourceConfig.resourceFieldIdentifier,\n ),\n singletonParentContext: satisfiedSingletonParentContext,\n associationCompleteContext: satisfiedAssociationCompleteContext,\n };\n}\n\nexport function isFrontendOperationAddressableForCurrentContext(\n params: ResolveFrontendResourceOperationAddressabilityParams & { hasResourceId?: boolean },\n): boolean {\n const addressability = resolveFrontendResourceOperationAddressability(params);\n return (params.hasResourceId === true && routeHasSatisfiedChildIdPath({\n operation: params.operation,\n resourceFieldIdentifier: params.resourceConfig.resourceFieldIdentifier,\n hasResourceId: params.hasResourceId,\n contextResourceIdentifiers: params.contextResourceIdentifiers,\n contextualParameters: params.contextualParameters,\n }))\n || addressability.singletonParentContext?.isSatisfiedByCurrentContext === true\n || addressability.associationCompleteContext?.isSatisfiedByCurrentContext === true;\n}\n\nexport function pickPreferredOperationForCoreSemanticAddressability(\n params: PickPreferredOperationForAddressabilityParams,\n): FrontendResourceConfiguration_Operation | undefined {\n if (!params.resourceConfig) {\n return undefined;\n }\n\n const semanticMatches = getOperationsForCoreSemantic(\n params.operations,\n params.coreOperation,\n {\n allowBulk: params.allowBulk,\n },\n ).filter((operation) =>\n params.requireFrontendAddressable !== true\n || isOperationAddressable(operation.operationFrontendConfig)\n ).filter((operation) =>\n params.requireLiteralCoreOperation !== true\n || operation.operationIdentifier === params.coreOperation\n );\n const addressableMatches = semanticMatches.filter((operation) =>\n isFrontendOperationAddressableForCurrentContext({\n resourceConfig: params.resourceConfig!,\n operation,\n registry: params.registry,\n hasResourceId: params.hasResourceId,\n contextResourceIdentifiers: params.contextResourceIdentifiers,\n contextualParameters: params.contextualParameters,\n })\n );\n\n if (addressableMatches.length === 0) {\n return undefined;\n }\n\n const sameLaneMatches = params.preferredVariantKey\n ? addressableMatches.filter((operation) => operation.variantKey === params.preferredVariantKey)\n : [];\n\n return pickPreferredOperationForCoreSemantic(sameLaneMatches.length > 0 ? sameLaneMatches : addressableMatches, params.coreOperation, {\n allowBulk: params.allowBulk,\n });\n}\n\n/**\n * The organization a record's write lands in (#2473): the record itself when it IS an organization, otherwise the\n * organization its context names. `undefined` when neither says, which a viewer hook reads as the current\n * organization.\n *\n * The in-place write pick needs it to ask about the viewer's roles in the RIGHT tenant: on the directory page an\n * operator reads a tenant that is not their current organization, and their own organization's roles say nothing\n * about what they may do there.\n */\nexport function resolveRecordOrganizationId(\n resourceType: string | undefined,\n resourceId: string | undefined,\n contextResourceIdentifiers: Record<string, unknown> | undefined,\n): string | undefined {\n if (resourceType === CoreResourceType.ORGANIZATIONS && resourceId) return resourceId;\n const entry = contextResourceIdentifiers?.[CoreResourceType.ORGANIZATIONS];\n const id = typeof entry === 'string' ? entry : (entry as { resourceId?: unknown } | undefined)?.resourceId;\n return typeof id === 'string' && id.length > 0 ? id : undefined;\n}\n\n/**\n * The operation an INLINE FIELD WRITE may dispatch through — the literal `update`, addressable from\n * the current context, or nothing.\n *\n * Every inline-edit seam resolves its target through this one function rather than calling the\n * general picker with its own options, because the two questions differ and got conflated:\n *\n * - *\"can this record be written?\"* admits a custom verb. `pickPreferredOperationForCoreSemanticAddressability`\n * answers that, and should keep answering it.\n * - *\"through what do I send this ONE field?\"* admits only the generic update route. A named verb\n * carries its own request contract, so a field value posted to it is not a partial update of the\n * record — it is a malformed call to something else.\n *\n * What made the conflation invisible: the addressability filter runs before the preference sort, so\n * a resource whose literal `update` is `INTERNAL_CALL` (route-less, every scope-level configuration\n * record in the security lane) had the literal removed and a custom verb promoted silently. SSO\n * config has three — `claimDomain`, `verifyDomain`, `revokeDomain`, each a real PUT — so its settings\n * pane rendered every writable field as a live control bound to domain claiming. SCIM provisioning,\n * whose literal `update` is route-less too and which declares no custom verb, resolved to nothing and\n * stayed read-only. Identical configuration records, opposite behaviour, and the WRONG one looked\n * like the working one.\n *\n * Returning `undefined` renders the fields read-only, which is the honest answer while the literal\n * route does not exist. Giving a configuration record a writable surface is a decision about that\n * record's operations, taken there.\n */\nexport function pickInlineFieldWriteOperation(\n params: Omit<PickPreferredOperationForAddressabilityParams, 'coreOperation' | 'allowBulk' | 'requireLiteralCoreOperation'> & {\n /**\n * The viewer, with their roles IN THE ORGANIZATION the record belongs to (`useViewerEffectiveRolesInOrganization`).\n * Required, so no in-place edit is offered without asking whether this viewer may perform it (#2473).\n */\n viewer: LauncherEffectiveRoles;\n },\n): FrontendResourceConfiguration_Operation | undefined {\n const { viewer, ...pickParams } = params;\n const resourceType = String(params.resourceConfig?.resourceIdentifier ?? '');\n // Only the writes this viewer may perform are candidates: the decision the backend's operation gate makes, through\n // the shell's one role predicate. Without this, a platform operator reading another tenant through the directory was\n // offered `name` in place, the write went to an `ORG_ADMIN`-only UPDATE, the backend refused it, and the refusal was\n // recorded as an attempted cross-tenant crossing. A viewer who may perform none gets read-only fields: the honest\n // answer, exactly as for a record with no literal route (below).\n //\n // A viewer OUTSIDE the record's tenant reaches it only through a variant that declares the crossing, which the predicate\n // decides (`viewerIsKnownOutsideOrganization`, #2600): the organizations resource has an `admin` UPDATE gated on the\n // super-administrator role and deliberately NOT crossed, and the role check alone offered it to the operator.\n const performableOperations = pickParams.operations.filter((operation) => viewerMayPerformOperation({\n resourceType,\n roles: operation.roles,\n operationIdentifier: operation.operationIdentifier,\n resourceOperationLike: operation.resourceOperationLike,\n admitsCrossTenantPlatformAdministration: operation.admitsCrossTenantPlatformAdministration,\n resourcePrimaryScope: params.resourceConfig?.resourcePrimaryScope,\n }, viewer));\n return pickPreferredOperationForCoreSemanticAddressability({\n ...pickParams,\n operations: performableOperations,\n coreOperation: CoreResourceOperation.UPDATE,\n allowBulk: false,\n requireLiteralCoreOperation: true,\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources-repository.frontend.service.d.ts","sourceRoot":"","sources":["../../../../src/core/resources/resources-repository.frontend.service.ts"],"names":[],"mappings":"AAAA;;;;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;;;;;;OAsBG;IACH;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,cAAc;IAoCtB;;;;;;;;;OASG;IACH,OAAO,CAAC,oCAAoC;IAiB5C,OAAO,CAAC,8BAA8B;IA2BtC;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,mCAAmC;IAuR3C,OAAO,CAAC,qCAAqC;
|
|
1
|
+
{"version":3,"file":"resources-repository.frontend.service.d.ts","sourceRoot":"","sources":["../../../../src/core/resources/resources-repository.frontend.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,sBAAsB,EAAE,MAAM,sEAAsE,CAAC;AAC9G,OAAO,EAAE,gCAAgC,EAAE,MAAM,gFAAgF,CAAC;AAOlI,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+DAA+D,CAAC;AAKxG,OAAO,EAGL,2CAA2C,EAE3C,oBAAoB,EAqBU,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAEV,2BAA2B,EAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAGV,yBAAyB,EAE1B,MAAM,+DAA+D,CAAC;AAoZvE,qBAAa,kCAAkC;IAiB3C,OAAO,CAAC,UAAU;IAhBpB,OAAO,CAAC,QAAQ,CAA0C;IAC1D,OAAO,CAAC,aAAa,CAAS;IAC9B;;;OAGG;IACH,OAAO,CAAC,gCAAgC,CAA0C;IAClF;;;;OAIG;IACH,OAAO,CAAC,mCAAmC,CAA8D;IACzG,OAAO,CAAC,mBAAmB,CAAiD;gBAGlE,UAAU,EAAE,sBAAsB;IAG5C;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAa/B;;;;;;;;;OASG;IACU,mBAAmB,CAC9B,8CAA8C,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,2CAA2C,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;KAAE,EAC9H,oCAAoC,CAAC,EAAE;QAAE,C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|
@@ -1024,6 +1024,8 @@ export class ResourcesRepositoryFrontendService {
|
|
|
1024
1024
|
sectionRefs: authoredView.sectionRefs,
|
|
1025
1025
|
viewComponent: authoredView.viewComponent,
|
|
1026
1026
|
icon: authoredView.icon,
|
|
1027
|
+
// Its plan fence, gated at its route and wherever it is embedded (this map lists fields, it does not spread).
|
|
1028
|
+
requiredFeatures: authoredView.requiredFeatures,
|
|
1027
1029
|
// The conversations it hosts on its record: how a link to one finds this view (#4043).
|
|
1028
1030
|
...(authoredView.conversationSystemRef ? { conversationSystemRef: authoredView.conversationSystemRef } : {}),
|
|
1029
1031
|
}));
|