udp-react-enterprise-component-library 27.0.0-next.11 → 27.0.0-next.13
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/dist/.tsbuildinfo +1 -1
- package/dist/UI/feedback/PageLoading.d.ts +11 -1
- package/dist/UI/feedback/PageLoading.d.ts.map +1 -1
- package/dist/UI/feedback/PageLoading.js +12 -12
- package/dist/UI/feedback/PageLoading.js.map +1 -1
- package/dist/UI/feedback/PageLoading.mjs +35 -21
- package/dist/UI/feedback/PageLoading.mjs.map +1 -1
- package/dist/UI/feedback/PageLoading.module.css +9 -0
- package/dist/UI/fluent-web-components/UdpIconPicker.d.ts +4 -1
- package/dist/UI/fluent-web-components/UdpIconPicker.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpIconPicker.js +2 -2
- package/dist/UI/fluent-web-components/UdpIconPicker.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpIconPicker.mjs +32 -28
- package/dist/UI/fluent-web-components/UdpIconPicker.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpLink.d.ts +6 -0
- package/dist/UI/fluent-web-components/UdpLink.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpLink.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpLink.mjs.map +1 -1
- package/dist/UI/fluent-web-components/index.d.ts +10 -0
- package/dist/UI/fluent-web-components/index.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/index.js +10 -0
- package/dist/UI/fluent-web-components/index.js.map +1 -1
- package/dist/UI/fluent-web-components/shell/UdpShell.d.ts +10 -0
- package/dist/UI/fluent-web-components/shell/UdpShell.d.ts.map +1 -0
- package/dist/UI/fluent-web-components/shell/UdpShell.js +7 -0
- package/dist/UI/fluent-web-components/shell/UdpShell.js.map +1 -0
- package/dist/UI/fluent-web-components/shell/UdpShell.mjs +19 -0
- package/dist/UI/fluent-web-components/shell/UdpShell.mjs.map +1 -0
- package/dist/UI/fluent-web-components/shell/UdpShellAppBar.d.ts +11 -0
- package/dist/UI/fluent-web-components/shell/UdpShellAppBar.d.ts.map +1 -0
- package/dist/UI/fluent-web-components/shell/UdpShellAppBar.js +7 -0
- package/dist/UI/fluent-web-components/shell/UdpShellAppBar.js.map +1 -0
- package/dist/UI/fluent-web-components/shell/UdpShellAppBar.mjs +19 -0
- package/dist/UI/fluent-web-components/shell/UdpShellAppBar.mjs.map +1 -0
- package/dist/UI/fluent-web-components/shell/UdpShellAppBarAction.d.ts +16 -0
- package/dist/UI/fluent-web-components/shell/UdpShellAppBarAction.d.ts.map +1 -0
- package/dist/UI/fluent-web-components/shell/UdpShellAppBarAction.js +7 -0
- package/dist/UI/fluent-web-components/shell/UdpShellAppBarAction.js.map +1 -0
- package/dist/UI/fluent-web-components/shell/UdpShellAppBarAction.mjs +19 -0
- package/dist/UI/fluent-web-components/shell/UdpShellAppBarAction.mjs.map +1 -0
- package/dist/UI/fluent-web-components/shell/UdpShellNav.d.ts +21 -0
- package/dist/UI/fluent-web-components/shell/UdpShellNav.d.ts.map +1 -0
- package/dist/UI/fluent-web-components/shell/UdpShellNav.js +7 -0
- package/dist/UI/fluent-web-components/shell/UdpShellNav.js.map +1 -0
- package/dist/UI/fluent-web-components/shell/UdpShellNav.mjs +19 -0
- package/dist/UI/fluent-web-components/shell/UdpShellNav.mjs.map +1 -0
- package/dist/UI/fluent-web-components/shell/UdpShellRibbon.d.ts +10 -0
- package/dist/UI/fluent-web-components/shell/UdpShellRibbon.d.ts.map +1 -0
- package/dist/UI/fluent-web-components/shell/UdpShellRibbon.js +7 -0
- package/dist/UI/fluent-web-components/shell/UdpShellRibbon.js.map +1 -0
- package/dist/UI/fluent-web-components/shell/UdpShellRibbon.mjs +19 -0
- package/dist/UI/fluent-web-components/shell/UdpShellRibbon.mjs.map +1 -0
- package/dist/UI/fluent-web-components/shell/UdpShellSidebar.d.ts +13 -0
- package/dist/UI/fluent-web-components/shell/UdpShellSidebar.d.ts.map +1 -0
- package/dist/UI/fluent-web-components/shell/UdpShellSidebar.js +7 -0
- package/dist/UI/fluent-web-components/shell/UdpShellSidebar.js.map +1 -0
- package/dist/UI/fluent-web-components/shell/UdpShellSidebar.mjs +19 -0
- package/dist/UI/fluent-web-components/shell/UdpShellSidebar.mjs.map +1 -0
- package/dist/UI/fluent-web-components/types.d.ts +2 -0
- package/dist/UI/fluent-web-components/types.d.ts.map +1 -1
- package/dist/UI/widgets/library/InquiryFindRecordsWidget/InquiryFindRecordsWidget.d.ts +16 -3
- package/dist/UI/widgets/library/InquiryFindRecordsWidget/InquiryFindRecordsWidget.d.ts.map +1 -1
- package/dist/UI/widgets/library/InquiryFindRecordsWidget/InquiryFindRecordsWidget.js +36 -13
- package/dist/UI/widgets/library/InquiryFindRecordsWidget/InquiryFindRecordsWidget.js.map +1 -1
- package/dist/UI/widgets/library/InquiryFindRecordsWidget/InquiryFindRecordsWidget.mjs +119 -62
- package/dist/UI/widgets/library/InquiryFindRecordsWidget/InquiryFindRecordsWidget.mjs.map +1 -1
- package/dist/UI/widgets/library/InquiryFindRecordsWidget/index.mjs +3 -2
- package/dist/UI/widgets/library/InquiryRecentRecordsWidget/InquiryRecentRecordsWidget.d.ts +9 -2
- package/dist/UI/widgets/library/InquiryRecentRecordsWidget/InquiryRecentRecordsWidget.d.ts.map +1 -1
- package/dist/UI/widgets/library/InquiryRecentRecordsWidget/InquiryRecentRecordsWidget.js +18 -18
- package/dist/UI/widgets/library/InquiryRecentRecordsWidget/InquiryRecentRecordsWidget.js.map +1 -1
- package/dist/UI/widgets/library/InquiryRecentRecordsWidget/InquiryRecentRecordsWidget.mjs +79 -67
- package/dist/UI/widgets/library/InquiryRecentRecordsWidget/InquiryRecentRecordsWidget.mjs.map +1 -1
- package/dist/UI/widgets/library/InquiryRemindersWidget/InquiryRemindersWidget.d.ts +8 -2
- package/dist/UI/widgets/library/InquiryRemindersWidget/InquiryRemindersWidget.d.ts.map +1 -1
- package/dist/UI/widgets/library/InquiryRemindersWidget/InquiryRemindersWidget.js +32 -16
- package/dist/UI/widgets/library/InquiryRemindersWidget/InquiryRemindersWidget.js.map +1 -1
- package/dist/UI/widgets/library/InquiryRemindersWidget/InquiryRemindersWidget.mjs +129 -102
- package/dist/UI/widgets/library/InquiryRemindersWidget/InquiryRemindersWidget.mjs.map +1 -1
- package/dist/UI/widgets/library/InquiryRemindersWidget/reminderRowModel.d.ts +3 -2
- package/dist/UI/widgets/library/InquiryRemindersWidget/reminderRowModel.d.ts.map +1 -1
- package/dist/UI/widgets/library/InquiryRemindersWidget/reminderRowModel.js +11 -12
- package/dist/UI/widgets/library/InquiryRemindersWidget/reminderRowModel.js.map +1 -1
- package/dist/UI/widgets/library/InquiryRemindersWidget/reminderRowModel.mjs +6 -4
- package/dist/UI/widgets/library/InquiryRemindersWidget/reminderRowModel.mjs.map +1 -1
- package/dist/UI/widgets/library/InquiryRemindersWidget/useInquiryReminders.d.ts +2 -19
- package/dist/UI/widgets/library/InquiryRemindersWidget/useInquiryReminders.d.ts.map +1 -1
- package/dist/UI/widgets/library/InquiryRemindersWidget/useInquiryReminders.js +4 -5
- package/dist/UI/widgets/library/InquiryRemindersWidget/useInquiryReminders.js.map +1 -1
- package/dist/UI/widgets/library/InquiryRemindersWidget/useInquiryReminders.mjs +5 -4
- package/dist/UI/widgets/library/InquiryRemindersWidget/useInquiryReminders.mjs.map +1 -1
- package/dist/actionPanels/index.d.ts +0 -2
- package/dist/actionPanels/index.d.ts.map +1 -1
- package/dist/actionPanels/index.js +0 -2
- package/dist/actionPanels/index.js.map +1 -1
- package/dist/actionPanels/panelActionFields.d.ts +9 -26
- package/dist/actionPanels/panelActionFields.d.ts.map +1 -1
- package/dist/actionPanels/panelActionFields.js +32 -55
- package/dist/actionPanels/panelActionFields.js.map +1 -1
- package/dist/actionPanels/panelActionFields.mjs +159 -375
- package/dist/actionPanels/panelActionFields.mjs.map +1 -1
- package/dist/actionPanels/panelOperations.d.ts +15 -41
- package/dist/actionPanels/panelOperations.d.ts.map +1 -1
- package/dist/actionPanels/panelOperations.js +51 -89
- package/dist/actionPanels/panelOperations.js.map +1 -1
- package/dist/actionPanels/panelOperations.mjs +37 -92
- package/dist/actionPanels/panelOperations.mjs.map +1 -1
- package/dist/aiAssistant/aiFeatures.d.ts +1 -1
- package/dist/aiAssistant/aiFeatures.d.ts.map +1 -1
- package/dist/aiAssistant/aiFeatures.js +5 -0
- package/dist/aiAssistant/aiFeatures.js.map +1 -1
- package/dist/aiAssistant/aiFeatures.mjs +5 -1
- package/dist/aiAssistant/aiFeatures.mjs.map +1 -1
- package/dist/dashboard/DashboardWidget.d.ts.map +1 -1
- package/dist/dashboard/DashboardWidget.js +1 -1
- package/dist/dashboard/DashboardWidget.js.map +1 -1
- package/dist/dashboard/DashboardWidget.mjs +24 -21
- package/dist/dashboard/DashboardWidget.mjs.map +1 -1
- package/dist/domain/actionPanel/actionTypeMeta.d.ts +15 -2
- package/dist/domain/actionPanel/actionTypeMeta.d.ts.map +1 -1
- package/dist/domain/actionPanel/actionTypeMeta.js +21 -2
- package/dist/domain/actionPanel/actionTypeMeta.js.map +1 -1
- package/dist/domain/actionPanel/actionTypeMeta.mjs +18 -3
- package/dist/domain/actionPanel/actionTypeMeta.mjs.map +1 -1
- package/dist/domain/actionPanel/buttonOrder.d.ts +67 -0
- package/dist/domain/actionPanel/buttonOrder.d.ts.map +1 -0
- package/dist/domain/actionPanel/buttonOrder.js +105 -0
- package/dist/domain/actionPanel/buttonOrder.js.map +1 -0
- package/dist/domain/actionPanel/buttonOrder.mjs +90 -0
- package/dist/domain/actionPanel/buttonOrder.mjs.map +1 -0
- package/dist/domain/actionPanel/index.d.ts +1 -0
- package/dist/domain/actionPanel/index.d.ts.map +1 -1
- package/dist/domain/actionPanel/index.js +1 -0
- package/dist/domain/actionPanel/index.js.map +1 -1
- package/dist/domain/actionPanel/index.mjs +4 -3
- package/dist/domain/actionPanel/serialize.d.ts +6 -2
- package/dist/domain/actionPanel/serialize.d.ts.map +1 -1
- package/dist/domain/actionPanel/serialize.js +10 -3
- package/dist/domain/actionPanel/serialize.js.map +1 -1
- package/dist/domain/actionPanel/serialize.mjs +7 -3
- package/dist/domain/actionPanel/serialize.mjs.map +1 -1
- package/dist/domain/actionPanel/types.d.ts +24 -8
- package/dist/domain/actionPanel/types.d.ts.map +1 -1
- package/dist/domain/actionPanel/types.js.map +1 -1
- package/dist/domain/actionPanel/types.mjs.map +1 -1
- package/dist/domain/inquiryTree/describe.d.ts +15 -3
- package/dist/domain/inquiryTree/describe.d.ts.map +1 -1
- package/dist/domain/inquiryTree/describe.js +32 -28
- package/dist/domain/inquiryTree/describe.js.map +1 -1
- package/dist/domain/inquiryTree/describe.mjs +34 -16
- package/dist/domain/inquiryTree/describe.mjs.map +1 -1
- package/dist/domain/inquiryTree/displayTree.d.ts +75 -97
- package/dist/domain/inquiryTree/displayTree.d.ts.map +1 -1
- package/dist/domain/inquiryTree/displayTree.js +418 -551
- package/dist/domain/inquiryTree/displayTree.js.map +1 -1
- package/dist/domain/inquiryTree/displayTree.mjs +345 -414
- package/dist/domain/inquiryTree/displayTree.mjs.map +1 -1
- package/dist/domain/inquiryTree/groups.d.ts +2 -0
- package/dist/domain/inquiryTree/groups.d.ts.map +1 -1
- package/dist/domain/inquiryTree/groups.js.map +1 -1
- package/dist/domain/inquiryTree/groups.mjs.map +1 -1
- package/dist/domain/inquiryTree/index.d.ts +1 -1
- package/dist/domain/inquiryTree/index.d.ts.map +1 -1
- package/dist/domain/inquiryTree/index.js +1 -1
- package/dist/domain/inquiryTree/index.js.map +1 -1
- package/dist/domain/inquiryTree/index.mjs +12 -12
- package/dist/domain/inquiryTree/lazyLoad.d.ts +20 -129
- package/dist/domain/inquiryTree/lazyLoad.d.ts.map +1 -1
- package/dist/domain/inquiryTree/lazyLoad.js +48 -233
- package/dist/domain/inquiryTree/lazyLoad.js.map +1 -1
- package/dist/domain/inquiryTree/lazyLoad.mjs +32 -187
- package/dist/domain/inquiryTree/lazyLoad.mjs.map +1 -1
- package/dist/domain/inquiryTree/legalChildren.d.ts +13 -14
- package/dist/domain/inquiryTree/legalChildren.d.ts.map +1 -1
- package/dist/domain/inquiryTree/legalChildren.js +21 -42
- package/dist/domain/inquiryTree/legalChildren.js.map +1 -1
- package/dist/domain/inquiryTree/legalChildren.mjs +19 -37
- package/dist/domain/inquiryTree/legalChildren.mjs.map +1 -1
- package/dist/domain/inquiryTree/names.d.ts +38 -0
- package/dist/domain/inquiryTree/names.d.ts.map +1 -0
- package/dist/domain/inquiryTree/names.js +64 -0
- package/dist/domain/inquiryTree/names.js.map +1 -0
- package/dist/domain/inquiryTree/names.mjs +56 -0
- package/dist/domain/inquiryTree/names.mjs.map +1 -0
- package/dist/domain/inquiryTree/operations.d.ts +6 -2
- package/dist/domain/inquiryTree/operations.d.ts.map +1 -1
- package/dist/domain/inquiryTree/operations.js +17 -16
- package/dist/domain/inquiryTree/operations.js.map +1 -1
- package/dist/domain/inquiryTree/operations.mjs +14 -11
- package/dist/domain/inquiryTree/operations.mjs.map +1 -1
- package/dist/domain/inquiryTree/rules.d.ts +3 -4
- package/dist/domain/inquiryTree/rules.d.ts.map +1 -1
- package/dist/domain/inquiryTree/rules.js +3 -13
- package/dist/domain/inquiryTree/rules.js.map +1 -1
- package/dist/domain/inquiryTree/rules.mjs +3 -9
- package/dist/domain/inquiryTree/rules.mjs.map +1 -1
- package/dist/domain/inquiryTree/runtime.d.ts +23 -16
- package/dist/domain/inquiryTree/runtime.d.ts.map +1 -1
- package/dist/domain/inquiryTree/runtime.js +46 -54
- package/dist/domain/inquiryTree/runtime.js.map +1 -1
- package/dist/domain/inquiryTree/runtime.mjs +31 -26
- package/dist/domain/inquiryTree/runtime.mjs.map +1 -1
- package/dist/domain/inquiryTree/serialize.d.ts +20 -29
- package/dist/domain/inquiryTree/serialize.d.ts.map +1 -1
- package/dist/domain/inquiryTree/serialize.js +93 -205
- package/dist/domain/inquiryTree/serialize.js.map +1 -1
- package/dist/domain/inquiryTree/serialize.mjs +89 -180
- package/dist/domain/inquiryTree/serialize.mjs.map +1 -1
- package/dist/domain/inquiryTree/types.d.ts +146 -65
- package/dist/domain/inquiryTree/types.d.ts.map +1 -1
- package/dist/domain/inquiryTree/types.js +5 -0
- package/dist/domain/inquiryTree/types.js.map +1 -1
- package/dist/domain/inquiryTree/types.mjs +3 -1
- package/dist/domain/inquiryTree/types.mjs.map +1 -1
- package/dist/domain/inquiryTree/validate.d.ts +9 -2
- package/dist/domain/inquiryTree/validate.d.ts.map +1 -1
- package/dist/domain/inquiryTree/validate.js +30 -58
- package/dist/domain/inquiryTree/validate.js.map +1 -1
- package/dist/domain/inquiryTree/validate.mjs +29 -44
- package/dist/domain/inquiryTree/validate.mjs.map +1 -1
- package/dist/domain/inquiryTree/view.d.ts +8 -12
- package/dist/domain/inquiryTree/view.d.ts.map +1 -1
- package/dist/domain/inquiryTree/view.js +40 -66
- package/dist/domain/inquiryTree/view.js.map +1 -1
- package/dist/domain/inquiryTree/view.mjs +30 -60
- package/dist/domain/inquiryTree/view.mjs.map +1 -1
- package/dist/domain/inquiryTree/waveLoad.d.ts +32 -48
- package/dist/domain/inquiryTree/waveLoad.d.ts.map +1 -1
- package/dist/domain/inquiryTree/waveLoad.js +75 -90
- package/dist/domain/inquiryTree/waveLoad.js.map +1 -1
- package/dist/domain/inquiryTree/waveLoad.mjs +54 -60
- package/dist/domain/inquiryTree/waveLoad.mjs.map +1 -1
- package/dist/domain/inquiryTree/wireString.d.ts +5 -0
- package/dist/domain/inquiryTree/wireString.d.ts.map +1 -1
- package/dist/domain/inquiryTree/wireString.js +11 -0
- package/dist/domain/inquiryTree/wireString.js.map +1 -1
- package/dist/domain/inquiryTree/wireString.mjs +10 -1
- package/dist/domain/inquiryTree/wireString.mjs.map +1 -1
- package/dist/domain/nodeView/index.mjs +2 -2
- package/dist/domain/nodeView/model.d.ts +35 -30
- package/dist/domain/nodeView/model.d.ts.map +1 -1
- package/dist/domain/nodeView/model.js +108 -69
- package/dist/domain/nodeView/model.js.map +1 -1
- package/dist/domain/nodeView/model.mjs +86 -36
- package/dist/domain/nodeView/model.mjs.map +1 -1
- package/dist/errorBoundary/ErrorBoundary.d.ts +17 -1
- package/dist/errorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/dist/errorBoundary/ErrorBoundary.js +25 -21
- package/dist/errorBoundary/ErrorBoundary.js.map +1 -1
- package/dist/errorBoundary/ErrorBoundary.mjs +22 -34
- package/dist/errorBoundary/ErrorBoundary.mjs.map +1 -1
- package/dist/errorBoundary/ErrorBoundaryFallback.d.ts +10 -0
- package/dist/errorBoundary/ErrorBoundaryFallback.d.ts.map +1 -0
- package/dist/errorBoundary/ErrorBoundaryFallback.js +8 -0
- package/dist/errorBoundary/ErrorBoundaryFallback.js.map +1 -0
- package/dist/errorBoundary/ErrorBoundaryFallback.mjs +91 -0
- package/dist/errorBoundary/ErrorBoundaryFallback.mjs.map +1 -0
- package/dist/icons/legacyIconNames.d.ts.map +1 -1
- package/dist/icons/legacyIconNames.js +46 -1
- package/dist/icons/legacyIconNames.js.map +1 -1
- package/dist/icons/legacyIconNames.mjs +46 -1
- package/dist/icons/legacyIconNames.mjs.map +1 -1
- package/dist/index.mjs +19 -14
- package/dist/inquiry/Inquiry.d.ts +3 -0
- package/dist/inquiry/Inquiry.d.ts.map +1 -1
- package/dist/inquiry/Inquiry.js +3 -0
- package/dist/inquiry/Inquiry.js.map +1 -1
- package/dist/inquiry/Inquiry.mjs +3 -0
- package/dist/inquiry/Inquiry.mjs.map +1 -1
- package/dist/inquiry/InquiryContainer.d.ts.map +1 -1
- package/dist/inquiry/InquiryContainer.js +22 -21
- package/dist/inquiry/InquiryContainer.js.map +1 -1
- package/dist/inquiry/InquiryContainer.mjs +14 -10
- package/dist/inquiry/InquiryContainer.mjs.map +1 -1
- package/dist/inquiry/InquiryTreeMenu.d.ts.map +1 -1
- package/dist/inquiry/InquiryTreeMenu.js +14 -23
- package/dist/inquiry/InquiryTreeMenu.js.map +1 -1
- package/dist/inquiry/InquiryTreeMenu.mjs +20 -20
- package/dist/inquiry/InquiryTreeMenu.mjs.map +1 -1
- package/dist/inquiry/v2/InquiryV2.d.ts +8 -6
- package/dist/inquiry/v2/InquiryV2.d.ts.map +1 -1
- package/dist/inquiry/v2/InquiryV2.js +45 -24
- package/dist/inquiry/v2/InquiryV2.js.map +1 -1
- package/dist/inquiry/v2/InquiryV2.mjs +108 -61
- package/dist/inquiry/v2/InquiryV2.mjs.map +1 -1
- package/dist/inquiry/v2/InquiryV2.module.css +60 -15
- package/dist/inquiry/v2/InquiryWorkspace.d.ts +9 -9
- package/dist/inquiry/v2/InquiryWorkspace.d.ts.map +1 -1
- package/dist/inquiry/v2/InquiryWorkspace.js +531 -408
- package/dist/inquiry/v2/InquiryWorkspace.js.map +1 -1
- package/dist/inquiry/v2/InquiryWorkspace.mjs +524 -408
- package/dist/inquiry/v2/InquiryWorkspace.mjs.map +1 -1
- package/dist/inquiry/v2/ai/InquiryV2Copilot.d.ts +3 -2
- package/dist/inquiry/v2/ai/InquiryV2Copilot.d.ts.map +1 -1
- package/dist/inquiry/v2/ai/InquiryV2Copilot.js +20 -37
- package/dist/inquiry/v2/ai/InquiryV2Copilot.js.map +1 -1
- package/dist/inquiry/v2/ai/InquiryV2Copilot.mjs +19 -31
- package/dist/inquiry/v2/ai/InquiryV2Copilot.mjs.map +1 -1
- package/dist/inquiry/v2/ai/copilotModel.d.ts +6 -14
- package/dist/inquiry/v2/ai/copilotModel.d.ts.map +1 -1
- package/dist/inquiry/v2/ai/copilotModel.js +35 -87
- package/dist/inquiry/v2/ai/copilotModel.js.map +1 -1
- package/dist/inquiry/v2/ai/copilotModel.mjs +23 -47
- package/dist/inquiry/v2/ai/copilotModel.mjs.map +1 -1
- package/dist/inquiry/v2/api/queries.d.ts +46 -73
- package/dist/inquiry/v2/api/queries.d.ts.map +1 -1
- package/dist/inquiry/v2/api/queries.js +151 -210
- package/dist/inquiry/v2/api/queries.js.map +1 -1
- package/dist/inquiry/v2/api/queries.mjs +227 -183
- package/dist/inquiry/v2/api/queries.mjs.map +1 -1
- package/dist/inquiry/v2/capabilities/actions/ActionsCapability.d.ts.map +1 -1
- package/dist/inquiry/v2/capabilities/actions/ActionsCapability.js +103 -32
- package/dist/inquiry/v2/capabilities/actions/ActionsCapability.js.map +1 -1
- package/dist/inquiry/v2/capabilities/actions/ActionsCapability.mjs +92 -32
- package/dist/inquiry/v2/capabilities/actions/ActionsCapability.mjs.map +1 -1
- package/dist/inquiry/v2/capabilities/actions/ActionsCapability.module.css +8 -1
- package/dist/inquiry/v2/capabilities/actions/EntityFormSurface.d.ts +20 -16
- package/dist/inquiry/v2/capabilities/actions/EntityFormSurface.d.ts.map +1 -1
- package/dist/inquiry/v2/capabilities/actions/EntityFormSurface.js +111 -68
- package/dist/inquiry/v2/capabilities/actions/EntityFormSurface.js.map +1 -1
- package/dist/inquiry/v2/capabilities/actions/EntityFormSurface.mjs +108 -142
- package/dist/inquiry/v2/capabilities/actions/EntityFormSurface.mjs.map +1 -1
- package/dist/inquiry/v2/capabilities/actions/RetrieveSurface.mjs +1 -1
- package/dist/inquiry/v2/capabilities/actions/actionModel.d.ts +66 -50
- package/dist/inquiry/v2/capabilities/actions/actionModel.d.ts.map +1 -1
- package/dist/inquiry/v2/capabilities/actions/actionModel.js +141 -66
- package/dist/inquiry/v2/capabilities/actions/actionModel.js.map +1 -1
- package/dist/inquiry/v2/capabilities/actions/actionModel.mjs +115 -53
- package/dist/inquiry/v2/capabilities/actions/actionModel.mjs.map +1 -1
- package/dist/inquiry/v2/capabilities/actions/parentKeyDefaults.d.ts +26 -0
- package/dist/inquiry/v2/capabilities/actions/parentKeyDefaults.d.ts.map +1 -0
- package/dist/inquiry/v2/capabilities/actions/parentKeyDefaults.js +36 -0
- package/dist/inquiry/v2/capabilities/actions/parentKeyDefaults.js.map +1 -0
- package/dist/inquiry/v2/capabilities/actions/parentKeyDefaults.mjs +41 -0
- package/dist/inquiry/v2/capabilities/actions/parentKeyDefaults.mjs.map +1 -0
- package/dist/inquiry/v2/capabilities/actions/runAction.d.ts +3 -2
- package/dist/inquiry/v2/capabilities/actions/runAction.d.ts.map +1 -1
- package/dist/inquiry/v2/capabilities/actions/runAction.js +27 -23
- package/dist/inquiry/v2/capabilities/actions/runAction.js.map +1 -1
- package/dist/inquiry/v2/capabilities/actions/runAction.mjs +26 -20
- package/dist/inquiry/v2/capabilities/actions/runAction.mjs.map +1 -1
- package/dist/inquiry/v2/capabilities/actions/useHeaderFold.d.ts +20 -0
- package/dist/inquiry/v2/capabilities/actions/useHeaderFold.d.ts.map +1 -0
- package/dist/inquiry/v2/capabilities/actions/useHeaderFold.js +112 -0
- package/dist/inquiry/v2/capabilities/actions/useHeaderFold.js.map +1 -0
- package/dist/inquiry/v2/capabilities/actions/useHeaderFold.mjs +118 -0
- package/dist/inquiry/v2/capabilities/actions/useHeaderFold.mjs.map +1 -0
- package/dist/inquiry/v2/capabilities/actions/useSheetPanel.d.ts +25 -1
- package/dist/inquiry/v2/capabilities/actions/useSheetPanel.d.ts.map +1 -1
- package/dist/inquiry/v2/capabilities/actions/useSheetPanel.js +7 -4
- package/dist/inquiry/v2/capabilities/actions/useSheetPanel.js.map +1 -1
- package/dist/inquiry/v2/capabilities/actions/useSheetPanel.mjs +9 -4
- package/dist/inquiry/v2/capabilities/actions/useSheetPanel.mjs.map +1 -1
- package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.d.ts +5 -3
- package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.d.ts.map +1 -1
- package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.js +11 -8
- package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.js.map +1 -1
- package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.mjs +13 -7
- package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.mjs.map +1 -1
- package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.module.css +4 -4
- package/dist/inquiry/v2/capabilities/header/HeaderCapability.d.ts +1 -1
- package/dist/inquiry/v2/capabilities/header/HeaderCapability.d.ts.map +1 -1
- package/dist/inquiry/v2/capabilities/header/HeaderCapability.js +20 -17
- package/dist/inquiry/v2/capabilities/header/HeaderCapability.js.map +1 -1
- package/dist/inquiry/v2/capabilities/header/HeaderCapability.mjs +101 -111
- package/dist/inquiry/v2/capabilities/header/HeaderCapability.mjs.map +1 -1
- package/dist/inquiry/v2/capabilities/header/HeaderCapability.module.css +9 -6
- package/dist/inquiry/v2/capabilities/tabs/TabsCapability.d.ts +2 -1
- package/dist/inquiry/v2/capabilities/tabs/TabsCapability.d.ts.map +1 -1
- package/dist/inquiry/v2/capabilities/tabs/TabsCapability.js +9 -2
- package/dist/inquiry/v2/capabilities/tabs/TabsCapability.js.map +1 -1
- package/dist/inquiry/v2/capabilities/tabs/TabsCapability.mjs +18 -15
- package/dist/inquiry/v2/capabilities/tabs/TabsCapability.mjs.map +1 -1
- package/dist/inquiry/v2/index.d.ts +0 -1
- package/dist/inquiry/v2/index.d.ts.map +1 -1
- package/dist/inquiry/v2/index.js.map +1 -1
- package/dist/inquiry/v2/kernel/ActionRunnerContext.d.ts +3 -3
- package/dist/inquiry/v2/kernel/ActionRunnerContext.d.ts.map +1 -1
- package/dist/inquiry/v2/kernel/ActionRunnerContext.js +11 -5
- package/dist/inquiry/v2/kernel/ActionRunnerContext.js.map +1 -1
- package/dist/inquiry/v2/kernel/ActionRunnerContext.mjs +15 -12
- package/dist/inquiry/v2/kernel/ActionRunnerContext.mjs.map +1 -1
- package/dist/inquiry/v2/kernel/ReadOnlyContext.d.ts +3 -0
- package/dist/inquiry/v2/kernel/ReadOnlyContext.d.ts.map +1 -0
- package/dist/inquiry/v2/kernel/ReadOnlyContext.js +14 -0
- package/dist/inquiry/v2/kernel/ReadOnlyContext.js.map +1 -0
- package/dist/inquiry/v2/kernel/ReadOnlyContext.mjs +20 -0
- package/dist/inquiry/v2/kernel/ReadOnlyContext.mjs.map +1 -0
- package/dist/inquiry/v2/kernel/RecordContext.d.ts +2 -0
- package/dist/inquiry/v2/kernel/RecordContext.d.ts.map +1 -1
- package/dist/inquiry/v2/kernel/RecordContext.js.map +1 -1
- package/dist/inquiry/v2/kernel/RecordContext.mjs.map +1 -1
- package/dist/inquiry/v2/kernel/UdpNodeView.d.ts.map +1 -1
- package/dist/inquiry/v2/kernel/UdpNodeView.js +18 -13
- package/dist/inquiry/v2/kernel/UdpNodeView.js.map +1 -1
- package/dist/inquiry/v2/kernel/UdpNodeView.mjs +177 -140
- package/dist/inquiry/v2/kernel/UdpNodeView.mjs.map +1 -1
- package/dist/inquiry/v2/kernel/UdpNodeView.module.css +56 -5
- package/dist/inquiry/v2/kernel/capabilities.d.ts +0 -2
- package/dist/inquiry/v2/kernel/capabilities.d.ts.map +1 -1
- package/dist/inquiry/v2/kernel/capabilities.js.map +1 -1
- package/dist/inquiry/v2/kernel/capabilities.mjs.map +1 -1
- package/dist/inquiry/v2/landing/InquiryExplorePage.d.ts +26 -37
- package/dist/inquiry/v2/landing/InquiryExplorePage.d.ts.map +1 -1
- package/dist/inquiry/v2/landing/InquiryExplorePage.js +48 -57
- package/dist/inquiry/v2/landing/InquiryExplorePage.js.map +1 -1
- package/dist/inquiry/v2/landing/InquiryExplorePage.mjs +102 -106
- package/dist/inquiry/v2/landing/InquiryExplorePage.mjs.map +1 -1
- package/dist/inquiry/v2/landing/InquiryExplorePage.module.css +58 -6
- package/dist/inquiry/v2/landing/InquiryLanding.d.ts +3 -3
- package/dist/inquiry/v2/landing/InquiryLanding.d.ts.map +1 -1
- package/dist/inquiry/v2/landing/InquiryLanding.js +8 -3
- package/dist/inquiry/v2/landing/InquiryLanding.js.map +1 -1
- package/dist/inquiry/v2/landing/InquiryLanding.mjs +51 -35
- package/dist/inquiry/v2/landing/InquiryLanding.mjs.map +1 -1
- package/dist/inquiry/v2/landing/InquiryLanding.module.css +8 -0
- package/dist/inquiry/v2/page/UdpPageRenderer.d.ts +5 -1
- package/dist/inquiry/v2/page/UdpPageRenderer.d.ts.map +1 -1
- package/dist/inquiry/v2/page/UdpPageRenderer.js +13 -1
- package/dist/inquiry/v2/page/UdpPageRenderer.js.map +1 -1
- package/dist/inquiry/v2/page/UdpPageRenderer.mjs +36 -7
- package/dist/inquiry/v2/page/UdpPageRenderer.mjs.map +1 -1
- package/dist/inquiry/v2/search/InquirySearchPanel.d.ts +1 -7
- package/dist/inquiry/v2/search/InquirySearchPanel.d.ts.map +1 -1
- package/dist/inquiry/v2/search/InquirySearchPanel.js +6 -13
- package/dist/inquiry/v2/search/InquirySearchPanel.js.map +1 -1
- package/dist/inquiry/v2/search/InquirySearchPanel.mjs +4 -8
- package/dist/inquiry/v2/search/InquirySearchPanel.mjs.map +1 -1
- package/dist/inquiry/v2/search/RecordFinder.d.ts +30 -1
- package/dist/inquiry/v2/search/RecordFinder.d.ts.map +1 -1
- package/dist/inquiry/v2/search/RecordFinder.js +43 -20
- package/dist/inquiry/v2/search/RecordFinder.js.map +1 -1
- package/dist/inquiry/v2/search/RecordFinder.mjs +68 -42
- package/dist/inquiry/v2/search/RecordFinder.mjs.map +1 -1
- package/dist/inquiry/v2/search/index.d.ts +3 -3
- package/dist/inquiry/v2/search/index.d.ts.map +1 -1
- package/dist/inquiry/v2/search/index.js +1 -1
- package/dist/inquiry/v2/search/index.js.map +1 -1
- package/dist/inquiry/v2/search/searchModel.d.ts +130 -23
- package/dist/inquiry/v2/search/searchModel.d.ts.map +1 -1
- package/dist/inquiry/v2/search/searchModel.js +237 -36
- package/dist/inquiry/v2/search/searchModel.js.map +1 -1
- package/dist/inquiry/v2/search/searchModel.mjs +207 -34
- package/dist/inquiry/v2/search/searchModel.mjs.map +1 -1
- package/dist/inquiry/v2/search/useInquirySearch.d.ts.map +1 -1
- package/dist/inquiry/v2/search/useInquirySearch.js +46 -19
- package/dist/inquiry/v2/search/useInquirySearch.js.map +1 -1
- package/dist/inquiry/v2/search/useInquirySearch.mjs +83 -84
- package/dist/inquiry/v2/search/useInquirySearch.mjs.map +1 -1
- package/dist/inquiry/v2/tree/InquiryFluentTreeMenu.d.ts +4 -1
- package/dist/inquiry/v2/tree/InquiryFluentTreeMenu.d.ts.map +1 -1
- package/dist/inquiry/v2/tree/InquiryFluentTreeMenu.js +174 -166
- package/dist/inquiry/v2/tree/InquiryFluentTreeMenu.js.map +1 -1
- package/dist/inquiry/v2/tree/InquiryFluentTreeMenu.mjs +343 -325
- package/dist/inquiry/v2/tree/InquiryFluentTreeMenu.mjs.map +1 -1
- package/dist/inquiry/v2/tree/InquiryMenuToolbar.d.ts +3 -1
- package/dist/inquiry/v2/tree/InquiryMenuToolbar.d.ts.map +1 -1
- package/dist/inquiry/v2/tree/InquiryMenuToolbar.js +8 -7
- package/dist/inquiry/v2/tree/InquiryMenuToolbar.js.map +1 -1
- package/dist/inquiry/v2/tree/InquiryMenuToolbar.mjs +68 -72
- package/dist/inquiry/v2/tree/InquiryMenuToolbar.mjs.map +1 -1
- package/dist/inquiry/v2/tree/LoadRecordDialog.d.ts +3 -3
- package/dist/inquiry/v2/tree/LoadRecordDialog.d.ts.map +1 -1
- package/dist/inquiry/v2/tree/LoadRecordDialog.js +12 -7
- package/dist/inquiry/v2/tree/LoadRecordDialog.js.map +1 -1
- package/dist/inquiry/v2/tree/LoadRecordDialog.mjs +48 -33
- package/dist/inquiry/v2/tree/LoadRecordDialog.mjs.map +1 -1
- package/dist/inquiry/v2/tree/NodeList.d.ts.map +1 -1
- package/dist/inquiry/v2/tree/NodeList.js +17 -6
- package/dist/inquiry/v2/tree/NodeList.js.map +1 -1
- package/dist/inquiry/v2/tree/NodeList.mjs +49 -36
- package/dist/inquiry/v2/tree/NodeList.mjs.map +1 -1
- package/dist/inquiry/v2/tree/arrivalModel.d.ts +15 -0
- package/dist/inquiry/v2/tree/arrivalModel.d.ts.map +1 -1
- package/dist/inquiry/v2/tree/arrivalModel.js +14 -1
- package/dist/inquiry/v2/tree/arrivalModel.js.map +1 -1
- package/dist/inquiry/v2/tree/arrivalModel.mjs +12 -1
- package/dist/inquiry/v2/tree/arrivalModel.mjs.map +1 -1
- package/dist/inquiry/v2/tree/branchRefreshModel.d.ts +32 -0
- package/dist/inquiry/v2/tree/branchRefreshModel.d.ts.map +1 -0
- package/dist/inquiry/v2/tree/branchRefreshModel.js +62 -0
- package/dist/inquiry/v2/tree/branchRefreshModel.js.map +1 -0
- package/dist/inquiry/v2/tree/branchRefreshModel.mjs +60 -0
- package/dist/inquiry/v2/tree/branchRefreshModel.mjs.map +1 -0
- package/dist/inquiry/v2/tree/droppedPageModel.d.ts +23 -1
- package/dist/inquiry/v2/tree/droppedPageModel.d.ts.map +1 -1
- package/dist/inquiry/v2/tree/droppedPageModel.js +53 -26
- package/dist/inquiry/v2/tree/droppedPageModel.js.map +1 -1
- package/dist/inquiry/v2/tree/droppedPageModel.mjs +48 -20
- package/dist/inquiry/v2/tree/droppedPageModel.mjs.map +1 -1
- package/dist/inquiry/v2/tree/fluentTreeMenu/treeMenuVisuals.d.ts +7 -12
- package/dist/inquiry/v2/tree/fluentTreeMenu/treeMenuVisuals.d.ts.map +1 -1
- package/dist/inquiry/v2/tree/fluentTreeMenu/treeMenuVisuals.js +44 -15
- package/dist/inquiry/v2/tree/fluentTreeMenu/treeMenuVisuals.js.map +1 -1
- package/dist/inquiry/v2/tree/fluentTreeMenu/treeMenuVisuals.mjs +34 -15
- package/dist/inquiry/v2/tree/fluentTreeMenu/treeMenuVisuals.mjs.map +1 -1
- package/dist/inquiry/v2/tree/fluentTreeMenu/useAggregateBadges.d.ts.map +1 -1
- package/dist/inquiry/v2/tree/fluentTreeMenu/useAggregateBadges.js +7 -18
- package/dist/inquiry/v2/tree/fluentTreeMenu/useAggregateBadges.js.map +1 -1
- package/dist/inquiry/v2/tree/fluentTreeMenu/useAggregateBadges.mjs +6 -14
- package/dist/inquiry/v2/tree/fluentTreeMenu/useAggregateBadges.mjs.map +1 -1
- package/dist/inquiry/v2/tree/fluentTreeMenu/useChildCountBadges.d.ts +20 -16
- package/dist/inquiry/v2/tree/fluentTreeMenu/useChildCountBadges.d.ts.map +1 -1
- package/dist/inquiry/v2/tree/fluentTreeMenu/useChildCountBadges.js +77 -55
- package/dist/inquiry/v2/tree/fluentTreeMenu/useChildCountBadges.js.map +1 -1
- package/dist/inquiry/v2/tree/fluentTreeMenu/useChildCountBadges.mjs +85 -106
- package/dist/inquiry/v2/tree/fluentTreeMenu/useChildCountBadges.mjs.map +1 -1
- package/dist/inquiry/v2/tree/lineageModel.d.ts +18 -1
- package/dist/inquiry/v2/tree/lineageModel.d.ts.map +1 -1
- package/dist/inquiry/v2/tree/lineageModel.js +71 -2
- package/dist/inquiry/v2/tree/lineageModel.js.map +1 -1
- package/dist/inquiry/v2/tree/lineageModel.mjs +53 -3
- package/dist/inquiry/v2/tree/lineageModel.mjs.map +1 -1
- package/dist/inquiry/v2/tree/menuRebuildModel.d.ts +10 -27
- package/dist/inquiry/v2/tree/menuRebuildModel.d.ts.map +1 -1
- package/dist/inquiry/v2/tree/menuRebuildModel.js +8 -58
- package/dist/inquiry/v2/tree/menuRebuildModel.js.map +1 -1
- package/dist/inquiry/v2/tree/menuRebuildModel.mjs +8 -51
- package/dist/inquiry/v2/tree/menuRebuildModel.mjs.map +1 -1
- package/dist/inquiry/v2/tree/pagedChildrenModel.d.ts +26 -0
- package/dist/inquiry/v2/tree/pagedChildrenModel.d.ts.map +1 -0
- package/dist/inquiry/v2/tree/pagedChildrenModel.js +56 -0
- package/dist/inquiry/v2/tree/pagedChildrenModel.js.map +1 -0
- package/dist/inquiry/v2/tree/pagedChildrenModel.mjs +43 -0
- package/dist/inquiry/v2/tree/pagedChildrenModel.mjs.map +1 -0
- package/dist/inquiry/v2/tree/rootRemovalModel.d.ts +7 -0
- package/dist/inquiry/v2/tree/rootRemovalModel.d.ts.map +1 -1
- package/dist/inquiry/v2/tree/rootRemovalModel.js +31 -5
- package/dist/inquiry/v2/tree/rootRemovalModel.js.map +1 -1
- package/dist/inquiry/v2/tree/rootRemovalModel.mjs +21 -4
- package/dist/inquiry/v2/tree/rootRemovalModel.mjs.map +1 -1
- package/dist/inquiry/v2/tree/treeFilterModel.d.ts +0 -2
- package/dist/inquiry/v2/tree/treeFilterModel.d.ts.map +1 -1
- package/dist/inquiry/v2/tree/treeFilterModel.js +0 -7
- package/dist/inquiry/v2/tree/treeFilterModel.js.map +1 -1
- package/dist/inquiry/v2/tree/treeFilterModel.mjs.map +1 -1
- package/dist/inquiry/v2/tree/useInquiryMenu.d.ts +16 -7
- package/dist/inquiry/v2/tree/useInquiryMenu.d.ts.map +1 -1
- package/dist/inquiry/v2/tree/useInquiryMenu.js +401 -163
- package/dist/inquiry/v2/tree/useInquiryMenu.js.map +1 -1
- package/dist/inquiry/v2/tree/useInquiryMenu.mjs +511 -310
- package/dist/inquiry/v2/tree/useInquiryMenu.mjs.map +1 -1
- package/dist/inquiry/v2/tree/waveLoader.d.ts +10 -11
- package/dist/inquiry/v2/tree/waveLoader.d.ts.map +1 -1
- package/dist/inquiry/v2/tree/waveLoader.js +78 -72
- package/dist/inquiry/v2/tree/waveLoader.js.map +1 -1
- package/dist/inquiry/v2/tree/waveLoader.mjs +79 -68
- package/dist/inquiry/v2/tree/waveLoader.mjs.map +1 -1
- package/dist/inquiry/v2/widgets/listRow.module.css +27 -0
- package/dist/inquiry/v2/widgets/widgetRowModel.d.ts +6 -2
- package/dist/inquiry/v2/widgets/widgetRowModel.d.ts.map +1 -1
- package/dist/inquiry/v2/widgets/widgetRowModel.js +49 -14
- package/dist/inquiry/v2/widgets/widgetRowModel.js.map +1 -1
- package/dist/inquiry/v2/widgets/widgetRowModel.mjs +36 -12
- package/dist/inquiry/v2/widgets/widgetRowModel.mjs.map +1 -1
- package/dist/maintenance/UdpTaggedRecordsPage.mjs +1 -1
- package/dist/maintenance/api/lookupApi.mjs +1 -1
- package/dist/maintenance/api/tagsApi.mjs +1 -1
- package/dist/maintenance/config/nodeDefaults.d.ts.map +1 -1
- package/dist/maintenance/config/nodeDefaults.js +16 -5
- package/dist/maintenance/config/nodeDefaults.js.map +1 -1
- package/dist/maintenance/config/nodeDefaults.mjs +14 -5
- package/dist/maintenance/config/nodeDefaults.mjs.map +1 -1
- package/dist/maintenance/config/useEntityConfig.mjs +1 -1
- package/dist/maintenance/config/useLinkedLabels.mjs +1 -1
- package/dist/maintenance/grid/MaintenanceGrid.mjs +1 -1
- package/dist/maintenance/metadata/useEntityMetadata.mjs +1 -1
- package/dist/maintenance/record/ChildTab.mjs +1 -1
- package/dist/maintenance/record/DeleteRecordDialog.mjs +1 -1
- package/dist/maintenance/record/LinkRecordsSheet.mjs +1 -1
- package/dist/maintenance/record/RecordFacts.mjs +1 -1
- package/dist/maintenance/record/RecordSheet.mjs +2 -2
- package/dist/maintenance/record/displayValue.mjs +1 -1
- package/dist/maintenance/record/stampDisplayText.mjs +1 -1
- package/dist/maintenance/settings/UdpEntitySettingsPage.d.ts.map +1 -1
- package/dist/maintenance/settings/UdpEntitySettingsPage.js +3 -0
- package/dist/maintenance/settings/UdpEntitySettingsPage.js.map +1 -1
- package/dist/maintenance/settings/UdpEntitySettingsPage.mjs +2 -0
- package/dist/maintenance/settings/UdpEntitySettingsPage.mjs.map +1 -1
- package/dist/maintenance/settings/useEntityCatalog.mjs +1 -1
- package/dist/maintenanceEngine/tableBrowser/TableColumnDefs.d.ts +4 -5
- package/dist/maintenanceEngine/tableBrowser/TableColumnDefs.d.ts.map +1 -1
- package/dist/page/PageContainer/PageContainer.d.ts.map +1 -1
- package/dist/page/PageContainer/PageContainer.js +4 -11
- package/dist/page/PageContainer/PageContainer.js.map +1 -1
- package/dist/page/PageContainer/PageContainer.mjs +39 -50
- package/dist/page/PageContainer/PageContainer.mjs.map +1 -1
- package/dist/stores/inquiryStore.d.ts +2 -1
- package/dist/stores/inquiryStore.d.ts.map +1 -1
- package/dist/stores/inquiryStore.js +4 -3
- package/dist/stores/inquiryStore.js.map +1 -1
- package/dist/stores/inquiryStore.mjs +18 -11
- package/dist/stores/inquiryStore.mjs.map +1 -1
- package/dist/udp/extraFields/useExtraFieldsGridConfig.d.ts +3 -2
- package/dist/udp/extraFields/useExtraFieldsGridConfig.d.ts.map +1 -1
- package/dist/udp/extraFields/useExtraFieldsGridConfig.js +7 -6
- package/dist/udp/extraFields/useExtraFieldsGridConfig.js.map +1 -1
- package/dist/udp/extraFields/useExtraFieldsGridConfig.mjs +27 -22
- package/dist/udp/extraFields/useExtraFieldsGridConfig.mjs.map +1 -1
- package/dist/udp/fileImportMapping/FileImportMappingWizard.d.ts.map +1 -1
- package/dist/udp/fileImportMapping/FileImportMappingWizard.js +4 -4
- package/dist/udp/fileImportMapping/FileImportMappingWizard.js.map +1 -1
- package/dist/udp/fileImportMapping/FileImportMappingWizard.mjs +10 -9
- package/dist/udp/fileImportMapping/FileImportMappingWizard.mjs.map +1 -1
- package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.d.ts.map +1 -1
- package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.js +1 -1
- package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.js.map +1 -1
- package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.mjs +2 -1
- package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.mjs.map +1 -1
- package/dist/udp/pages/UdpMaintenanceEnginePage/components/EntitiyTimeLine.mjs +1 -1
- package/dist/udp/pages/UdpTransactionsPage/components/DynamicTransactionDomainForm.d.ts.map +1 -1
- package/dist/udp/pages/UdpTransactionsPage/components/DynamicTransactionDomainForm.js +84 -27
- package/dist/udp/pages/UdpTransactionsPage/components/DynamicTransactionDomainForm.js.map +1 -1
- package/dist/udp/pages/UdpTransactionsPage/components/DynamicTransactionDomainForm.mjs +53 -23
- package/dist/udp/pages/UdpTransactionsPage/components/DynamicTransactionDomainForm.mjs.map +1 -1
- package/dist/udp/pages/UdpTransactionsPage/components/DynamicTransactionDomainFormFields.d.ts.map +1 -1
- package/dist/udp/pages/UdpTransactionsPage/components/DynamicTransactionDomainFormFields.js +45 -32
- package/dist/udp/pages/UdpTransactionsPage/components/DynamicTransactionDomainFormFields.js.map +1 -1
- package/dist/udp/pages/UdpTransactionsPage/components/DynamicTransactionDomainFormFields.mjs +27 -33
- package/dist/udp/pages/UdpTransactionsPage/components/DynamicTransactionDomainFormFields.mjs.map +1 -1
- package/dist/udp/pages/UdpTranslationsPage/UdpTranslationsPage.d.ts.map +1 -1
- package/dist/udp/pages/UdpTranslationsPage/UdpTranslationsPage.js +14 -16
- package/dist/udp/pages/UdpTranslationsPage/UdpTranslationsPage.js.map +1 -1
- package/dist/udp/pages/UdpTranslationsPage/UdpTranslationsPage.mjs +2 -4
- package/dist/udp/pages/UdpTranslationsPage/UdpTranslationsPage.mjs.map +1 -1
- package/dist/udp/utilities/useDateStringColumnDef.d.ts +1 -1
- package/dist/utilities/i18n/locales/es-US.json +24 -9
- package/dist/utilities/i18n/locales/es-US.mjs +25 -8
- package/dist/utilities/i18n/locales/fr-CA.json +24 -9
- package/dist/utilities/i18n/locales/fr-CA.mjs +25 -8
- package/dist/utilities/tree/TreeUtilities.d.ts +10 -10
- package/dist/utilities/tree/TreeUtilities.d.ts.map +1 -1
- package/dist/utilities/tree/TreeUtilities.js +41 -58
- package/dist/utilities/tree/TreeUtilities.js.map +1 -1
- package/dist/utilities/tree/TreeUtilities.mjs +32 -41
- package/dist/utilities/tree/TreeUtilities.mjs.map +1 -1
- package/dist/utilities/tree/lazyLevels.d.ts +32 -0
- package/dist/utilities/tree/lazyLevels.d.ts.map +1 -0
- package/dist/utilities/tree/lazyLevels.js +25 -0
- package/dist/utilities/tree/lazyLevels.js.map +1 -0
- package/dist/utilities/tree/lazyLevels.mjs +16 -0
- package/dist/utilities/tree/lazyLevels.mjs.map +1 -0
- package/dist/utilities/types.d.ts +4 -4
- package/dist/utilities/types.d.ts.map +1 -1
- package/package.json +62 -18
- package/dist/actionPanels/PanelActionForm.d.ts +0 -56
- package/dist/actionPanels/PanelActionForm.d.ts.map +0 -1
- package/dist/actionPanels/PanelActionForm.js +0 -30
- package/dist/actionPanels/PanelActionForm.js.map +0 -1
- package/dist/actionPanels/PanelActionForm.mjs +0 -168
- package/dist/actionPanels/PanelActionForm.mjs.map +0 -1
- package/dist/actionPanels/PanelEditor.d.ts +0 -44
- package/dist/actionPanels/PanelEditor.d.ts.map +0 -1
- package/dist/actionPanels/PanelEditor.js +0 -78
- package/dist/actionPanels/PanelEditor.js.map +0 -1
- package/dist/actionPanels/PanelEditor.mjs +0 -345
- package/dist/actionPanels/PanelEditor.mjs.map +0 -1
- package/dist/actionPanels/panelActionFields.module.css +0 -18
- package/dist/domain/inquiryTree/ruleBindings.d.ts +0 -10
- package/dist/domain/inquiryTree/ruleBindings.d.ts.map +0 -1
- package/dist/domain/inquiryTree/ruleBindings.js +0 -20
- package/dist/domain/inquiryTree/ruleBindings.js.map +0 -1
- package/dist/domain/inquiryTree/ruleBindings.mjs +0 -21
- package/dist/domain/inquiryTree/ruleBindings.mjs.map +0 -1
- package/dist/inquiry/v2/kernel/readOnlyModel.d.ts +0 -17
- package/dist/inquiry/v2/kernel/readOnlyModel.d.ts.map +0 -1
- package/dist/inquiry/v2/kernel/readOnlyModel.js +0 -19
- package/dist/inquiry/v2/kernel/readOnlyModel.js.map +0 -1
- package/dist/inquiry/v2/kernel/readOnlyModel.mjs +0 -21
- package/dist/inquiry/v2/kernel/readOnlyModel.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.mjs","names":["useEffect","useMemo","keepPreviousData","QueryClient","useQuery","useQueryClient","UseQueryResult","apiGet","ConfigService","normalizePageDocument","PageDocument","PageWire","CatalogObject","PromotedEntity","getSearchObject","Search","executeQueryAdHoc","executeQueryAdHocUntyped","executeQueryInstance","executeQueryInstanceUntyped","executeQueryWithParameters","executeQueryWithParametersUntyped","apiMutate","toLowerFirstChar","LogicalSearchOperatorEnums","UdpEnums","composeInstanceSearchFilters","instanceFiltersHash","InstanceBodyFilters","data","Record","apiMethodId","Promise","status","pageList","Array","total","lookupsMap","LookupsMap","LookupWire","apiMethodInstanceId","aggregateResults","PromotedMethodRef","pathParameters","pageId","PromotedMethodEntity","entityName","unityBaseCreateMethod","unityBaseUpdateMethod","unityBaseDeleteMethod","unityBaseGetMethod","unityBaseSearchMethod","EntityMeta","attributes","promoted","fetchEntityMeta","queryClient","catalogId","fetchQuery","queryKey","inquiryKeys","entityMeta","staleTime","queryFn","productId","config","UNITY_PRODUCT_ID","apiGetOrNull","baseURL","url","T","catalogObjectPromise","properties","integrationV2ApiUrl","promotedPromise","integrationV1ApiUrl","catalogObject","executeSearchQuery","searchBody","signal","AbortSignal","RecordRows","response","rows","executeApiMethodWithParameters","body","startWorkflow","workflowId","payload","builderV1ApiUrl","method","ApiMethodDefinition","name","pathParametersDefinition","key","fetchApiMethod","apiMethod","fetchApiMethodsByIds","apiMethodIds","CONFIG_STALE_TIME","tree","treeId","const","catalogBinding","tenantId","catalog","promotedEntities","page","record","recordKey","records","searchHash","recordByIdentifiers","filterElements","JSON","stringify","map","element","searchField","searchValue","childBatch","bodyHash","entityForm","lookupMethod","lookup","lookupId","alert","alertId","action","actionId","aggregateThresholdValue","aggregateThresholdId","bulkChildCount","requestKey","keyValue","aggregateThreshold","recentlyLoaded","userId","aggregateBadge","paramsKey","invalidateInquiryRowData","invalidateQueries","AlertConfig","useAlert","$","_c","t0","t1","t2","tenantV1ApiUrl","t3","enabled","fetchAction","AggregateThresholdValue","threshold","value","fetchAggregateThresholdValue","params","retry","aggregateKey","raw","Math","round","useAggregateThresholdValue","InquiryTreeWire","treeStructure","apiMethodInstance","apiCatalogId","returnObject","product","explorePageId","useInquiryTree","fetchInquiryTree","RecentlyLoadedNode","inquiryTreeId","dateLoaded","nodeDetails","nodeLabel","catalogReturnObject","treeStructureId","queryPayload","useRecentlyLoadedNodes","recordRecentlyLoadedNode","label","recordRecentlyLoadedNodes","entries","RecentlyLoadedWriteEntry","filter","entry","length","useApiCatalogBinding","usePromotedMethodEntities","undefined","String","t4","useTreeCatalogObjects","LookupsMapEntry","lookupKeyName","lookupValueName","keyName","valueName","udpLookupUdpLookupKey","LookupTable","keyNames","lookupMethodQueryOptions","methods","Udp_Lookup","unityBaseGetDataMethod","fetchLookupGetDataMethodId","usePrefetchLookupMethod","prefetchQuery","fetchLookupTable","id","keyString","stampLookupValues","configs","Object","flatMap","attribute","tables","Map","all","from","Set","set","compositeKey","row","keys","indexes","indexFor","table","multiKey","indexId","index","get","lookupRow","has","stamped","match","text","deriveLookupsMap","catalogObjects","find","candidate","catalogObjectName","property","extended","extendedProperties","NestedEntityMap","stampNestedLookupValues","nestedEntities","entities","lookupsByKey","fromEntries","stampRows","source","walk","levels","nested","nestedRows","isArray","every","child","next","level","LookupStampContext","stampRecordRows","context","responseLookupsMap","useRootRecords","instanceFilters","identifierFilters","pageSize","filtersHash","_temp","entryHash","t5","t6","searchFilterElements","searchFilterGroups","search","And","orderElements","_temp2","t7","t8","placeholderData","networkMode","fetchRecordByIdentifiers","lookupContext","fetchRecordsByIdentifierSets","identifierSets","sets","groupId","filterGroups","_","parentGroupId","logicalSearchOperator","Parameters","Or","fetchChildRows","usePageDocument","select","order"],"sources":["../../../../src/inquiry/v2/api/queries.ts"],"sourcesContent":["/**\n * Inquiry v2 canonical query keys + typed fetch hooks\n * (inquiry-v2-architecture.md §5). Every capability — and the copilot — reads\n * through these keys, so two pieces needing the same data share one request\n * and one cache entry. Mutations refresh the UI by invalidating these keys;\n * there is no other refresh mechanism.\n */\nimport { useEffect, useMemo } from 'react';\nimport {\n keepPreviousData,\n type QueryClient,\n useQuery,\n useQueryClient,\n UseQueryResult\n} from '@tanstack/react-query';\nimport { apiGet } from '../../../utilities/apiClient';\nimport { ConfigService } from '../../../configService';\nimport {\n normalizePageDocument,\n PageDocument,\n PageWire\n} from '../../../domain/page';\nimport type {\n CatalogObject,\n PromotedEntity\n} from '../../../domain/inquiryTree';\nimport { getSearchObject } from '../../../utilities/search/SearchUtilities';\nimport type { Search } from '../../../utilities/search/Search';\nimport {\n executeQueryAdHoc as executeQueryAdHocUntyped,\n executeQueryInstance as executeQueryInstanceUntyped,\n executeQueryWithParameters as executeQueryWithParametersUntyped\n} from '../../../udp/utilities/methodUtils';\nimport { apiMutate } from '../../../utilities/useAxiosMutate';\nimport { toLowerFirstChar } from '../../../utilities/input/StringUtilities';\nimport {\n LogicalSearchOperatorEnums,\n UdpEnums\n} from '../../../enums/unitySystemEnums';\nimport {\n composeInstanceSearchFilters,\n instanceFiltersHash,\n InstanceBodyFilters\n} from './instanceBodyModel';\n\n/** Typed boundary over the JS ad hoc executor. */\nconst executeQueryAdHoc = executeQueryAdHocUntyped as unknown as (\n data: { data: Search | Record<string, unknown> },\n apiMethodId: string\n) => Promise<{\n status: number;\n data?: {\n pageList?: Array<Record<string, unknown>>;\n total?: number;\n lookupsMap?: LookupsMap;\n };\n}>;\n\n/** Typed boundary over the JS parameterised executor (lookup get-data). */\nconst executeQueryWithParameters =\n executeQueryWithParametersUntyped as unknown as (\n data: { data: Record<string, unknown> },\n apiMethodId: string\n ) => Promise<{ status?: number; data?: LookupWire }>;\n\n/** Typed boundary over the JS aggregate executor. */\nconst executeQueryInstance = executeQueryInstanceUntyped as unknown as (\n data: { data: Record<string, unknown> },\n apiMethodInstanceId: string\n) => Promise<{\n status?: number;\n data?: { aggregateResults?: Array<Record<string, number>> };\n}>;\n\nexport interface PromotedMethodRef {\n apiMethodId?: string;\n pathParameters?: string;\n pageId?: string;\n}\n\nexport interface PromotedMethodEntity {\n entityName?: string;\n unityBaseCreateMethod?: PromotedMethodRef;\n unityBaseUpdateMethod?: PromotedMethodRef;\n unityBaseDeleteMethod?: PromotedMethodRef;\n unityBaseGetMethod?: PromotedMethodRef;\n unityBaseSearchMethod?: PromotedMethodRef;\n}\n\nexport interface EntityMeta {\n entityName: string;\n /** catalogObject properties (attributes) — [] when unavailable. */\n attributes: Array<Record<string, unknown>>;\n /** Promoted CRUD methods — null when the entity has none. */\n promoted: PromotedMethodEntity | null;\n}\n\n/**\n * One cached resolver for everything an action needs to know about an entity\n * (catalog attributes + promoted CRUD methods). Replaces the legacy\n * per-click catalogObject/promotedMethodEntities waterfall.\n */\nexport const fetchEntityMeta = async (\n queryClient: QueryClient,\n catalogId: string,\n entityName: string\n): Promise<EntityMeta> =>\n queryClient.fetchQuery({\n queryKey: inquiryKeys.entityMeta(entityName),\n staleTime: 30 * 60 * 1000,\n queryFn: async () => {\n const productId = ConfigService.config.UNITY_PRODUCT_ID;\n const apiGetOrNull = async <T,>(\n baseURL: string,\n url: string\n ): Promise<T | null> => {\n try {\n return (await apiGet(baseURL, url)) as T;\n } catch {\n return null;\n }\n };\n const catalogObjectPromise = apiGetOrNull<{\n properties?: Array<Record<string, unknown>>;\n }>(\n ConfigService.integrationV2ApiUrl,\n `apiCatalog/${catalogId}/catalogObject/${entityName}`\n );\n const promotedPromise = apiGetOrNull<PromotedMethodEntity>(\n ConfigService.integrationV1ApiUrl,\n `apicatalog/${catalogId}/promotedMethodEntities/${entityName}/product/${productId}`\n );\n const catalogObject = await catalogObjectPromise;\n const promoted = await promotedPromise;\n return {\n entityName,\n attributes: catalogObject?.properties ?? [],\n promoted\n };\n }\n });\n\n/**\n * The search-as-you-type fetch boundary (inquiry-v2-architecture.md §5.2):\n * the routed ad hoc executor (direct-if-eligible, else Integration) with\n * TanStack's AbortSignal threaded through, so a superseded keystroke's request\n * is truly aborted.\n */\nexport const executeSearchQuery = async (\n apiMethodId: string,\n searchBody: unknown,\n signal?: AbortSignal\n): Promise<RecordRows> => {\n const response = (await executeQueryAdHocUntyped(\n { data: searchBody },\n apiMethodId,\n '',\n { signal }\n )) as { status?: number; data?: { pageList?: Array<Record<string, unknown>>; total?: number } };\n return {\n rows: response.data?.pageList ?? [],\n total: response.data?.total ?? 0\n };\n};\n\n/** The routed executeQueryWithParameters (typed boundary). */\nexport const executeApiMethodWithParameters = async (\n apiMethodId: string,\n body: Record<string, unknown>\n): Promise<{ status: number; data?: unknown }> =>\n executeQueryWithParametersUntyped({ data: body }, apiMethodId) as Promise<{\n status: number;\n data?: unknown;\n }>;\n\n/**\n * POST workflow/{id}/start on the Builder API — v1's executeStartWorkflow\n * (actions/utils/actionUtils.js:32-40): the record is the body, and the new\n * play's id comes back as the response data.\n */\nexport const startWorkflow = async (\n workflowId: string,\n payload: Record<string, unknown>\n): Promise<{ status: number; data?: unknown }> =>\n apiMutate(\n ConfigService.builderV1ApiUrl,\n `workflow/${workflowId}/start`,\n { method: 'post' },\n { data: payload }\n ) as Promise<{ status: number; data?: unknown }>;\n\n/** An api-method definition (name, path-parameter spec) — config-shaped. */\nexport interface ApiMethodDefinition {\n apiMethodId?: string;\n name?: string;\n pathParametersDefinition?: unknown;\n [key: string]: unknown;\n}\n\n/**\n * GET apimethod/{id}, cached hard — Execute API needs the method's\n * path-parameter definition to lift path params off the record (v1 refetched\n * it on every click).\n */\nexport const fetchApiMethod = async (\n queryClient: QueryClient,\n apiMethodId: string\n): Promise<ApiMethodDefinition | null> =>\n queryClient.fetchQuery({\n queryKey: inquiryKeys.apiMethod(apiMethodId),\n staleTime: 30 * 60 * 1000,\n queryFn: async () => {\n try {\n return await apiGet<ApiMethodDefinition>(\n ConfigService.integrationV1ApiUrl,\n `apimethod/${apiMethodId}`\n );\n } catch {\n return null;\n }\n }\n });\n\n/**\n * Bulk api-method lookup for drop-to-Execute-API: the drop dialog lists the\n * methods behind the target's On_Node_Drop actions (v1 wire contract —\n * POST apiMethod/listByApiCatalogIdAndIds/{catalogId} with the id array).\n */\nexport const fetchApiMethodsByIds = async (\n catalogId: string,\n apiMethodIds: string[]\n): Promise<ApiMethodDefinition[]> => {\n const response = (await apiMutate(\n ConfigService.integrationV2ApiUrl,\n `apiMethod/listByApiCatalogIdAndIds/${catalogId}`,\n { method: 'post' },\n { data: apiMethodIds }\n )) as { data?: ApiMethodDefinition[] };\n return response.data ?? [];\n};\n\n/** Config documents change on builder saves, not per interaction. */\nexport const CONFIG_STALE_TIME = 10 * 60 * 1000;\n\nexport const inquiryKeys = {\n tree: (treeId: string) => ['inquiry', 'tree', treeId] as const,\n catalogBinding: (tenantId: string) =>\n ['inquiry', 'catalogBinding', tenantId] as const,\n catalog: (catalogId: string, treeId: string) =>\n ['inquiry', 'catalog', catalogId, treeId] as const,\n promotedEntities: (catalogId: string, productId: string) =>\n ['inquiry', 'promotedEntities', catalogId, productId] as const,\n page: (pageId: string) => ['page', pageId] as const,\n record: (entityName: string, recordKey: string) =>\n ['record', entityName, recordKey] as const,\n records: (entityName: string, searchHash: string) =>\n ['records', entityName, searchHash] as const,\n /** One record fetched by its identifier `=` filters (search → load record). */\n recordByIdentifiers: (\n entityName: string,\n filterElements: Array<Record<string, unknown>>\n ) =>\n [\n 'records',\n entityName,\n 'byId',\n JSON.stringify(\n filterElements.map((element) => [\n element.searchField,\n element.searchValue\n ])\n )\n ] as const,\n /**\n * One child-level fetch — a wave's batched `parentFK IN (…)` request or a\n * lazy expand's single-parent one, which is the SAME request with one value.\n * Keyed by the method and the exact body, so a re-expand (or a second wave\n * over the same parents) is answered from cache without a network hop.\n */\n childBatch: (apiMethodId: string, bodyHash: string) =>\n ['inquiry', 'childBatch', apiMethodId, bodyHash] as const,\n entityMeta: (entityName: string) => ['entityMeta', entityName] as const,\n /**\n * The default entity form's assembled inputs — the entity's UdpObjectFieldInfo\n * rows, the attributes ordered by them, and the option lists behind its\n * foreign-key fields. Config-shaped, so one assembly serves every open of the\n * sheet for that entity.\n */\n entityForm: (entityName: string) =>\n ['inquiry', 'entityForm', entityName] as const,\n lookupMethod: (catalogId: string) => ['lookupMethod', catalogId] as const,\n lookup: (lookupId: string) => ['lookup', lookupId] as const,\n apiMethod: (apiMethodId: string) => ['apiMethod', apiMethodId] as const,\n alert: (alertId: string) => ['alert', alertId] as const,\n action: (actionId: string) => ['action', actionId] as const,\n aggregateThresholdValue: (aggregateThresholdId: string) =>\n ['aggregateThresholdValue', aggregateThresholdId] as const,\n /** One bulk child-count cell: (child method × parent-ref field × filter) × parent value. */\n bulkChildCount: (requestKey: string, keyValue: string) =>\n ['inquiry', 'bulkChildCount', requestKey, keyValue] as const,\n /** An aggregate-threshold definition (config — shared by menu badges and the node view). */\n aggregateThreshold: (aggregateThresholdId: string) =>\n ['inquiry', 'aggregateThreshold', aggregateThresholdId] as const,\n /** One user's recently-loaded-record history for one tree (server-held). */\n recentlyLoaded: (treeId: string, userId: string) =>\n ['inquiry', 'recentlyLoaded', treeId, userId] as const,\n /** A tree row's aggregate-threshold badge: threshold × the row's param values. */\n aggregateBadge: (aggregateThresholdId: string, paramsKey: string) =>\n ['inquiry', 'aggregateBadge', aggregateThresholdId, paramsKey] as const\n};\n\n/**\n * THE refresh mechanism for everything a mutation over the tree can change.\n *\n * Tree ROW data lives under four key families, and a refresh that misses any of\n * them leaves part of the tree stale: `['records', …]` (the root page, and the\n * by-identifier reads the Load flow caches), `['inquiry','childBatch', …]`\n * (every eager wave and lazy expand), plus the two badge families the rows\n * carry. The tree CONFIG (`['inquiry','tree', …]`) is deliberately NOT here —\n * it changes on a Tree Builder save, never on a record mutation, and\n * invalidating it would refetch the whole tree document on every create.\n */\nexport const invalidateInquiryRowData = (\n queryClient: QueryClient\n): void => {\n for (const queryKey of [\n ['records'],\n ['inquiry', 'childBatch'],\n ['inquiry', 'bulkChildCount'],\n ['inquiry', 'aggregateBadge']\n ]) {\n void queryClient.invalidateQueries({ queryKey });\n }\n};\n\n/** An alert config (aggregate-threshold bearing) behind a node-level alert. */\nexport interface AlertConfig {\n aggregateThresholdId?: string;\n [key: string]: unknown;\n}\n\n/**\n * Fetch a node-level alert config (`alert/{alertId}`, tenant v1 — the legacy\n * UdpAlert source). Config data, cached hard; failures surface as no data so\n * the alert chip simply doesn't render.\n */\nexport const useAlert = (\n alertId: string | null | undefined\n): UseQueryResult<AlertConfig> =>\n useQuery({\n queryKey: inquiryKeys.alert(alertId ?? ''),\n queryFn: ({ signal }) =>\n apiGet<AlertConfig>(ConfigService.tenantV1ApiUrl, `alert/${alertId}`, {\n signal\n }),\n enabled: !!alertId,\n staleTime: CONFIG_STALE_TIME\n });\n\n/**\n * Fetch an action definition by id (`action/{actionId}`, integration v1 — the\n * legacy useActions.executeGetAction source). Only actions that sit on no\n * panel need this: panel rows ship their action inline. Imperative because it\n * runs inside a click, not a render; cached like every other config document.\n */\nexport const fetchAction = <T,>(\n queryClient: QueryClient,\n actionId: string\n): Promise<T> =>\n queryClient.fetchQuery({\n queryKey: inquiryKeys.action(actionId),\n queryFn: ({ signal }) =>\n apiGet<T>(ConfigService.integrationV1ApiUrl, `action/${actionId}`, {\n signal\n }),\n staleTime: CONFIG_STALE_TIME\n });\n\nexport interface AggregateThresholdValue {\n /** The aggregateThreshold config (numeric severity rules; getThresholdStatus reads it). */\n threshold: Record<string, unknown> | null;\n /** Rounded aggregate value, or '' when unavailable. */\n value: number | '';\n}\n\n/**\n * Resolve an aggregate threshold's live value (legacy AggregateChip's internal\n * two-step): fetch `aggregateThreshold/{id}` (integration v2 — config, cached\n * hard and shared by the node view and the tree-menu badges) then execute its\n * query instance with `params`. Rejects when either request fails.\n */\nexport const fetchAggregateThresholdValue = async (\n queryClient: QueryClient,\n aggregateThresholdId: string,\n params: Record<string, unknown> = {}\n): Promise<AggregateThresholdValue> => {\n const threshold = await queryClient.fetchQuery({\n queryKey: inquiryKeys.aggregateThreshold(aggregateThresholdId),\n queryFn: async ({ signal }) =>\n (await apiGet<Record<string, unknown> | null>(\n ConfigService.integrationV2ApiUrl,\n `aggregateThreshold/${aggregateThresholdId}`,\n { signal }\n )) ?? null,\n staleTime: CONFIG_STALE_TIME,\n retry: false\n });\n const apiMethodInstanceId = threshold?.apiMethodInstanceId as\n | string\n | undefined;\n const aggregateKey = threshold?.aggregateKey as string | undefined;\n if (!apiMethodInstanceId || !aggregateKey) {\n return { threshold, value: '' };\n }\n const response = await executeQueryInstance(\n { data: params },\n apiMethodInstanceId\n );\n const raw = response?.data?.aggregateResults?.[0]?.[aggregateKey];\n return { threshold, value: raw ? Math.round(raw) : '' };\n};\n\n/**\n * The node view's aggregate value — executed with no params, the same\n * empty-params call the alert path made through AggregateChip. Aggregate\n * values are live, so cached briefly.\n */\nexport const useAggregateThresholdValue = (\n aggregateThresholdId: string | null | undefined\n): UseQueryResult<AggregateThresholdValue> => {\n const queryClient = useQueryClient();\n return useQuery({\n queryKey: inquiryKeys.aggregateThresholdValue(aggregateThresholdId ?? ''),\n queryFn: () =>\n fetchAggregateThresholdValue(queryClient, aggregateThresholdId ?? ''),\n enabled: !!aggregateThresholdId,\n staleTime: 30 * 1000\n });\n};\n\n/** The fields of the detailed-tree wire shape the v2 viewer reads. */\nexport interface InquiryTreeWire {\n [key: string]: unknown;\n treeStructure?: Array<Record<string, unknown>>;\n apiMethodInstance?: {\n apiMethodId?: string | number;\n /** The catalog the tree's query lives in — its entities are read from it. */\n apiCatalogId?: string;\n returnObject?: string;\n };\n /** The product the tree belongs to — its promotions are read under it. */\n product?: { productId?: string | number } | null;\n explorePageId?: string | null;\n}\n\n/** Fetch a detailed inquiry tree (config — cached hard). */\nexport const useInquiryTree = (\n treeId: string | null | undefined\n): UseQueryResult<InquiryTreeWire> =>\n useQuery({\n queryKey: inquiryKeys.tree(treeId ?? ''),\n queryFn: ({ signal }) =>\n apiGet<InquiryTreeWire>(\n ConfigService.integrationV1ApiUrl,\n `inquirytree/${treeId}/detailed`,\n { signal }\n ),\n enabled: !!treeId,\n staleTime: CONFIG_STALE_TIME\n });\n\n/**\n * The detailed tree, imperatively — the load-to-tree door needs a tree the\n * viewer is NOT mounted on (v1's executeGetDetailedTree). Same key and\n * staleness as useInquiryTree, so a tree the user later opens is a cache hit.\n */\nexport const fetchInquiryTree = (\n queryClient: QueryClient,\n treeId: string\n): Promise<InquiryTreeWire> =>\n queryClient.fetchQuery({\n queryKey: inquiryKeys.tree(treeId),\n queryFn: ({ signal }) =>\n apiGet<InquiryTreeWire>(\n ConfigService.integrationV1ApiUrl,\n `inquirytree/${treeId}/detailed`,\n { signal }\n ),\n staleTime: CONFIG_STALE_TIME\n });\n\n/* ------------------------------------------------ recently loaded records */\n\n/**\n * One entry of the tree's recently-loaded history, exactly as v1 wrote it\n * (InquiryContainer's getLoadedNodeObject). The history is SERVER-held, per\n * user × tree × product, and the Recently Loaded widget on an explore page\n * reads this shape straight off its widget params.\n */\nexport interface RecentlyLoadedNode {\n productId?: string;\n inquiryTreeId?: string;\n userId?: string;\n apiMethodId?: string;\n dateLoaded?: string;\n nodeDetails?: {\n nodeLabel?: string;\n catalogReturnObject?: string;\n treeStructureId?: string;\n };\n /** The search body that refetches the record — replayed on click. */\n queryPayload?: Record<string, unknown>;\n [key: string]: unknown;\n}\n\n/**\n * The tree's recently-loaded history for the signed-in user. Same endpoint v1's\n * host route called (`loadedInquiryTreeNodes`), so v1 and v2 read and write ONE\n * list — a record loaded in either viewer shows up in both.\n */\nexport const useRecentlyLoadedNodes = (\n treeId: string | null | undefined,\n userId: string | null | undefined\n): UseQueryResult<RecentlyLoadedNode[]> =>\n useQuery({\n queryKey: inquiryKeys.recentlyLoaded(treeId ?? '', userId ?? ''),\n queryFn: ({ signal }) =>\n apiGet<RecentlyLoadedNode[]>(\n ConfigService.integrationV1ApiUrl,\n `inquirytree/loadedInquiryTreeNodes?inquiryTreeId=${treeId}&userId=${userId}&productId=${ConfigService.config.UNITY_PRODUCT_ID}`,\n { signal }\n ),\n enabled: !!treeId && !!userId,\n staleTime: 30 * 1000,\n // The landing page still renders without a history; a retry storm behind an\n // optional widget is worse than an empty table.\n retry: false\n });\n\n/**\n * Record that the user brought a record into the tree by hand — v1 wrote this\n * from its search-load and move-to-top paths, which are exactly what v2's\n * single load path replaced.\n *\n * `queryPayload` is stored as the identifier search that fetched the record, so\n * a click on the history replays the same request v1's entries replay. Failure\n * is silent on purpose: history is a convenience, and a load that worked must\n * not report an error because the bookkeeping behind it didn't.\n */\nexport const recordRecentlyLoadedNode = async (\n queryClient: QueryClient,\n {\n treeId,\n userId,\n apiMethodId,\n entityName,\n treeStructureId,\n label,\n filterElements\n }: {\n treeId: string;\n userId: string | null | undefined;\n apiMethodId: string;\n entityName: string;\n treeStructureId: string;\n label: string;\n filterElements: Array<Record<string, unknown>>;\n }\n): Promise<void> =>\n recordRecentlyLoadedNodes(queryClient, {\n treeId,\n userId,\n entries: [{ apiMethodId, entityName, treeStructureId, label, filterElements }]\n });\n\n/** One history entry of a (possibly bulk) load. */\nexport interface RecentlyLoadedWriteEntry {\n apiMethodId: string;\n entityName: string;\n treeStructureId: string;\n label: string;\n filterElements: Array<Record<string, unknown>>;\n}\n\n/**\n * The batch form — the endpoint's body is already an array, so a bulk load of\n * twenty records is ONE POST and ONE history refetch instead of twenty of each.\n */\nexport const recordRecentlyLoadedNodes = async (\n queryClient: QueryClient,\n {\n treeId,\n userId,\n entries\n }: {\n treeId: string;\n userId: string | null | undefined;\n entries: RecentlyLoadedWriteEntry[];\n }\n): Promise<void> => {\n const rows = entries.filter(\n (entry) => entry.apiMethodId && entry.filterElements.length\n );\n if (!treeId || !userId || !rows.length) return;\n const productId = ConfigService.config.UNITY_PRODUCT_ID;\n try {\n await apiMutate(\n ConfigService.integrationV1ApiUrl,\n `inquirytree/${treeId}/loadedInquiryTreeNodes/user/${userId}/product/${productId}`,\n { method: 'post' },\n {\n data: rows.map((entry) => ({\n productId,\n inquiryTreeId: treeId,\n userId,\n apiMethodId: entry.apiMethodId,\n nodeDetails: {\n nodeLabel: entry.label,\n catalogReturnObject: entry.entityName,\n treeStructureId: entry.treeStructureId\n },\n queryPayload: getSearchObject(entry.filterElements as never, 1, 1)\n }))\n }\n );\n } catch {\n return;\n }\n void queryClient.invalidateQueries({\n queryKey: inquiryKeys.recentlyLoaded(treeId, userId)\n });\n};\n\n/**\n * The tenant/product → api-catalog binding (`tenantProductApiCatalogBase`).\n * The Shell's ActionProvider resolves the same binding into a zustand store,\n * but v2 must not depend on a provider side effect for correctness — it\n * fetches through the cache like everything else (TanStack dedupes the two).\n */\nexport const useApiCatalogBinding = (\n tenantId: string | null | undefined\n): UseQueryResult<{ apiCatalogId?: string }> =>\n useQuery({\n queryKey: inquiryKeys.catalogBinding(tenantId ?? ''),\n queryFn: ({ signal }) =>\n apiGet<{ apiCatalogId?: string }>(\n ConfigService.integrationV1ApiUrl,\n `tenantProductApiCatalogBase/tenant/${tenantId}/product/${ConfigService.config.UNITY_PRODUCT_ID}`,\n { signal }\n ),\n enabled: !!tenantId,\n staleTime: 30 * 60 * 1000\n });\n\n/**\n * Promoted CRUD/search methods for every entity in a catalog — the domain\n * lazy-load composer's search-method fallback (same read the legacy\n * usePromotedMethodEntities hook caches in the catalog store).\n */\nexport const usePromotedMethodEntities = (\n catalogId: string | null | undefined,\n /**\n * Promotions are PER PRODUCT. A tree's levels load through its own product's\n * promotions — the host app's product only when the tree names none (a tree\n * from another product previewed or viewed here would otherwise report every\n * child level as un-promoted).\n */\n productId: string | number | null | undefined = ConfigService.config\n .UNITY_PRODUCT_ID\n): UseQueryResult<PromotedEntity[]> => {\n const product = String(productId ?? ConfigService.config.UNITY_PRODUCT_ID);\n return useQuery({\n queryKey: inquiryKeys.promotedEntities(catalogId ?? '', product),\n queryFn: ({ signal }) =>\n apiGet<PromotedEntity[]>(\n ConfigService.integrationV1ApiUrl,\n `apiCatalog/${catalogId}/promotedMethodEntities?productId=${product}`,\n { signal }\n ),\n enabled: !!catalogId,\n staleTime: 30 * 60 * 1000\n });\n};\n\n/**\n * The catalog objects (models + relationships) for a tree's entity graph —\n * the same integration-v2 read the legacy Inquiry loader performs. The domain\n * display-tree/lazy-load composers take these to resolve child search methods\n * and icons. Config-shaped: cached hard.\n */\nexport const useTreeCatalogObjects = (\n catalogId: string | null | undefined,\n treeId: string | null | undefined\n): UseQueryResult<CatalogObject[]> =>\n useQuery({\n queryKey: inquiryKeys.catalog(catalogId ?? '', treeId ?? ''),\n queryFn: ({ signal }) =>\n apiGet<CatalogObject[]>(\n ConfigService.integrationV2ApiUrl,\n `apiCatalog/${catalogId}/inquiryTree/${treeId}/withDescendants?modelsOnly=true`,\n { signal }\n ),\n enabled: !!catalogId && !!treeId,\n staleTime: 30 * 60 * 1000\n });\n\n/** One attribute's lookup config, as it rides `response.data.lookupsMap`. */\nexport interface LookupsMapEntry {\n /** The lookup's id (UdpLookup.id). */\n value?: string;\n lookupKeyName?: string | null;\n lookupValueName?: string | null;\n}\n\n/** `response.data.lookupsMap` — attribute name → lookup config. */\nexport type LookupsMap = Record<string, LookupsMapEntry>;\n\n/** A lookup's get-data payload (rows + key/value column names). */\ninterface LookupWire {\n data?: Array<Record<string, unknown>>;\n keyName?: string;\n valueName?: string;\n udpLookupUdpLookupKey?: Array<{ name: string }>;\n}\n\n/** A resolved lookup table: its key column(s), value column and rows. */\ninterface LookupTable {\n keyNames: string[];\n valueName: string;\n rows: Array<Record<string, unknown>>;\n}\n\n/**\n * The promoted UdpLookup get-data method id — the same read\n * `usePromotedLookupMethods` performs for the grid/DataBrowser lookup paths.\n * Config-shaped: one request per catalog for the session.\n */\nconst lookupMethodQueryOptions = (catalogId: string) => ({\n queryKey: inquiryKeys.lookupMethod(catalogId),\n staleTime: 30 * 60 * 1000,\n queryFn: async () => {\n try {\n const methods = await apiGet<\n Record<string, { apiMethodId?: string } | undefined>\n >(\n ConfigService.integrationV1ApiUrl,\n `apicatalog/${catalogId}/promotedMethodEntities/${UdpEnums.Udp_Lookup}/product/${ConfigService.config.UNITY_PRODUCT_ID}?compareSanitizedName=true`\n );\n return (\n methods?.unityBaseGetDataMethod?.apiMethodId ??\n methods?.unityBaseGetMethod?.apiMethodId ??\n null\n );\n } catch {\n return null;\n }\n }\n});\n\nconst fetchLookupGetDataMethodId = async (\n queryClient: QueryClient,\n catalogId: string\n): Promise<string | null> =>\n queryClient.fetchQuery(lookupMethodQueryOptions(catalogId));\n\n/**\n * Warm `['lookupMethod', catalogId]` alongside the other catalog-shaped reads\n * (catalog objects / promoted methods) instead of discovering it lazily inside\n * the first lookup fetch. Same key, same options — one cache entry, just\n * requested a wave earlier so lookup stamping never pays for this hop.\n */\nexport const usePrefetchLookupMethod = (\n catalogId: string | null | undefined\n): void => {\n const queryClient = useQueryClient();\n useEffect(() => {\n if (!catalogId) return;\n void queryClient.prefetchQuery(lookupMethodQueryOptions(catalogId));\n }, [queryClient, catalogId]);\n};\n\n/**\n * One lookup's rows, cached per lookup id (the TanStack twin of the grid\n * lookupHelper's module-level table cache): a lookup is fetched once and\n * every node/row that references it reads the same entry.\n */\nconst fetchLookupTable = async (\n queryClient: QueryClient,\n catalogId: string,\n lookupId: string\n): Promise<LookupTable | null> =>\n queryClient.fetchQuery({\n queryKey: inquiryKeys.lookup(lookupId),\n staleTime: 30 * 60 * 1000,\n queryFn: async () => {\n const apiMethodId = await fetchLookupGetDataMethodId(\n queryClient,\n catalogId\n );\n if (!apiMethodId) return null;\n try {\n const response = await executeQueryWithParameters(\n { data: { id: lookupId } },\n apiMethodId\n );\n const lookup = response?.data;\n if (!lookup?.data?.length || !lookup.valueName) return null;\n // Legacy single-key lookups carry keyName; current ones carry the\n // udpLookupUdpLookupKey rows.\n const keyNames = lookup.keyName\n ? [lookup.keyName]\n : (lookup.udpLookupUdpLookupKey ?? []).map((key) => key.name);\n if (!keyNames.length) return null;\n return { keyNames, valueName: lookup.valueName, rows: lookup.data };\n } catch {\n return null;\n }\n }\n });\n\n/** Lookup keys compare as strings — the wire mixes numeric and string ids. */\nconst keyString = (value: unknown): string => {\n if (value === null || value === undefined) return '';\n if (typeof value === 'object') return JSON.stringify(value);\n return String(value as string | number | boolean);\n};\n\n/**\n * Stamp lookup display text onto rows as `<field>LookupValue` siblings — the\n * row-stamping idiom the grid and the WR detail panel already use, so the\n * pure model layer can prefer the text without ever fetching. Raw values are\n * left untouched (filters/identifiers still read them), and any lookup that\n * fails to resolve simply isn't stamped: the header falls back to the raw\n * value, exactly as before.\n */\nconst stampLookupValues = async (\n queryClient: QueryClient,\n catalogId: string | null | undefined,\n rows: Array<Record<string, unknown>>,\n lookupsMap: LookupsMap | null | undefined\n): Promise<Array<Record<string, unknown>>> => {\n const configs = Object.entries(lookupsMap ?? {}).flatMap(\n ([attribute, config]) =>\n config?.value ? [{ attribute, lookupId: config.value, config }] : []\n );\n if (!catalogId || !rows.length || !configs.length) return rows;\n\n const tables = new Map<string, LookupTable | null>();\n await Promise.all(\n Array.from(new Set(configs.map(({ lookupId }) => lookupId))).map(\n async (lookupId) => {\n tables.set(\n lookupId,\n await fetchLookupTable(queryClient, catalogId, lookupId)\n );\n }\n )\n );\n\n // Single key: the row holds the key under the ATTRIBUTE's own name, which\n // may differ from the lookup's key column. Multi-key: each key matches by\n // its own name on the row (grid lookupHelper's rule).\n const compositeKey = (row: Record<string, unknown>, keys: string[]) =>\n JSON.stringify(keys.map((key) => keyString(row[key])));\n // One index per (table, key column), first row winning, as `find` did.\n const indexes = new Map<string, Map<string, Record<string, unknown>>>();\n const indexFor = (lookupId: string, table: LookupTable, keyName: string) => {\n const multiKey = table.keyNames.length > 1;\n const indexId = multiKey ? lookupId : `${lookupId}\\u0000${keyName}`;\n let index = indexes.get(indexId);\n if (!index) {\n index = new Map();\n for (const lookupRow of table.rows) {\n const key = multiKey\n ? compositeKey(lookupRow, table.keyNames)\n : keyString(lookupRow[keyName]);\n if (!index.has(key)) index.set(key, lookupRow);\n }\n indexes.set(indexId, index);\n }\n return index;\n };\n\n return rows.map((row) => {\n let stamped = row;\n for (const { attribute, lookupId, config } of configs) {\n const table = tables.get(lookupId);\n const raw = row[attribute];\n if (!table || raw === null || raw === undefined) continue;\n const valueName = config.lookupValueName || table.valueName;\n const keyName = config.lookupKeyName || table.keyNames[0];\n if (!valueName || !keyName) continue;\n const match = indexFor(lookupId, table, keyName).get(\n table.keyNames.length > 1\n ? compositeKey(row, table.keyNames)\n : keyString(raw)\n );\n const text = match?.[valueName];\n if (text === null || text === undefined) continue;\n if (stamped === row) stamped = { ...row };\n stamped[`${attribute}LookupValue`] = text;\n }\n return stamped;\n });\n};\n\n/**\n * An entity's lookup-bearing attributes as a LookupsMap. Lookup config rides\n * the CATALOG ATTRIBUTE (`extendedProperties.lookup` + its key/value column\n * names) — the same client-side derivation the maintenance grid performs\n * (UdpDataBrowserPage.jsx:229-247) — so any producer holding an entity name\n * can stamp its rows. That matters because a search response's `lookupsMap`\n * describes the searched entity only: rows nested inside it (a resource's\n * `resourceAssignment[]`) are never covered by it.\n */\nconst deriveLookupsMap = (\n catalogObjects: CatalogObject[] | null | undefined,\n entityName: string | null | undefined\n): LookupsMap => {\n const properties = catalogObjects?.find(\n (candidate) => candidate.catalogObjectName === entityName\n )?.properties;\n const map: LookupsMap = {};\n for (const property of properties ?? []) {\n const extended = property?.extendedProperties as\n | {\n lookup?: string | null;\n lookupKeyName?: string | null;\n lookupValueName?: string | null;\n }\n | null\n | undefined;\n const name = property?.name;\n if (!extended?.lookup || !name) continue;\n // Wire rows are camelCase; catalog attribute names may be Pascal-cased\n // (CrudTableColumnDefs.js:41 derives its grid field the same way).\n map[toLowerFirstChar(name) as string] = {\n value: extended.lookup,\n lookupKeyName: extended.lookupKeyName,\n lookupValueName: extended.lookupValueName\n };\n }\n return map;\n};\n\n/** Association key → entity name, e.g. `{ resourceAssignment: 'Assignment' }`. */\nexport type NestedEntityMap = Record<string, string>;\n\n/**\n * Stamp lookup display text through NESTED association rows — the levels the\n * wave loader grafts onto a parent row under its association key. A nested\n * row's FK fields can only be resolved through its OWN entity's lookup config\n * (a response's lookupsMap describes the entity it searched and nothing else),\n * which is what this walk supplies. Depth-first over the row graph with the\n * same stampLookupValues/fetchLookupTable pair the flat paths use —\n * copy-on-write, so untouched rows keep their cached identity.\n */\nconst stampNestedLookupValues = async (\n queryClient: QueryClient,\n catalogId: string | null | undefined,\n rows: Array<Record<string, unknown>>,\n nestedEntities: NestedEntityMap | null | undefined,\n catalogObjects: CatalogObject[] | null | undefined\n): Promise<Array<Record<string, unknown>>> => {\n const entities = nestedEntities ?? {};\n const keys = Object.keys(entities);\n if (!catalogId || !rows.length || !keys.length) return rows;\n\n const lookupsByKey = Object.fromEntries(\n keys.map((key) => [key, deriveLookupsMap(catalogObjects, entities[key])])\n );\n\n /** Stamp one nested level, then recurse into it. */\n const stampRows = async (\n source: Array<Record<string, unknown>>,\n key: string\n ): Promise<Array<Record<string, unknown>>> =>\n walk(\n await stampLookupValues(queryClient, catalogId, source, lookupsByKey[key])\n );\n\n const walk = async (\n source: Array<Record<string, unknown>>\n ): Promise<Array<Record<string, unknown>>> =>\n Promise.all(\n source.map(async (row) => {\n // Every association on a row is an independent subtree: stamp them\n // together rather than one level per await.\n const levels = await Promise.all(\n keys.map(async (key) => {\n const nested = row[key];\n const nestedRows = Array.isArray(nested)\n ? (nested as Array<Record<string, unknown>>)\n : nested && typeof nested === 'object'\n ? [nested as Record<string, unknown>]\n : null;\n if (!nestedRows?.length) return null;\n const stamped = await stampRows(nestedRows, key);\n if (stamped.every((child, index) => child === nestedRows[index])) {\n return null;\n }\n return {\n key,\n value: Array.isArray(nested) ? stamped : stamped[0]\n };\n })\n );\n let next = row;\n for (const level of levels) {\n if (!level) continue;\n if (next === row) next = { ...row };\n next[level.key] = level.value;\n }\n return next;\n })\n );\n\n return walk(rows);\n};\n\n/** What a producer needs to stamp lookup display text onto a page of rows. */\nexport interface LookupStampContext {\n queryClient: QueryClient;\n catalogId: string | null | undefined;\n /** The tree's catalog objects — the source of each entity's lookup config. */\n catalogObjects?: CatalogObject[] | null;\n /** Association keys carrying nested level rows (see stampNestedLookupValues). */\n nestedEntities?: NestedEntityMap | null;\n}\n\n/**\n * Stamp a page of rows whose entity is KNOWN: the entity's catalog lookup\n * config first (a response's own `lookupsMap` overrides it where present),\n * then the nested association rows riding each row. Every v2 producer\n * — root page, lazy child page, search-loaded record — funnels through here so\n * a label/header chip on an FK field reads the same wherever the row came from.\n */\nexport const stampRecordRows = async (\n context: LookupStampContext,\n entityName: string | null | undefined,\n rows: Array<Record<string, unknown>>,\n responseLookupsMap?: LookupsMap | null\n): Promise<Array<Record<string, unknown>>> => {\n const { queryClient, catalogId, catalogObjects, nestedEntities } = context;\n const stamped = await stampLookupValues(queryClient, catalogId, rows, {\n ...deriveLookupsMap(catalogObjects, entityName),\n ...(responseLookupsMap ?? {})\n });\n return stampNestedLookupValues(\n queryClient,\n catalogId,\n stamped,\n nestedEntities,\n catalogObjects\n );\n};\n\nexport interface RecordRows {\n rows: Array<Record<string, unknown>>;\n total: number;\n /** The response's own lookup config, for the caller's stamping pass. */\n lookupsMap?: LookupsMap | null;\n}\n\n/**\n * The tree menu's seed. LEAN — `eagerLoad: false`: no child records ride the\n * response. Every level below the root is fetched by the wave loader (eager\n * levels) or on expand (lazy ones), so nothing here may depend on embedded\n * association arrays.\n *\n * Two shapes, one query:\n * - the ROOT PAGE: `pageSize` records, the root level's initial record count;\n * - ENTRY FROM RECORD (`?node=`/`?nodeSearch=`): `identifierFilters` names one\n * record and the page is just that record.\n *\n * The request carries the Data Builder query's OWN saved filters/order\n * (`instanceFilters`): ad-hoc execution ignores the instance body, so a query's\n * filters reach the server only because they are composed in here.\n *\n * The rows stay RAW in the cache. Lookup display text is stamped by the caller\n * in the same pass that hydrates the eager levels (tree/useHydratedRootRows),\n * so one root load composes the tree once.\n */\nexport const useRootRecords = ({\n treeId,\n apiMethodId,\n entityName,\n instanceFilters,\n identifierFilters,\n pageSize = 25,\n enabled = true\n}: {\n treeId: string;\n apiMethodId: string | number | null | undefined;\n entityName: string;\n /** The tree query's resolved saved filters (api/instanceBodyModel). */\n instanceFilters?: InstanceBodyFilters | null;\n /** Entry from record: the one record's identifier `=` filters. */\n identifierFilters?: Array<Record<string, unknown>> | null;\n pageSize?: number;\n /**\n * Held back while the caller still needs the catalog to decide WHAT to ask\n * for — an entry-from-record deep link must not fire the whole root page\n * first and then replace it.\n */\n enabled?: boolean;\n}): UseQueryResult<RecordRows> => {\n const filtersHash = instanceFiltersHash(instanceFilters);\n const entryHash = identifierFilters?.length\n ? JSON.stringify(\n identifierFilters.map((element) => [\n element.searchField,\n element.searchValue\n ])\n )\n : '';\n const queryKey = useMemo(\n () =>\n inquiryKeys.records(\n entityName,\n `tree-root:${treeId}:${pageSize}:${filtersHash}:${entryHash}`\n ),\n [entityName, treeId, pageSize, filtersHash, entryHash]\n );\n return useQuery({\n queryKey,\n queryFn: async () => {\n const { searchFilterElements, searchFilterGroups } =\n composeInstanceSearchFilters({ instanceFilters });\n const search = getSearchObject(\n [\n ...(searchFilterElements as Array<Record<string, unknown>>),\n ...(identifierFilters ?? [])\n ] as never,\n 1,\n identifierFilters?.length ? 1 : pageSize,\n false,\n LogicalSearchOperatorEnums.And,\n searchFilterGroups as never\n );\n // The root page requests no ordering of its own, so the query's saved\n // ordering stands.\n if (instanceFilters?.orderElements.length) {\n search.orderElements = instanceFilters.orderElements.map((order) => ({\n ...order\n }));\n }\n const response = await executeQueryAdHoc(\n { data: search },\n String(apiMethodId)\n );\n return {\n rows: response.data?.pageList ?? [],\n total: response.data?.total ?? 0,\n lookupsMap: response.data?.lookupsMap ?? null\n };\n },\n // Deliberately NOT gated on the catalog: the rows are the first paint, and\n // lookup display text is stamped onto them afterwards — so the root page\n // never waits on the catalog wave, nor on the lookup fetches.\n enabled: enabled && !!apiMethodId && !!entityName,\n // GROWING THE WINDOW IS NOT A NEW LOAD. `pageSize` is part of the key, so\n // \"show more\" mints a fresh query — and without this the tree would blank\n // back to its loading placeholder while the bigger page is in flight, which\n // is the one thing a request to see MORE rows must not do. The rows already\n // on screen stand until the wider answer replaces them.\n placeholderData: keepPreviousData,\n staleTime: 30 * 1000,\n // Interactive first paint: fail fast to the sidebar's error bar. A retry\n // delay can be parked behind TanStack's focus/online gates (the eternal-\n // spinner defect the search hook fixed the same way), and the toolbar's\n // Refresh is the retry.\n retry: false,\n networkMode: 'always' as const\n });\n};\n\n/**\n * Fetch ONE record by its identifier `=` filters — the Load dialog's pick and\n * the search-result load: the bulk fetch with a single set (one AND group\n * evaluates exactly like the ungrouped filters). LEAN: the record's levels are\n * filled by the wave loader afterwards, like the root page's.\n */\nexport const fetchRecordByIdentifiers = async (\n queryClient: QueryClient,\n apiMethodId: string,\n filterElements: Array<Record<string, unknown>>,\n /** Supplied by the viewer so the loaded row carries lookup display text. */\n lookupContext?: LookupStampContext & { entityName?: string | null }\n): Promise<Record<string, unknown> | null> =>\n (\n await fetchRecordsByIdentifierSets(\n queryClient,\n apiMethodId,\n [filterElements],\n lookupContext\n )\n )[0] ?? null;\n\n/**\n * Fetch MANY records in one request — the bulk-load path (\"Load selected\").\n * Each identifier set becomes an AND group and the groups combine with OR, so\n * twenty picks cost one search instead of twenty (the per-record pipeline made\n * 50+ requests for a 20-record bulk load, observed 2026-08-27). Returns the\n * rows the server matched, lookup-stamped when given a context; the caller\n * pairs them back to its picks and falls back per-pick for any miss.\n */\nexport const fetchRecordsByIdentifierSets = async (\n queryClient: QueryClient,\n apiMethodId: string,\n identifierSets: Array<Array<Record<string, unknown>>>,\n lookupContext?: LookupStampContext & { entityName?: string | null }\n): Promise<Array<Record<string, unknown>>> => {\n const sets = identifierSets.filter((set) => set.length);\n if (!sets.length) return [];\n const filterElements = sets.flatMap((set, index) =>\n set.map((element) => ({ ...element, groupId: index + 1 }))\n );\n const filterGroups = sets.map((_, index) => ({\n groupId: index + 1,\n parentGroupId: null,\n logicalSearchOperator: LogicalSearchOperatorEnums.And\n }));\n // Cached like every other read: loading the same records twice is a cache\n // hit, and record mutations already invalidate `['records']`, which this\n // key sits under.\n return queryClient.fetchQuery({\n queryKey: inquiryKeys.recordByIdentifiers(\n lookupContext?.entityName ?? apiMethodId,\n filterElements\n ),\n staleTime: 30 * 1000,\n // Interactive load flow: fail fast into the caller's error handling — a\n // retry delay can be parked behind TanStack's focus/online gates, which\n // hangs the await (the search hook's SEARCH_FAILURE_MODE rationale).\n retry: false,\n networkMode: 'always',\n queryFn: async () => {\n const response = await executeQueryAdHoc(\n {\n data: getSearchObject(\n filterElements as unknown as Parameters<typeof getSearchObject>[0],\n 1,\n sets.length,\n false,\n LogicalSearchOperatorEnums.Or,\n filterGroups as unknown as Parameters<typeof getSearchObject>[5]\n )\n },\n apiMethodId\n );\n const rows = response.data?.pageList ?? [];\n if (!rows.length || !lookupContext) return rows;\n return stampRecordRows(\n lookupContext,\n lookupContext.entityName,\n rows,\n response.data?.lookupsMap\n );\n }\n });\n};\n\n/**\n * ONE child-level request — a wave's batched `parentFK IN (…)` fetch or a lazy\n * expand's single-parent one. Cached on (method × exact body), so the same\n * level for the same parents is never asked for twice: a collapsed-then-\n * re-expanded row, a second wave crossing the same parents, and the re-run of\n * the wave pass that follows lookup stamping are all cache hits.\n */\nexport const fetchChildRows = async (\n queryClient: QueryClient,\n apiMethodId: string,\n data: Record<string, unknown>\n): Promise<RecordRows> =>\n queryClient.fetchQuery({\n queryKey: inquiryKeys.childBatch(apiMethodId, JSON.stringify(data)),\n staleTime: 30 * 1000,\n // Wave/lazy loads surface failures as row-level messages; fail fast into\n // that path instead of risking a focus-gate-parked retry (see above).\n retry: false,\n networkMode: 'always',\n queryFn: async () => {\n const response = await executeQueryAdHoc({ data }, apiMethodId);\n return {\n rows: response.data?.pageList ?? [],\n total: response.data?.total ?? 0,\n lookupsMap: response.data?.lookupsMap ?? null\n };\n }\n });\n\n/**\n * Fetch + normalize a page document. Cached hard (config); the page builder\n * invalidates `inquiryKeys.page(id)` on save.\n */\nexport const usePageDocument = (\n pageId: string | null | undefined\n): UseQueryResult<PageDocument> =>\n useQuery({\n queryKey: inquiryKeys.page(pageId ?? ''),\n queryFn: ({ signal }) =>\n apiGet<PageWire>(ConfigService.tenantV1ApiUrl, `page/${pageId}`, {\n signal\n }),\n enabled: !!pageId,\n staleTime: CONFIG_STALE_TIME,\n select: normalizePageDocument\n });\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA8CA,MAAMgB,oBAAoBC;;AAa1B,MAAMG,6BACJC;;AAMF,MAAMH,uBAAuBC;;;;;;AAoC7B,MAAaoC,kBAAkB,OAC7BC,aACAC,WACAX,eAEAU,YAAYE,WAAW;CACrBC,UAAUC,YAAYC,WAAWf,WAAW;CAC5CgB,WAAW,OAAU;CACrBC,SAAS,YAA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ACK,MAAAI,KAAA,CAAC,CAACxG;CAAM,IAAA0G;AAAA,KAAAN,EAAA,OAAAE,MAAAF,EAAA,OAAAG,MAAAH,EAAA,OAAAI,IAAA;AANVE,OAAA;GAAA3F,UACGuF;GAA8BnF,SAC/BoF;GAGLI,SACKH;GAAQtF,WACNqC;GAAiB2M,QACpBrS;GACT;AAAAuI,IAAA,KAAAE;AAAAF,IAAA,KAAAG;AAAAH,IAAA,KAAAI;AAAAJ,IAAA,KAAAM;OAAAA,MAAAN,EAAA;AAAA,QATD5I,SAASkJ,GASP;;AAjO0B,SAAA4H,MAAA7J,SAAA;AAAA,QA2Ba,CACjCA,QAAOC,aACPD,QAAOE,YACR;;AA9BqB,SAAAoK,OAAAoB,OAAA;AAAA,QA4D+C,EAAA,GAChEA,OACJ"}
|
|
1
|
+
{"version":3,"file":"queries.mjs","names":["useEffect","useMemo","keepPreviousData","QueryClient","useQueries","useQuery","useQueryClient","UseQueryResult","apiGet","ConfigService","normalizePageDocument","PageDocument","PageWire","isEntityNode","CatalogObject","InquiryTree","InquiryTreeWire","PromotedEntity","fromWire","toJsonString","getSearchObject","Search","executeQueryAdHoc","executeQueryAdHocUntyped","executeQueryInstance","executeQueryInstanceUntyped","executeQueryWithParameters","executeQueryWithParametersUntyped","apiMutate","toLowerFirstChar","LogicalSearchOperatorEnums","UdpEnums","composeInstanceSearchFilters","instanceFiltersHash","InstanceBodyFilters","resolveIdentifierSets","rowForIdentifierSet","LinkedTrees","data","Record","apiMethodId","Promise","status","pageList","Array","total","lookupsMap","LookupsMap","LookupWire","apiMethodInstanceId","aggregateResults","PromotedMethodRef","pathParameters","pageId","PromotedMethodEntity","entityName","unityBaseCreateMethod","unityBaseUpdateMethod","unityBaseDeleteMethod","unityBaseGetMethod","unityBaseSearchMethod","EntityMeta","attributes","promoted","fetchEntityMeta","queryClient","catalogId","fetchQuery","queryKey","inquiryKeys","entityMeta","staleTime","queryFn","productId","config","UNITY_PRODUCT_ID","apiGetOrNull","baseURL","url","T","catalogObjectPromise","properties","integrationV2ApiUrl","promotedPromise","integrationV1ApiUrl","catalogObject","executeSearchQuery","searchBody","signal","AbortSignal","RecordRows","response","Parameters","toRecordRows","executeApiMethodWithParameters","body","startWorkflow","workflowId","payload","builderV1ApiUrl","method","ApiMethodDefinition","name","pathParametersDefinition","key","fetchApiMethod","apiMethod","fetchApiMethodsByIds","apiMethodIds","CONFIG_STALE_TIME","tree","treeId","const","catalogBinding","tenantId","catalog","promotedEntities","page","record","recordKey","records","searchHash","recordByIdentifiers","filterElements","JSON","stringify","map","element","searchField","searchValue","childBatch","bodyHash","lookupMethod","lookup","lookupId","alert","alertId","action","actionId","aggregateThresholdValue","aggregateThresholdId","bulkChildCount","requestKey","keyValue","aggregateThreshold","recentlyLoaded","userId","aggregateBadge","paramsKey","invalidateInquiryRowData","all","invalidateQueries","AlertConfig","useAlert","$","_c","t0","t1","t2","tenantV1ApiUrl","t3","enabled","fetchAction","AggregateThresholdValue","threshold","value","fetchAggregateThresholdValue","params","retry","aggregateKey","raw","Math","round","useAggregateThresholdValue","undefined","t4","t5","inquiryTreeQuery","useInquiryTree","fetchInquiryTree","useLinkedTrees","nodes","Set","flatMap","_temp","idList","join","split","ids","results","trees","Object","fromEntries","id","index","linked","settled","some","_temp2","queries","combine","RecentlyLoadedNode","inquiryTreeId","dateLoaded","nodeDetails","nodeLabel","catalogReturnObject","treeStructureId","queryPayload","useRecentlyLoadedNodes","RecentlyLoadedWriteEntry","label","recordRecentlyLoadedNodes","entries","rows","filter","entry","length","useApiCatalogBinding","usePromotedMethodEntities","product","String","useTreeCatalogObjects","LookupsMapEntry","lookupKeyName","lookupValueName","keyName","valueName","udpLookupUdpLookupKey","LookupTable","keyNames","lookupMethodQueryOptions","methods","Udp_Lookup","unityBaseGetDataMethod","fetchLookupGetDataMethodId","usePrefetchLookupMethod","prefetchQuery","fetchLookupTable","compositeKey","row","keys","lookupIndexes","WeakMap","Map","lookupIndexFor","table","multiKey","indexId","byColumn","get","set","lookupRow","has","stampLookupValues","configs","attribute","tables","from","stamped","match","text","deriveLookupsMap","catalogObjects","find","candidate","catalogObjectName","property","extended","extendedProperties","LookupStampContext","stampDisplayText","stampRecordRows","context","responseLookupsMap","INTERACTIVE_READ","networkMode","useRootRecords","instanceFilters","identifierFilters","pageSize","filtersHash","_temp3","entryHash","t6","searchFilterElements","searchFilterGroups","search","And","orderElements","_temp4","t7","t8","placeholderData","fetchRecordsByIdentifierSets","identifierSets","lookupContext","sets","groupId","filterGroups","_","parentGroupId","logicalSearchOperator","Or","fetchRowsForIdentifierSets","fetchChildRows","usePageDocument","select","node","associatedTreeId","result","isPending","order"],"sources":["../../../../src/inquiry/v2/api/queries.ts"],"sourcesContent":["/**\n * Inquiry v2 canonical query keys + typed fetch hooks\n * (inquiry-v2-architecture.md §5). Every capability — and the copilot — reads\n * through these keys, so two pieces needing the same data share one request\n * and one cache entry. Mutations refresh the UI by invalidating these keys;\n * there is no other refresh mechanism.\n */\nimport { useEffect, useMemo } from 'react';\nimport {\n keepPreviousData,\n type QueryClient,\n useQueries,\n useQuery,\n useQueryClient,\n UseQueryResult\n} from '@tanstack/react-query';\nimport { apiGet } from '../../../utilities/apiClient';\nimport { ConfigService } from '../../../configService';\nimport {\n normalizePageDocument,\n PageDocument,\n PageWire\n} from '../../../domain/page';\nimport { isEntityNode } from '../../../domain/inquiryTree';\nimport type {\n CatalogObject,\n InquiryTree,\n InquiryTreeWire,\n PromotedEntity\n} from '../../../domain/inquiryTree';\nimport { fromWire } from '../../../domain/inquiryTree/serialize';\nimport { toJsonString } from '../../../domain/inquiryTree/wireString';\nimport { getSearchObject } from '../../../utilities/search/SearchUtilities';\nimport type { Search } from '../../../utilities/search/Search';\nimport {\n executeQueryAdHoc as executeQueryAdHocUntyped,\n executeQueryInstance as executeQueryInstanceUntyped,\n executeQueryWithParameters as executeQueryWithParametersUntyped\n} from '../../../udp/utilities/methodUtils';\nimport { apiMutate } from '../../../utilities/useAxiosMutate';\nimport { toLowerFirstChar } from '../../../utilities/input/StringUtilities';\nimport {\n LogicalSearchOperatorEnums,\n UdpEnums\n} from '../../../enums/unitySystemEnums';\nimport {\n composeInstanceSearchFilters,\n instanceFiltersHash,\n InstanceBodyFilters\n} from './instanceBodyModel';\nimport {\n resolveIdentifierSets,\n rowForIdentifierSet,\n type LinkedTrees\n} from '../search/searchModel';\n\n/** Typed boundary over the JS ad hoc executor. */\nconst executeQueryAdHoc = executeQueryAdHocUntyped as unknown as (\n data: { data: Search | Record<string, unknown> },\n apiMethodId: string\n) => Promise<{\n status: number;\n data?: {\n pageList?: Array<Record<string, unknown>>;\n total?: number;\n lookupsMap?: LookupsMap;\n };\n}>;\n\n/** Typed boundary over the JS parameterised executor (lookup get-data). */\nconst executeQueryWithParameters =\n executeQueryWithParametersUntyped as unknown as (\n data: { data: Record<string, unknown> },\n apiMethodId: string\n ) => Promise<{ status?: number; data?: LookupWire }>;\n\n/** Typed boundary over the JS aggregate executor. */\nconst executeQueryInstance = executeQueryInstanceUntyped as unknown as (\n data: { data: Record<string, unknown> },\n apiMethodInstanceId: string\n) => Promise<{\n status?: number;\n data?: { aggregateResults?: Array<Record<string, number>> };\n}>;\n\nexport interface PromotedMethodRef {\n apiMethodId?: string;\n pathParameters?: string;\n pageId?: string;\n}\n\nexport interface PromotedMethodEntity {\n entityName?: string;\n unityBaseCreateMethod?: PromotedMethodRef;\n unityBaseUpdateMethod?: PromotedMethodRef;\n unityBaseDeleteMethod?: PromotedMethodRef;\n unityBaseGetMethod?: PromotedMethodRef;\n unityBaseSearchMethod?: PromotedMethodRef;\n}\n\nexport interface EntityMeta {\n entityName: string;\n /** catalogObject properties (attributes) — [] when unavailable. */\n attributes: Array<Record<string, unknown>>;\n /** Promoted CRUD methods — null when the entity has none. */\n promoted: PromotedMethodEntity | null;\n}\n\n/**\n * One cached resolver for everything an action needs to know about an entity\n * (catalog attributes + promoted CRUD methods). Replaces the legacy\n * per-click catalogObject/promotedMethodEntities waterfall.\n */\nexport const fetchEntityMeta = async (\n queryClient: QueryClient,\n catalogId: string,\n entityName: string\n): Promise<EntityMeta> =>\n queryClient.fetchQuery({\n queryKey: inquiryKeys.entityMeta(entityName),\n staleTime: 30 * 60 * 1000,\n queryFn: async () => {\n const productId = ConfigService.config.UNITY_PRODUCT_ID;\n const apiGetOrNull = async <T,>(\n baseURL: string,\n url: string\n ): Promise<T | null> => {\n try {\n return (await apiGet(baseURL, url)) as T;\n } catch {\n return null;\n }\n };\n const catalogObjectPromise = apiGetOrNull<{\n properties?: Array<Record<string, unknown>>;\n }>(\n ConfigService.integrationV2ApiUrl,\n `apiCatalog/${catalogId}/catalogObject/${entityName}`\n );\n const promotedPromise = apiGetOrNull<PromotedMethodEntity>(\n ConfigService.integrationV1ApiUrl,\n `apicatalog/${catalogId}/promotedMethodEntities/${entityName}/product/${productId}`\n );\n const catalogObject = await catalogObjectPromise;\n const promoted = await promotedPromise;\n return {\n entityName,\n attributes: catalogObject?.properties ?? [],\n promoted\n };\n }\n });\n\n/**\n * The search-as-you-type fetch boundary (inquiry-v2-architecture.md §5.2):\n * the routed ad hoc executor (direct-if-eligible, else Integration) with\n * TanStack's AbortSignal threaded through, so a superseded keystroke's request\n * is truly aborted.\n */\nexport const executeSearchQuery = async (\n apiMethodId: string,\n searchBody: unknown,\n signal?: AbortSignal\n): Promise<RecordRows> => {\n const response = (await executeQueryAdHocUntyped(\n { data: searchBody },\n apiMethodId,\n '',\n { signal }\n )) as Parameters<typeof toRecordRows>[0];\n return toRecordRows(response);\n};\n\n/** The routed executeQueryWithParameters (typed boundary). */\nexport const executeApiMethodWithParameters = async (\n apiMethodId: string,\n body: Record<string, unknown>\n): Promise<{ status: number; data?: unknown }> =>\n executeQueryWithParametersUntyped({ data: body }, apiMethodId) as Promise<{\n status: number;\n data?: unknown;\n }>;\n\n/**\n * POST workflow/{id}/start on the Builder API — v1's executeStartWorkflow\n * (actions/utils/actionUtils.js:32-40): the record is the body, and the new\n * play's id comes back as the response data.\n */\nexport const startWorkflow = async (\n workflowId: string,\n payload: Record<string, unknown>\n): Promise<{ status: number; data?: unknown }> =>\n apiMutate(\n ConfigService.builderV1ApiUrl,\n `workflow/${workflowId}/start`,\n { method: 'post' },\n { data: payload }\n ) as Promise<{ status: number; data?: unknown }>;\n\n/** An api-method definition (name, path-parameter spec) — config-shaped. */\nexport interface ApiMethodDefinition {\n apiMethodId?: string;\n name?: string;\n pathParametersDefinition?: unknown;\n [key: string]: unknown;\n}\n\n/**\n * GET apimethod/{id}, cached hard — Execute API needs the method's\n * path-parameter definition to lift path params off the record (v1 refetched\n * it on every click).\n */\nexport const fetchApiMethod = async (\n queryClient: QueryClient,\n apiMethodId: string\n): Promise<ApiMethodDefinition | null> =>\n queryClient.fetchQuery({\n queryKey: inquiryKeys.apiMethod(apiMethodId),\n staleTime: 30 * 60 * 1000,\n queryFn: async () => {\n try {\n return await apiGet<ApiMethodDefinition>(\n ConfigService.integrationV1ApiUrl,\n `apimethod/${apiMethodId}`\n );\n } catch {\n return null;\n }\n }\n });\n\n/**\n * Bulk api-method lookup for drop-to-Execute-API: the drop dialog lists the\n * methods behind the target's On_Node_Drop actions (v1 wire contract —\n * POST apiMethod/listByApiCatalogIdAndIds/{catalogId} with the id array).\n */\nexport const fetchApiMethodsByIds = async (\n catalogId: string,\n apiMethodIds: string[]\n): Promise<ApiMethodDefinition[]> => {\n const response = (await apiMutate(\n ConfigService.integrationV2ApiUrl,\n `apiMethod/listByApiCatalogIdAndIds/${catalogId}`,\n { method: 'post' },\n { data: apiMethodIds }\n )) as { data?: ApiMethodDefinition[] };\n return response.data ?? [];\n};\n\n/** Config documents change on builder saves, not per interaction. */\nexport const CONFIG_STALE_TIME = 10 * 60 * 1000;\n\nexport const inquiryKeys = {\n tree: (treeId: string) => ['inquiry', 'tree', treeId] as const,\n catalogBinding: (tenantId: string) =>\n ['inquiry', 'catalogBinding', tenantId] as const,\n catalog: (catalogId: string, treeId: string) =>\n ['inquiry', 'catalog', catalogId, treeId] as const,\n promotedEntities: (catalogId: string, productId: string) =>\n ['inquiry', 'promotedEntities', catalogId, productId] as const,\n page: (pageId: string) => ['page', pageId] as const,\n record: (entityName: string, recordKey: string) =>\n ['record', entityName, recordKey] as const,\n records: (entityName: string, searchHash: string) =>\n ['records', entityName, searchHash] as const,\n /** One record fetched by its identifier `=` filters (search → load record). */\n recordByIdentifiers: (\n entityName: string,\n filterElements: Array<Record<string, unknown>>\n ) =>\n [\n 'records',\n entityName,\n 'byId',\n JSON.stringify(\n filterElements.map((element) => [\n element.searchField,\n element.searchValue\n ])\n )\n ] as const,\n /**\n * One child-level fetch — a wave's batched `parentFK IN (…)` request or a\n * lazy expand's single-parent one, which is the SAME request with one value.\n * Keyed by the method and the exact body, so a re-expand (or a second wave\n * over the same parents) is answered from cache without a network hop.\n */\n childBatch: (apiMethodId: string, bodyHash: string) =>\n ['inquiry', 'childBatch', apiMethodId, bodyHash] as const,\n entityMeta: (entityName: string) => ['entityMeta', entityName] as const,\n lookupMethod: (catalogId: string) => ['lookupMethod', catalogId] as const,\n lookup: (lookupId: string) => ['lookup', lookupId] as const,\n apiMethod: (apiMethodId: string) => ['apiMethod', apiMethodId] as const,\n alert: (alertId: string) => ['alert', alertId] as const,\n action: (actionId: string) => ['action', actionId] as const,\n aggregateThresholdValue: (aggregateThresholdId: string) =>\n ['aggregateThresholdValue', aggregateThresholdId] as const,\n /** One bulk child-count cell: (child method × parent-ref field × filter) × parent value. */\n bulkChildCount: (requestKey: string, keyValue: string) =>\n ['inquiry', 'bulkChildCount', requestKey, keyValue] as const,\n /** An aggregate-threshold definition (config — shared by menu badges and the node view). */\n aggregateThreshold: (aggregateThresholdId: string) =>\n ['inquiry', 'aggregateThreshold', aggregateThresholdId] as const,\n /** One user's recently-loaded-record history for one tree (server-held). */\n recentlyLoaded: (treeId: string, userId: string) =>\n ['inquiry', 'recentlyLoaded', treeId, userId] as const,\n /** A tree row's aggregate-threshold badge: threshold × the row's param values. */\n aggregateBadge: (aggregateThresholdId: string, paramsKey: string) =>\n ['inquiry', 'aggregateBadge', aggregateThresholdId, paramsKey] as const\n};\n\n/**\n * THE refresh mechanism for everything a mutation over the tree can change.\n *\n * Tree ROW data lives under four key families, and a refresh that misses any of\n * them leaves part of the tree stale: `['records', …]` (the root page, and the\n * by-identifier reads the Load flow caches), `['inquiry','childBatch', …]`\n * (every eager wave and lazy expand), plus the two badge families the rows\n * carry. The tree CONFIG (`['inquiry','tree', …]`) is deliberately NOT here —\n * it changes on a Tree Builder save, never on a record mutation, and\n * invalidating it would refetch the whole tree document on every create.\n * Resolves once the active queries have refetched.\n */\nexport const invalidateInquiryRowData = async (\n queryClient: QueryClient\n): Promise<void> => {\n await Promise.all(\n [\n ['records'],\n ['inquiry', 'childBatch'],\n ['inquiry', 'bulkChildCount'],\n ['inquiry', 'aggregateBadge']\n ].map((queryKey) => queryClient.invalidateQueries({ queryKey }))\n );\n};\n\n/** An alert config (aggregate-threshold bearing) behind a node-level alert. */\nexport interface AlertConfig {\n aggregateThresholdId?: string;\n [key: string]: unknown;\n}\n\n/**\n * Fetch a node-level alert config (`alert/{alertId}`, tenant v1 — the legacy\n * UdpAlert source). Config data, cached hard; failures surface as no data so\n * the alert chip simply doesn't render.\n */\nexport const useAlert = (\n alertId: string | null | undefined\n): UseQueryResult<AlertConfig> =>\n useQuery({\n queryKey: inquiryKeys.alert(alertId ?? ''),\n queryFn: ({ signal }) =>\n apiGet<AlertConfig>(ConfigService.tenantV1ApiUrl, `alert/${alertId}`, {\n signal\n }),\n enabled: !!alertId,\n staleTime: CONFIG_STALE_TIME\n });\n\n/**\n * Fetch an action definition by id (`action/{actionId}`, integration v1 — the\n * legacy useActions.executeGetAction source). Only actions that sit on no\n * panel need this: panel rows ship their action inline. Imperative because it\n * runs inside a click, not a render; cached like every other config document.\n */\nexport const fetchAction = <T,>(\n queryClient: QueryClient,\n actionId: string\n): Promise<T> =>\n queryClient.fetchQuery({\n queryKey: inquiryKeys.action(actionId),\n queryFn: ({ signal }) =>\n apiGet<T>(ConfigService.integrationV1ApiUrl, `action/${actionId}`, {\n signal\n }),\n staleTime: CONFIG_STALE_TIME\n });\n\nexport interface AggregateThresholdValue {\n /** The aggregateThreshold config (numeric severity rules; getThresholdStatus reads it). */\n threshold: Record<string, unknown> | null;\n /** Rounded aggregate value, or '' when unavailable. */\n value: number | '';\n}\n\n/**\n * Resolve an aggregate threshold's live value (legacy AggregateChip's internal\n * two-step): fetch `aggregateThreshold/{id}` (integration v2 — config, cached\n * hard and shared by the node view and the tree-menu badges) then execute its\n * query instance with `params`. Rejects when either request fails.\n */\nexport const fetchAggregateThresholdValue = async (\n queryClient: QueryClient,\n aggregateThresholdId: string,\n params: Record<string, unknown> = {}\n): Promise<AggregateThresholdValue> => {\n const threshold = await queryClient.fetchQuery({\n queryKey: inquiryKeys.aggregateThreshold(aggregateThresholdId),\n queryFn: async ({ signal }) =>\n (await apiGet<Record<string, unknown> | null>(\n ConfigService.integrationV2ApiUrl,\n `aggregateThreshold/${aggregateThresholdId}`,\n { signal }\n )) ?? null,\n staleTime: CONFIG_STALE_TIME,\n retry: false\n });\n const apiMethodInstanceId = threshold?.apiMethodInstanceId as\n | string\n | undefined;\n const aggregateKey = threshold?.aggregateKey as string | undefined;\n if (!apiMethodInstanceId || !aggregateKey) {\n return { threshold, value: '' };\n }\n const response = await executeQueryInstance(\n { data: params },\n apiMethodInstanceId\n );\n const raw = response?.data?.aggregateResults?.[0]?.[aggregateKey];\n return { threshold, value: raw ? Math.round(raw) : '' };\n};\n\n/**\n * The node view's aggregate value — executed with no params, the same\n * empty-params call the alert path made through AggregateChip. Aggregate\n * values are live, so cached briefly.\n */\nexport const useAggregateThresholdValue = (\n aggregateThresholdId: string | null | undefined,\n params: Record<string, unknown> = {}\n): UseQueryResult<AggregateThresholdValue> => {\n const queryClient = useQueryClient();\n return useQuery({\n queryKey: [\n ...inquiryKeys.aggregateThresholdValue(aggregateThresholdId ?? ''),\n params\n ],\n queryFn: () =>\n fetchAggregateThresholdValue(queryClient, aggregateThresholdId ?? '', params),\n enabled: !!aggregateThresholdId,\n staleTime: 30 * 1000\n });\n};\n\n/**\n * One tree, typed — `inquiryTree/{id}`, the read the Tree Builder edits. A\n * root tree and the trees its levels link to are the same read under the same\n * key, so each is fetched once whichever asks first.\n */\nconst inquiryTreeQuery = (treeId: string) => ({\n queryKey: inquiryKeys.tree(treeId),\n queryFn: async ({ signal }: { signal: AbortSignal }) =>\n fromWire(\n await apiGet<InquiryTreeWire>(\n ConfigService.integrationV1ApiUrl,\n `inquirytree/${treeId}`,\n { signal }\n )\n ),\n staleTime: CONFIG_STALE_TIME\n});\n\n/** Fetch an inquiry tree (config — cached hard). */\nexport const useInquiryTree = (\n treeId: string | null | undefined\n): UseQueryResult<InquiryTree> =>\n useQuery({ ...inquiryTreeQuery(treeId ?? ''), enabled: !!treeId });\n\n/**\n * A tree, imperatively — the load-to-tree door needs a tree the viewer is NOT\n * mounted on. Same query as useInquiryTree, so a tree the user later opens is a\n * cache hit.\n */\nexport const fetchInquiryTree = (\n queryClient: QueryClient,\n treeId: string\n): Promise<InquiryTree> => queryClient.fetchQuery(inquiryTreeQuery(treeId));\n\n/**\n * The trees this tree's levels link to (`associatedTreeId`), by that id. It\n * follows the ids on the tree it is handed, so a builder's unsaved link is read\n * too. Fetched with the tree because the searchable set is derived from them\n * up front. `trees` holds every one that has answered (a tree that failed is\n * left out); `settled` once none is still pending — a link added later loads\n * beside the trees already in hand rather than hiding them.\n */\nexport const useLinkedTrees = (\n tree: InquiryTree | null | undefined\n): { trees: LinkedTrees; settled: boolean } => {\n const idList = [\n ...new Set(\n (tree?.nodes ?? []).flatMap((node) =>\n isEntityNode(node) && node.properties.associatedTreeId\n ? [node.properties.associatedTreeId]\n : []\n )\n )\n ].join(',');\n const ids = useMemo(() => (idList ? idList.split(',') : []), [idList]);\n return useQueries({\n queries: ids.map(inquiryTreeQuery),\n combine: (results) => ({\n trees: Object.fromEntries(\n ids.flatMap((id, index) => {\n const linked = results[index]?.data;\n return linked ? [[id, linked]] : [];\n })\n ),\n settled: !results.some((result) => result.isPending)\n })\n });\n};\n\n/* ------------------------------------------------ recently loaded records */\n\n/**\n * One entry of the tree's recently-loaded history, exactly as v1 wrote it\n * (InquiryContainer's getLoadedNodeObject). The history is SERVER-held, per\n * user × tree × product, and the Recently Loaded widget on an explore page\n * reads this shape straight off its widget params.\n */\nexport interface RecentlyLoadedNode {\n productId?: string;\n inquiryTreeId?: string;\n userId?: string;\n apiMethodId?: string;\n dateLoaded?: string;\n nodeDetails?: {\n nodeLabel?: string;\n catalogReturnObject?: string;\n treeStructureId?: string;\n };\n /** The search body that refetches the record — replayed on click. */\n queryPayload?: Record<string, unknown>;\n [key: string]: unknown;\n}\n\n/**\n * The tree's recently-loaded history for the signed-in user. Same endpoint v1's\n * host route called (`loadedInquiryTreeNodes`), so v1 and v2 read and write ONE\n * list — a record loaded in either viewer shows up in both.\n */\nexport const useRecentlyLoadedNodes = (\n treeId: string | null | undefined,\n userId: string | null | undefined\n): UseQueryResult<RecentlyLoadedNode[]> =>\n useQuery({\n queryKey: inquiryKeys.recentlyLoaded(treeId ?? '', userId ?? ''),\n queryFn: ({ signal }) =>\n apiGet<RecentlyLoadedNode[]>(\n ConfigService.integrationV1ApiUrl,\n `inquirytree/loadedInquiryTreeNodes?inquiryTreeId=${treeId}&userId=${userId}&productId=${ConfigService.config.UNITY_PRODUCT_ID}`,\n { signal }\n ),\n enabled: !!treeId && !!userId,\n staleTime: 30 * 1000,\n // The landing page still renders without a history; a retry storm behind an\n // optional widget is worse than an empty table.\n retry: false\n });\n/** One history entry of a (possibly bulk) load. */\nexport interface RecentlyLoadedWriteEntry {\n apiMethodId: string;\n entityName: string;\n treeStructureId: string;\n label: string;\n filterElements: Array<Record<string, unknown>>;\n}\n\n/**\n * The batch form — the endpoint's body is already an array, so a bulk load of\n * twenty records is ONE POST and ONE history refetch instead of twenty of each.\n */\nexport const recordRecentlyLoadedNodes = async (\n queryClient: QueryClient,\n {\n treeId,\n userId,\n entries\n }: {\n treeId: string;\n userId: string | null | undefined;\n entries: RecentlyLoadedWriteEntry[];\n }\n): Promise<void> => {\n const rows = entries.filter(\n (entry) => entry.apiMethodId && entry.filterElements.length\n );\n if (!treeId || !userId || !rows.length) return;\n const productId = ConfigService.config.UNITY_PRODUCT_ID;\n try {\n await apiMutate(\n ConfigService.integrationV1ApiUrl,\n `inquirytree/${treeId}/loadedInquiryTreeNodes/user/${userId}/product/${productId}`,\n { method: 'post' },\n {\n data: rows.map((entry) => ({\n productId,\n inquiryTreeId: treeId,\n userId,\n apiMethodId: entry.apiMethodId,\n nodeDetails: {\n nodeLabel: entry.label,\n catalogReturnObject: entry.entityName,\n treeStructureId: entry.treeStructureId\n },\n queryPayload: getSearchObject(entry.filterElements as never, 1, 1)\n }))\n }\n );\n } catch {\n return;\n }\n void queryClient.invalidateQueries({\n queryKey: inquiryKeys.recentlyLoaded(treeId, userId)\n });\n};\n\n/**\n * The tenant/product → api-catalog binding (`tenantProductApiCatalogBase`).\n * The Shell's ActionProvider resolves the same binding into a zustand store,\n * but v2 must not depend on a provider side effect for correctness — it\n * fetches through the cache like everything else (TanStack dedupes the two).\n */\nexport const useApiCatalogBinding = (\n tenantId: string | null | undefined\n): UseQueryResult<{ apiCatalogId?: string }> =>\n useQuery({\n queryKey: inquiryKeys.catalogBinding(tenantId ?? ''),\n queryFn: ({ signal }) =>\n apiGet<{ apiCatalogId?: string }>(\n ConfigService.integrationV1ApiUrl,\n `tenantProductApiCatalogBase/tenant/${tenantId}/product/${ConfigService.config.UNITY_PRODUCT_ID}`,\n { signal }\n ),\n enabled: !!tenantId,\n staleTime: 30 * 60 * 1000\n });\n\n/**\n * Promoted CRUD/search methods for every entity in a catalog — the domain\n * lazy-load composer's search-method fallback (same read the legacy\n * usePromotedMethodEntities hook caches in the catalog store).\n */\nexport const usePromotedMethodEntities = (\n catalogId: string | null | undefined,\n /**\n * Promotions are PER PRODUCT. A tree's levels load through its own product's\n * promotions — the host app's product only when the tree names none (a tree\n * from another product previewed or viewed here would otherwise report every\n * child level as un-promoted).\n */\n productId: string | number | null | undefined = ConfigService.config\n .UNITY_PRODUCT_ID\n): UseQueryResult<PromotedEntity[]> => {\n const product = String(productId ?? ConfigService.config.UNITY_PRODUCT_ID);\n return useQuery({\n queryKey: inquiryKeys.promotedEntities(catalogId ?? '', product),\n queryFn: ({ signal }) =>\n apiGet<PromotedEntity[]>(\n ConfigService.integrationV1ApiUrl,\n `apiCatalog/${catalogId}/promotedMethodEntities?productId=${product}`,\n { signal }\n ),\n enabled: !!catalogId,\n staleTime: 30 * 60 * 1000\n });\n};\n\n/**\n * The catalog objects (models + relationships) for a tree's entity graph —\n * the same integration-v2 read the legacy Inquiry loader performs. The domain\n * display-tree/lazy-load composers take these to resolve child search methods\n * and icons. Config-shaped: cached hard.\n */\nexport const useTreeCatalogObjects = (\n catalogId: string | null | undefined,\n treeId: string | null | undefined\n): UseQueryResult<CatalogObject[]> =>\n useQuery({\n queryKey: inquiryKeys.catalog(catalogId ?? '', treeId ?? ''),\n queryFn: ({ signal }) =>\n apiGet<CatalogObject[]>(\n ConfigService.integrationV2ApiUrl,\n `apiCatalog/${catalogId}/inquiryTree/${treeId}/withDescendants?modelsOnly=true`,\n { signal }\n ),\n enabled: !!catalogId && !!treeId,\n staleTime: 30 * 60 * 1000\n });\n\n/** One attribute's lookup config, as it rides `response.data.lookupsMap`. */\nexport interface LookupsMapEntry {\n /** The lookup's id (UdpLookup.id). */\n value?: string;\n lookupKeyName?: string | null;\n lookupValueName?: string | null;\n}\n\n/** `response.data.lookupsMap` — attribute name → lookup config. */\nexport type LookupsMap = Record<string, LookupsMapEntry>;\n\n/** A lookup's get-data payload (rows + key/value column names). */\ninterface LookupWire {\n data?: Array<Record<string, unknown>>;\n keyName?: string;\n valueName?: string;\n udpLookupUdpLookupKey?: Array<{ name: string }>;\n}\n\n/** A resolved lookup table: its key column(s), value column and rows. */\ninterface LookupTable {\n keyNames: string[];\n valueName: string;\n rows: Array<Record<string, unknown>>;\n}\n\n/**\n * The promoted UdpLookup get-data method id — the same read\n * `usePromotedLookupMethods` performs for the grid/DataBrowser lookup paths.\n * Config-shaped: one request per catalog for the session.\n */\nconst lookupMethodQueryOptions = (catalogId: string) => ({\n queryKey: inquiryKeys.lookupMethod(catalogId),\n staleTime: 30 * 60 * 1000,\n queryFn: async () => {\n try {\n const methods = await apiGet<\n Record<string, { apiMethodId?: string } | undefined>\n >(\n ConfigService.integrationV1ApiUrl,\n `apicatalog/${catalogId}/promotedMethodEntities/${UdpEnums.Udp_Lookup}/product/${ConfigService.config.UNITY_PRODUCT_ID}?compareSanitizedName=true`\n );\n return (\n methods?.unityBaseGetDataMethod?.apiMethodId ??\n methods?.unityBaseGetMethod?.apiMethodId ??\n null\n );\n } catch {\n return null;\n }\n }\n});\n\nconst fetchLookupGetDataMethodId = async (\n queryClient: QueryClient,\n catalogId: string\n): Promise<string | null> =>\n queryClient.fetchQuery(lookupMethodQueryOptions(catalogId));\n\n/**\n * Warm `['lookupMethod', catalogId]` alongside the other catalog-shaped reads\n * (catalog objects / promoted methods) instead of discovering it lazily inside\n * the first lookup fetch. Same key, same options — one cache entry, just\n * requested a wave earlier so lookup stamping never pays for this hop.\n */\nexport const usePrefetchLookupMethod = (\n catalogId: string | null | undefined\n): void => {\n const queryClient = useQueryClient();\n useEffect(() => {\n if (!catalogId) return;\n void queryClient.prefetchQuery(lookupMethodQueryOptions(catalogId));\n }, [queryClient, catalogId]);\n};\n\n/**\n * One lookup's rows, cached per lookup id (the TanStack twin of the grid\n * lookupHelper's module-level table cache): a lookup is fetched once and\n * every node/row that references it reads the same entry.\n */\nconst fetchLookupTable = async (\n queryClient: QueryClient,\n catalogId: string,\n lookupId: string\n): Promise<LookupTable | null> =>\n queryClient.fetchQuery({\n queryKey: inquiryKeys.lookup(lookupId),\n staleTime: 30 * 60 * 1000,\n queryFn: async () => {\n const apiMethodId = await fetchLookupGetDataMethodId(\n queryClient,\n catalogId\n );\n if (!apiMethodId) return null;\n try {\n const response = await executeQueryWithParameters(\n { data: { id: lookupId } },\n apiMethodId\n );\n const lookup = response?.data;\n if (!lookup?.data?.length || !lookup.valueName) return null;\n // Legacy single-key lookups carry keyName; current ones carry the\n // udpLookupUdpLookupKey rows.\n const keyNames = lookup.keyName\n ? [lookup.keyName]\n : (lookup.udpLookupUdpLookupKey ?? []).map((key) => key.name);\n if (!keyNames.length) return null;\n return { keyNames, valueName: lookup.valueName, rows: lookup.data };\n } catch {\n return null;\n }\n }\n });\n\n/**\n * Single key: the row holds the key under the ATTRIBUTE's own name, which may\n * differ from the lookup's key column. Multi-key: each key matches by its own\n * name on the row (grid lookupHelper's rule).\n */\nconst compositeKey = (row: Record<string, unknown>, keys: string[]) =>\n JSON.stringify(keys.map((key) => toJsonString(row[key])));\n\n/**\n * One index per (table, key column), first row winning, as `find` did. Keyed\n * on the cached table object, so every page stamped against the same cache\n * entry reuses the index instead of re-scanning the table.\n */\nconst lookupIndexes = new WeakMap<\n LookupTable,\n Map<string, Map<string, Record<string, unknown>>>\n>();\n\nconst lookupIndexFor = (table: LookupTable, keyName: string) => {\n const multiKey = table.keyNames.length > 1;\n const indexId = multiKey ? '' : keyName;\n let byColumn = lookupIndexes.get(table);\n if (!byColumn) {\n byColumn = new Map();\n lookupIndexes.set(table, byColumn);\n }\n let index = byColumn.get(indexId);\n if (!index) {\n index = new Map();\n for (const lookupRow of table.rows) {\n const key = multiKey\n ? compositeKey(lookupRow, table.keyNames)\n : toJsonString(lookupRow[keyName]);\n if (!index.has(key)) index.set(key, lookupRow);\n }\n byColumn.set(indexId, index);\n }\n return index;\n};\n\n/**\n * Stamp lookup display text onto rows as `<field>LookupValue` siblings — the\n * row-stamping idiom the grid and the WR detail panel already use, so the\n * pure model layer can prefer the text without ever fetching. Raw values are\n * left untouched (filters/identifiers still read them), and any lookup that\n * fails to resolve simply isn't stamped: the header falls back to the raw\n * value, exactly as before.\n */\nconst stampLookupValues = async (\n queryClient: QueryClient,\n catalogId: string | null | undefined,\n rows: Array<Record<string, unknown>>,\n lookupsMap: LookupsMap | null | undefined\n): Promise<Array<Record<string, unknown>>> => {\n const configs = Object.entries(lookupsMap ?? {}).flatMap(\n ([attribute, config]) =>\n config?.value ? [{ attribute, lookupId: config.value, config }] : []\n );\n if (!catalogId || !rows.length || !configs.length) return rows;\n\n const tables = new Map<string, LookupTable | null>();\n await Promise.all(\n Array.from(new Set(configs.map(({ lookupId }) => lookupId))).map(\n async (lookupId) => {\n tables.set(\n lookupId,\n await fetchLookupTable(queryClient, catalogId, lookupId)\n );\n }\n )\n );\n\n return rows.map((row) => {\n let stamped = row;\n for (const { attribute, lookupId, config } of configs) {\n const table = tables.get(lookupId);\n const raw = row[attribute];\n if (!table || raw === null || raw === undefined) continue;\n const valueName = config.lookupValueName || table.valueName;\n const keyName = config.lookupKeyName || table.keyNames[0];\n if (!valueName || !keyName) continue;\n const match = lookupIndexFor(table, keyName).get(\n table.keyNames.length > 1\n ? compositeKey(row, table.keyNames)\n : toJsonString(raw)\n );\n const text = match?.[valueName];\n if (text === null || text === undefined) continue;\n if (stamped === row) stamped = { ...row };\n stamped[`${attribute}LookupValue`] = text;\n }\n return stamped;\n });\n};\n\n/**\n * An entity's lookup-bearing attributes as a LookupsMap. Lookup config rides\n * the CATALOG ATTRIBUTE (`extendedProperties.lookup` + its key/value column\n * names) — the same client-side derivation the maintenance grid performs\n * (UdpDataBrowserPage.jsx:229-247) — so any producer holding an entity name\n * can stamp its rows.\n */\nconst deriveLookupsMap = (\n catalogObjects: CatalogObject[] | null | undefined,\n entityName: string | null | undefined\n): LookupsMap => {\n const properties = catalogObjects?.find(\n (candidate) => candidate.catalogObjectName === entityName\n )?.properties;\n const map: LookupsMap = {};\n for (const property of properties ?? []) {\n const extended = property?.extendedProperties as\n | {\n lookup?: string | null;\n lookupKeyName?: string | null;\n lookupValueName?: string | null;\n }\n | null\n | undefined;\n const name = property?.name;\n if (!extended?.lookup || !name) continue;\n // Wire rows are camelCase; catalog attribute names may be Pascal-cased\n // (CrudTableColumnDefs.js:41 derives its grid field the same way).\n map[toLowerFirstChar(name) as string] = {\n value: extended.lookup,\n lookupKeyName: extended.lookupKeyName,\n lookupValueName: extended.lookupValueName\n };\n }\n return map;\n};\n\n/** What a producer needs to stamp lookup display text onto a page of rows. */\nexport interface LookupStampContext {\n queryClient: QueryClient;\n catalogId: string | null | undefined;\n /** The tree's catalog objects — the source of each entity's lookup config. */\n catalogObjects?: CatalogObject[] | null;\n /**\n * Display text from the product's entity config (maintenance's\n * stampDisplayText): a foreign key the catalog has no lookup for shows its\n * linked record's label, as maintenance does.\n */\n stampDisplayText?: (\n entityName: string,\n rows: Array<Record<string, unknown>>\n ) => Promise<Array<Record<string, unknown>>>;\n}\n\n/**\n * Stamp a page of rows whose entity is KNOWN: the entity's catalog lookup\n * config, overridden by a response's own `lookupsMap` where present. Every v2\n * producer — root page, lazy child page, search-loaded record — funnels\n * through here so a label/header chip on an FK field reads the same wherever\n * the row came from. v2 fetches every level lean (`eagerLoad: false`), so a\n * row carries no nested association rows to stamp.\n */\nexport const stampRecordRows = async (\n context: LookupStampContext,\n entityName: string | null | undefined,\n rows: Array<Record<string, unknown>>,\n responseLookupsMap?: LookupsMap | null\n): Promise<Array<Record<string, unknown>>> => {\n const { queryClient, catalogId, catalogObjects, stampDisplayText } = context;\n const stamped = await stampLookupValues(queryClient, catalogId, rows, {\n ...deriveLookupsMap(catalogObjects, entityName),\n ...(responseLookupsMap ?? {})\n });\n // A catalog lookup already stamped wins; entity config fills the rest.\n return stampDisplayText && entityName\n ? stampDisplayText(entityName, stamped)\n : stamped;\n};\n\nexport interface RecordRows {\n rows: Array<Record<string, unknown>>;\n total: number;\n /** The response's own lookup config, for the caller's stamping pass. */\n lookupsMap?: LookupsMap | null;\n}\n\n/** An ad hoc search response as RecordRows. */\nconst toRecordRows = (response: {\n data?: {\n pageList?: Array<Record<string, unknown>>;\n total?: number;\n lookupsMap?: LookupsMap;\n };\n}): RecordRows => ({\n rows: response.data?.pageList ?? [],\n total: response.data?.total ?? 0,\n lookupsMap: response.data?.lookupsMap ?? null\n});\n\n/**\n * How an interactive record read caches and fails: 30 s fresh, and NO retry in\n * 'always' network mode — a retry delay can be parked behind TanStack's\n * focus/online gates, which hangs the await (the eternal-spinner defect the\n * search hook's SEARCH_FAILURE_MODE fixes the same way). Callers surface the\n * failure instead: the sidebar's error bar, a load's toast, a level's row\n * message.\n */\nconst INTERACTIVE_READ = {\n staleTime: 30 * 1000,\n retry: false,\n networkMode: 'always'\n} as const;\n\n/**\n * The tree menu's seed. LEAN — `eagerLoad: false`: no child records ride the\n * response. Every level below the root is fetched by the wave loader (eager\n * levels) or on expand (lazy ones), so nothing here may depend on embedded\n * association arrays.\n *\n * Two shapes, one query:\n * - the ROOT PAGE: `pageSize` records, the root level's initial record count;\n * - ENTRY FROM RECORD (`?node=`/`?nodeSearch=`): `identifierFilters` names one\n * record and the page is just that record — two rows are asked for and the\n * page is empty unless exactly one matches (rowForIdentifierSet).\n *\n * The request carries the Data Builder query's OWN saved filters/order\n * (`instanceFilters`): ad-hoc execution ignores the instance body, so a query's\n * filters reach the server only because they are composed in here.\n *\n * The rows stay RAW in the cache. Lookup display text is stamped by the caller\n * in the same pass that hydrates the eager levels (tree/useHydratedRootRows),\n * so one root load composes the tree once.\n */\nexport const useRootRecords = ({\n treeId,\n apiMethodId,\n entityName,\n instanceFilters,\n identifierFilters,\n pageSize = 25,\n enabled = true\n}: {\n treeId: string;\n apiMethodId: string | number | null | undefined;\n entityName: string;\n /** The tree query's resolved saved filters (api/instanceBodyModel). */\n instanceFilters?: InstanceBodyFilters | null;\n /** Entry from record: the one record's identifier `=` filters. */\n identifierFilters?: Array<Record<string, unknown>> | null;\n pageSize?: number;\n /**\n * Held back while the caller still needs the catalog to decide WHAT to ask\n * for — an entry-from-record deep link must not fire the whole root page\n * first and then replace it.\n */\n enabled?: boolean;\n}): UseQueryResult<RecordRows> => {\n const filtersHash = instanceFiltersHash(instanceFilters);\n const entryHash = identifierFilters?.length\n ? JSON.stringify(\n identifierFilters.map((element) => [\n element.searchField,\n element.searchValue\n ])\n )\n : '';\n const queryKey = useMemo(\n () =>\n inquiryKeys.records(\n entityName,\n `tree-root:${treeId}:${pageSize}:${filtersHash}:${entryHash}`\n ),\n [entityName, treeId, pageSize, filtersHash, entryHash]\n );\n return useQuery({\n queryKey,\n queryFn: async () => {\n const { searchFilterElements, searchFilterGroups } =\n composeInstanceSearchFilters({ instanceFilters });\n const search = getSearchObject(\n [\n ...(searchFilterElements as Array<Record<string, unknown>>),\n ...(identifierFilters ?? [])\n ] as never,\n 1,\n identifierFilters?.length ? 2 : pageSize,\n false,\n LogicalSearchOperatorEnums.And,\n searchFilterGroups as never\n );\n // The root page requests no ordering of its own, so the query's saved\n // ordering stands.\n if (instanceFilters?.orderElements.length) {\n search.orderElements = instanceFilters.orderElements.map((order) => ({\n ...order\n }));\n }\n const page = toRecordRows(\n await executeQueryAdHoc({ data: search }, String(apiMethodId))\n );\n if (!identifierFilters?.length) return page;\n const row = rowForIdentifierSet(page.rows, identifierFilters, true);\n return { ...page, rows: row ? [row] : [], total: row ? 1 : 0 };\n },\n // Deliberately NOT gated on the catalog: the rows are the first paint, and\n // lookup display text is stamped onto them afterwards — so the root page\n // never waits on the catalog wave, nor on the lookup fetches.\n enabled: enabled && !!apiMethodId && !!entityName,\n // GROWING THE WINDOW IS NOT A NEW LOAD. `pageSize` is part of the key, so\n // \"show more\" mints a fresh query — and without this the tree would blank\n // back to its loading placeholder while the bigger page is in flight, which\n // is the one thing a request to see MORE rows must not do. The rows already\n // on screen stand until the wider answer replaces them.\n placeholderData: keepPreviousData,\n // The toolbar's Refresh is the retry.\n ...INTERACTIVE_READ\n });\n};\n\n/**\n * Fetch records by identifier sets in one request — every load by identifiers\n * (Load dialog picks, \"Load selected\", deep links, a record's refresh). LEAN:\n * the record's levels are filled by the wave loader afterwards. Each\n * identifier set becomes an AND group and the groups combine with OR, so\n * twenty picks cost one search instead of twenty (the per-record pipeline made\n * 50+ requests for a 20-record bulk load, observed 2026-08-27). Returns the\n * rows the server matched, lookup-stamped when given a context. One row more\n * than the sets is asked for, so a set matching several records shows as\n * ambiguous rather than as its first match (resolveIdentifierSets).\n */\nexport const fetchRecordsByIdentifierSets = async (\n queryClient: QueryClient,\n apiMethodId: string,\n identifierSets: Array<Array<Record<string, unknown>>>,\n lookupContext?: LookupStampContext & { entityName?: string | null }\n): Promise<Array<Record<string, unknown>>> => {\n const sets = identifierSets.filter((set) => set.length);\n if (!sets.length) return [];\n const filterElements = sets.flatMap((set, index) =>\n set.map((element) => ({ ...element, groupId: index + 1 }))\n );\n const filterGroups = sets.map((_, index) => ({\n groupId: index + 1,\n parentGroupId: null,\n logicalSearchOperator: LogicalSearchOperatorEnums.And\n }));\n // Cached like every other read: loading the same records twice is a cache\n // hit, and record mutations already invalidate `['records']`, which this\n // key sits under.\n return queryClient.fetchQuery({\n queryKey: inquiryKeys.recordByIdentifiers(\n lookupContext?.entityName ?? apiMethodId,\n filterElements\n ),\n ...INTERACTIVE_READ,\n queryFn: async () => {\n const response = await executeQueryAdHoc(\n {\n data: getSearchObject(\n filterElements as unknown as Parameters<typeof getSearchObject>[0],\n 1,\n sets.length + 1,\n false,\n LogicalSearchOperatorEnums.Or,\n filterGroups as unknown as Parameters<typeof getSearchObject>[5]\n )\n },\n apiMethodId\n );\n const rows = response.data?.pageList ?? [];\n if (!rows.length || !lookupContext) return rows;\n return stampRecordRows(\n lookupContext,\n lookupContext.entityName,\n rows,\n response.data?.lookupsMap\n );\n }\n });\n};\n\n/** Each identifier set's row, null when none or several match (resolveIdentifierSets). */\nexport const fetchRowsForIdentifierSets = (\n queryClient: QueryClient,\n apiMethodId: string,\n identifierSets: Array<Array<Record<string, unknown>>>,\n lookupContext?: LookupStampContext & { entityName?: string | null }\n): Promise<Array<Record<string, unknown> | null>> =>\n resolveIdentifierSets(\n (sets) =>\n fetchRecordsByIdentifierSets(queryClient, apiMethodId, sets, lookupContext),\n identifierSets\n );\n\n/**\n * ONE child-level request — a wave's batched `parentFK IN (…)` fetch or a lazy\n * expand's single-parent one. Cached on (method × exact body), so the same\n * level for the same parents is never asked for twice: a collapsed-then-\n * re-expanded row, a second wave crossing the same parents, and the re-run of\n * the wave pass that follows lookup stamping are all cache hits.\n */\nexport const fetchChildRows = async (\n queryClient: QueryClient,\n apiMethodId: string,\n data: Record<string, unknown>\n): Promise<RecordRows> =>\n queryClient.fetchQuery({\n queryKey: inquiryKeys.childBatch(apiMethodId, JSON.stringify(data)),\n ...INTERACTIVE_READ,\n queryFn: async () =>\n toRecordRows(await executeQueryAdHoc({ data }, apiMethodId))\n });\n\n/**\n * Fetch + normalize a page document. Cached hard (config); the page builder\n * invalidates `inquiryKeys.page(id)` on save.\n */\nexport const usePageDocument = (\n pageId: string | null | undefined\n): UseQueryResult<PageDocument> =>\n useQuery({\n queryKey: inquiryKeys.page(pageId ?? ''),\n queryFn: ({ signal }) =>\n apiGet<PageWire>(ConfigService.tenantV1ApiUrl, `page/${pageId}`, {\n signal\n }),\n enabled: !!pageId,\n staleTime: CONFIG_STALE_TIME,\n select: normalizePageDocument\n });\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAyDA,MAAMsB,oBAAoBC;;AAa1B,MAAMG,6BACJC;;AAMF,MAAMH,uBAAuBC;;;;;;AAoC7B,MAAauC,kBAAkB,OAC7BC,aACAC,WACAX,eAEAU,YAAYE,WAAW;CACrBC,UAAUC,YAAYC,WAAWf,WAAW;CAC5CgB,WAAW,OAAU;CACrBC,SAAS,YAAY;EACnB,MAAMC,YAAYhE,cAAciE,OAAOC;EACvC,MAAMC,eAAe,OACnBC,SACAC,QACsB;AACtB,OAAI;AACF,WAAQ,MAAMtE,OAAOqE,SAASC,IAAI;WAC5B;AACN,WAAO;;;EAGX,MAAME,uBAAuBJ,aAG3BnE,cAAcyE,qBACd,cAAchB,UAAS,iBAAkBX,aAC1C;EACD,MAAM4B,kBAAkBP,aACtBnE,cAAc2E,qBACd,cAA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I,KAAA,CAAC,CAACzG;CAAM,IAAA2G;AAAA,KAAAN,EAAA,OAAAE,MAAAF,EAAA,OAAAG,MAAAH,EAAA,OAAAI,IAAA;AANVE,OAAA;GAAA5F,UACGwF;GAA8BpF,SAC/BqF;GAGLI,SACKH;GAAQvF,WACNsC;GAAiBsM,QACpBzS;GACT;AAAAgJ,IAAA,KAAAE;AAAAF,IAAA,KAAAG;AAAAH,IAAA,KAAAI;AAAAJ,IAAA,KAAAM;OAAAA,MAAAN,EAAA;AAAA,QATDrJ,SAAS2J,GASP;;AAvuB0B,SAAAwB,MAAA4H,MAAA;AAAA,QAMtBvS,aAAauS,KAAyC,IAAhCA,KAAInO,WAAWoO,mBAArC,CACKD,KAAInO,WAAWoO,iBACd,GAFN,EAEM;;AARgB,SAAA/G,OAAAgH,QAAA;AAAA,QAsBWA,OAAMC;;AA6gBjB,SAAA7B,OAAA3J,SAAA;AAAA,QA2Ba,CACjCA,QAAOC,aACPD,QAAOE,YACR;;AA9BqB,SAAAiK,OAAAsB,OAAA;AAAA,QA4D+C,EAAA,GAChEA,OACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionsCapability.d.ts","sourceRoot":"","sources":["../../../../../src/inquiry/v2/capabilities/actions/ActionsCapability.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"ActionsCapability.d.ts","sourceRoot":"","sources":["../../../../../src/inquiry/v2/capabilities/actions/ActionsCapability.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAON,MAAM,OAAO,CAAC;AA+Bf,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AA6BjE,QAAA,MAAM,iBAAiB,mDA4gBtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* single surface host (sheet/confirm modal) mounted as a sibling, rendering
|
|
5
5
|
* nothing while closed. Loaded only when the tree config declares panels.
|
|
6
6
|
*/
|
|
7
|
-
import React, { useContext, useMemo, useRef, useState } from 'react';
|
|
7
|
+
import React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
8
8
|
import { useQueryClient } from '@tanstack/react-query';
|
|
9
9
|
import { useTranslation } from 'react-i18next';
|
|
10
10
|
import { useSnackbar } from 'notistack';
|
|
@@ -19,16 +19,20 @@ import { UdpText } from '../../../../UI/fluent-web-components/UdpText';
|
|
|
19
19
|
import { getPrimaryKeyValues, getPathObject } from '../../../../utilities/maintenanceEngine/CrudBrowserUtilities';
|
|
20
20
|
import { executeApiMethodWithParameters, fetchAction, inquiryKeys } from '../../api/queries';
|
|
21
21
|
import { UdpPageById } from '../../page/UdpPageRenderer';
|
|
22
|
-
import {
|
|
22
|
+
import { ActionType } from '../../../../domain/actionPanel/types';
|
|
23
|
+
import { getSanitizedName } from '../../../../domain/inquiryTree/legalChildren';
|
|
23
24
|
import { PageMountBoundary } from '../../ui/PageMountBoundary';
|
|
24
25
|
import { useInquiryEffects, useMenuRootNode, useRecordRef } from '../../kernel/RecordContext';
|
|
25
26
|
import { useRegisterActionRunner } from '../../kernel/ActionRunnerContext';
|
|
26
|
-
import {
|
|
27
|
+
import { actionFromWire } from '../../../../domain/actionPanel/serialize';
|
|
28
|
+
import { foldHeaderEntries, headerEntries, headerEntryKey, headerFoldOrder, minFoldedHeaderEntries, resolveHeaderActions, resolveStandaloneAction } from './actionModel';
|
|
29
|
+
import { useHeaderFold } from './useHeaderFold';
|
|
27
30
|
import { EntityFormSurface } from './EntityFormSurface';
|
|
28
31
|
import { RetrieveSurface } from './RetrieveSurface';
|
|
29
32
|
import { SNACKBAR_TOP_CENTER } from '../../ui/snackbar';
|
|
30
33
|
import { runAction } from './runAction';
|
|
31
34
|
import { useSheetPanel } from './useSheetPanel';
|
|
35
|
+
import { useReadOnly } from '../../kernel/ReadOnlyContext';
|
|
32
36
|
import styles from './ActionsCapability.module.css';
|
|
33
37
|
// The dispatch context ships from an untyped JS module; pin its shape once.
|
|
34
38
|
const ActionDispatchContext = ActionDispatchContextUntyped;
|
|
@@ -36,6 +40,8 @@ const ActionsCapability = ({ model }) => {
|
|
|
36
40
|
var _a, _b;
|
|
37
41
|
const { t } = useTranslation();
|
|
38
42
|
const record = useRecordRef();
|
|
43
|
+
// The Tree Builder's preview: buttons show as configured, never run.
|
|
44
|
+
const readOnly = useReadOnly();
|
|
39
45
|
const effects = useInquiryEffects();
|
|
40
46
|
const menuRootNode = useMenuRootNode();
|
|
41
47
|
const queryClient = useQueryClient();
|
|
@@ -57,9 +63,29 @@ const ActionsCapability = ({ model }) => {
|
|
|
57
63
|
// the surface that issued it (see closeSurface).
|
|
58
64
|
const [openSeq, setOpenSeq] = useState(0);
|
|
59
65
|
const openSeqRef = useRef(0);
|
|
66
|
+
const barRef = useRef(null);
|
|
60
67
|
const [deleting, setDeleting] = useState(false);
|
|
61
68
|
const { enqueueSnackbar } = useSnackbar();
|
|
62
|
-
|
|
69
|
+
// The tree's promotions, read from the cache under whichever catalog and
|
|
70
|
+
// product the tree is on — not necessarily the app's own catalog. The
|
|
71
|
+
// workspace reads them before any record shows; a list that lands or changes
|
|
72
|
+
// after this mounted (a retry, an embedder that loads them later) is read
|
|
73
|
+
// again when it does.
|
|
74
|
+
const readPromoted = useCallback(() => queryClient
|
|
75
|
+
.getQueriesData({
|
|
76
|
+
queryKey: ['inquiry', 'promotedEntities']
|
|
77
|
+
})
|
|
78
|
+
.flatMap(([, list]) => list !== null && list !== void 0 ? list : []), [queryClient]);
|
|
79
|
+
const [promoted, setPromoted] = useState(readPromoted);
|
|
80
|
+
useEffect(() => queryClient.getQueryCache().subscribe((event) => {
|
|
81
|
+
if (event.type === 'updated' &&
|
|
82
|
+
event.action.type === 'success' &&
|
|
83
|
+
event.query.queryKey[1] ===
|
|
84
|
+
'promotedEntities') {
|
|
85
|
+
setPromoted(readPromoted());
|
|
86
|
+
}
|
|
87
|
+
}), [queryClient, readPromoted]);
|
|
88
|
+
const actions = useMemo(() => resolveHeaderActions(model.panels, record.node, promoted), [model.panels, record.node, promoted]);
|
|
63
89
|
/**
|
|
64
90
|
* A CLOSE BELONGS TO THE SURFACE THAT ISSUED IT.
|
|
65
91
|
*
|
|
@@ -106,7 +132,7 @@ const ActionsCapability = ({ model }) => {
|
|
|
106
132
|
const resolveById = async (id) => {
|
|
107
133
|
try {
|
|
108
134
|
const action = await fetchAction(queryClient, id);
|
|
109
|
-
return resolveStandaloneAction(id, action, record.node);
|
|
135
|
+
return resolveStandaloneAction(id, actionFromWire(action), record.node);
|
|
110
136
|
}
|
|
111
137
|
catch (_a) {
|
|
112
138
|
enqueueSnackbar(t('inquiry.actions.unavailable', {
|
|
@@ -166,11 +192,14 @@ const ActionsCapability = ({ model }) => {
|
|
|
166
192
|
});
|
|
167
193
|
};
|
|
168
194
|
const handleClick = (id) => {
|
|
195
|
+
if (readOnly)
|
|
196
|
+
return;
|
|
169
197
|
void run(id);
|
|
170
198
|
};
|
|
171
199
|
// The node view's shared runner: alert badges fire their threshold action
|
|
172
|
-
// through this exact path (kernel/ActionRunnerContext).
|
|
173
|
-
|
|
200
|
+
// through this exact path (kernel/ActionRunnerContext). A read-only view
|
|
201
|
+
// registers none, so those badges render non-interactive.
|
|
202
|
+
useRegisterActionRunner(readOnly ? null : handleClick);
|
|
174
203
|
const handleConfirmDelete = async () => {
|
|
175
204
|
var _a;
|
|
176
205
|
if ((surface === null || surface === void 0 ? void 0 : surface.kind) !== 'confirmDelete' || !((_a = surface.deleteMethod) === null || _a === void 0 ? void 0 : _a.apiMethodId))
|
|
@@ -188,31 +217,55 @@ const ActionsCapability = ({ model }) => {
|
|
|
188
217
|
closeSurface();
|
|
189
218
|
return;
|
|
190
219
|
}
|
|
220
|
+
const entityName = getSanitizedName(surface.entityName);
|
|
191
221
|
setDeleting(true);
|
|
192
222
|
try {
|
|
193
223
|
const primaryKeyValues = getPrimaryKeyValues(surface.attributes, record.nodeObj);
|
|
194
224
|
const pathObject = getPathObject(surface.deleteMethod.pathParameters, primaryKeyValues);
|
|
195
225
|
await executeApiMethodWithParameters(surface.deleteMethod.apiMethodId, pathObject);
|
|
196
|
-
|
|
197
|
-
|
|
226
|
+
}
|
|
227
|
+
catch (_b) {
|
|
228
|
+
// The dialog stays open: the record is still there, and Delete can be
|
|
229
|
+
// tried again or cancelled.
|
|
230
|
+
enqueueSnackbar(t('inquiry.actions.deleteFailed', {
|
|
231
|
+
defaultValue: 'Unable to delete this {{entityName}} record.',
|
|
232
|
+
entityName
|
|
233
|
+
}), {
|
|
234
|
+
variant: 'error',
|
|
235
|
+
anchorOrigin: SNACKBAR_TOP_CENTER
|
|
198
236
|
});
|
|
199
|
-
|
|
200
|
-
closeSurface();
|
|
237
|
+
return;
|
|
201
238
|
}
|
|
202
239
|
finally {
|
|
203
240
|
setDeleting(false);
|
|
204
241
|
}
|
|
242
|
+
enqueueSnackbar(t('inquiry.actions.deleteSucceeded', {
|
|
243
|
+
defaultValue: '{{entityName}} has been deleted.',
|
|
244
|
+
entityName
|
|
245
|
+
}), {
|
|
246
|
+
variant: 'success',
|
|
247
|
+
anchorOrigin: SNACKBAR_TOP_CENTER
|
|
248
|
+
});
|
|
249
|
+
void queryClient.invalidateQueries({
|
|
250
|
+
queryKey: inquiryKeys.record(record.entityName, record.recordKey)
|
|
251
|
+
});
|
|
252
|
+
// The refresh re-reads the record's branch, so the deleted row leaves the
|
|
253
|
+
// tree and the selection moves to its record parent.
|
|
254
|
+
effects.refreshTree();
|
|
255
|
+
closeSurface();
|
|
205
256
|
};
|
|
257
|
+
const entries = headerEntries(actions);
|
|
258
|
+
const folded = useHeaderFold(barRef, headerFoldOrder(entries), minFoldedHeaderEntries(entries));
|
|
206
259
|
if (!actions.length)
|
|
207
260
|
return null;
|
|
208
261
|
// The failure fallback for a create/update action with no page AND no
|
|
209
262
|
// assemblable default form (v1 ActionSideSheet.jsx:306-318 fell back to its
|
|
210
|
-
// own generated `ActionForm`; v2 mounts the
|
|
211
|
-
// EntityFormSurface — and only says this when
|
|
263
|
+
// own generated `ActionForm`; v2 mounts the entity's maintenance record
|
|
264
|
+
// form — see EntityFormSurface — and only says this when it has none).
|
|
212
265
|
const noFormMessage = (entityName) => entityName
|
|
213
266
|
? t('inquiry.actions.noFormConfiguredFor', {
|
|
214
267
|
defaultValue: 'No form is configured for this {{entityName}} yet.',
|
|
215
|
-
entityName:
|
|
268
|
+
entityName: getSanitizedName(entityName)
|
|
216
269
|
})
|
|
217
270
|
: t('inquiry.actions.noFormConfigured', {
|
|
218
271
|
defaultValue: 'No form is configured for this action.'
|
|
@@ -222,19 +275,28 @@ const ActionsCapability = ({ model }) => {
|
|
|
222
275
|
// derives the parent from the tree's lineage model, so it is populated for
|
|
223
276
|
// every row, not only the one the user personally clicked.
|
|
224
277
|
const { parentNodeObj, parentGroupName, inquiryParams } = record;
|
|
225
|
-
// Configured order is the builder's call
|
|
226
|
-
//
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
const
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
278
|
+
// Configured order is the builder's call. Each authored group is ONE menu
|
|
279
|
+
// button named after it. The row stays one line: what does not fit — and,
|
|
280
|
+
// past the cap, what there are too many of — folds into an overflow menu
|
|
281
|
+
// (a group there becomes a submenu), from the left, a primary button last.
|
|
282
|
+
const { visible: visibleEntries, overflow: overflowEntries } = foldHeaderEntries(entries, folded);
|
|
283
|
+
const menuItem = (action, parentId) => ({
|
|
284
|
+
id: action.id,
|
|
285
|
+
text: action.label,
|
|
286
|
+
startIconName: action.iconName,
|
|
287
|
+
disabled: action.disabled || readOnly,
|
|
288
|
+
parentId,
|
|
289
|
+
onClick: () => handleClick(action.id)
|
|
290
|
+
});
|
|
291
|
+
return (React.createElement(React.Fragment, null, React.createElement("div", { className: styles.bar, ref: barRef }, visibleEntries.map((entry) => (React.createElement("span", { key: headerEntryKey(entry), className: styles.slot, "data-slot": headerEntryKey(entry) }, entry.kind === 'button' ? (React.createElement(UdpButton, { size: "small", appearance: entry.action.isPrimary ? 'primary' : 'secondary', danger: entry.action.action.actionTypeId === ActionType.Delete, startIconName: entry.action.iconName, disabled: entry.action.disabled || readOnly, onClick: () => handleClick(entry.action.id) }, entry.action.label)) : (React.createElement(UdpMenu, { size: "small", label: entry.label, items: entry.actions.map((action) => menuItem(action)) }))))), overflowEntries.length > 0 && (React.createElement("span", { className: styles.slot, "data-slot-menu": true }, React.createElement(UdpMenu, { buttonType: "icon", appearance: "subtle", size: "small",
|
|
292
|
+
// In the END slot the icon replaces the menu button's own
|
|
293
|
+
// chevron — the platform page header's overflow button.
|
|
294
|
+
endIconName: "more-vertical", label: t('common.actions', { defaultValue: 'Actions' }), items: overflowEntries.flatMap((entry) => entry.kind === 'button'
|
|
295
|
+
? [menuItem(entry.action)]
|
|
296
|
+
: [
|
|
297
|
+
{ id: `group:${entry.key}`, text: entry.label },
|
|
298
|
+
...entry.actions.map((action) => menuItem(action, `group:${entry.key}`))
|
|
299
|
+
]) })))), React.createElement("div", { className: styles.overlays }, React.createElement(UdpDrawer, { open: surfaceOpen &&
|
|
238
300
|
((surface === null || surface === void 0 ? void 0 : surface.kind) === 'sheet' ||
|
|
239
301
|
(surface === null || surface === void 0 ? void 0 : surface.kind) === 'pageSheet' ||
|
|
240
302
|
(surface === null || surface === void 0 ? void 0 : surface.kind) === 'retrieve'), position: "end", size: (surface === null || surface === void 0 ? void 0 : surface.kind) === 'retrieve' ? 'small' : 'medium', drawerWidth: (surface === null || surface === void 0 ? void 0 : surface.kind) === 'sheet' ? sheetPanel.drawerWidth : undefined, drawerTitle: (surface === null || surface === void 0 ? void 0 : surface.kind) === 'sheet' ||
|
|
@@ -266,9 +328,18 @@ const ActionsCapability = ({ model }) => {
|
|
|
266
328
|
key: `${surface.pageId}-${surface.mode}`, pageId: surface.pageId, params: Object.assign(Object.assign({}, sheetPanel.panelParams), { entityName: surface.entityName, mode: surface.mode, apiMethodId: surface.apiMethodId, parentNodeObj,
|
|
267
329
|
parentGroupName,
|
|
268
330
|
inquiryParams, nodeId: record.nodeId, selectedNode: record.node, refreshTree: effects.refreshTree }) }))) : (
|
|
269
|
-
// No page configured: the
|
|
270
|
-
// under the same containment a page mount gets.
|
|
271
|
-
React.createElement(PageMountBoundary, { resetKey: `default-form:${openSeq}` }, React.createElement(EntityFormSurface, { surface: surface,
|
|
331
|
+
// No page configured: the entity's maintenance record form,
|
|
332
|
+
// mounted under the same containment a page mount gets.
|
|
333
|
+
React.createElement(PageMountBoundary, { resetKey: `default-form:${openSeq}` }, React.createElement(EntityFormSurface, { surface: surface, nodeObj: record.nodeObj,
|
|
334
|
+
// Where a new record hangs: off the selected record, else
|
|
335
|
+
// beside it under the same parent.
|
|
336
|
+
parents: [
|
|
337
|
+
{ entityName: record.entityName, record: record.nodeObj },
|
|
338
|
+
{
|
|
339
|
+
entityName: record.parentEntityName,
|
|
340
|
+
record: parentNodeObj
|
|
341
|
+
}
|
|
342
|
+
], closeSurface: closeSurface, onCreate: sheetPanel.onCreate, onUpdate: sheetPanel.onUpdate, footer: sheetPanel.footer, unavailableMessage: noFormMessage(surface.entityName) })))), (surface === null || surface === void 0 ? void 0 : surface.kind) === 'pageSheet' &&
|
|
272
343
|
(surface.pageId ? (React.createElement(PageMountBoundary, { resetKey: `${surface.pageId}:${openSeq}` }, React.createElement(UdpPageById, { pageId: surface.pageId, params: {
|
|
273
344
|
// Legacy split-screen widgetParams contract, minus the
|
|
274
345
|
// teleported setters the panel API replaces.
|
|
@@ -289,9 +360,9 @@ const ActionsCapability = ({ model }) => {
|
|
|
289
360
|
})))), React.createElement(UdpDialog, { open: surfaceOpen && (surface === null || surface === void 0 ? void 0 : surface.kind) === 'confirmDelete', dialogTitle: (surface === null || surface === void 0 ? void 0 : surface.kind) === 'confirmDelete' ? surface.title : '', type: "alert", onDialogClose: closeSurface }, React.createElement(UdpText, { variant: "body1" }, (surface === null || surface === void 0 ? void 0 : surface.kind) === 'confirmDelete'
|
|
290
361
|
? t('inquiry.actions.deleteConfirmation', {
|
|
291
362
|
defaultValue: 'Are you sure you want to delete this {{entityName}} record? This cannot be undone.',
|
|
292
|
-
entityName: surface.entityName
|
|
363
|
+
entityName: getSanitizedName(surface.entityName)
|
|
293
364
|
})
|
|
294
|
-
: ''), React.createElement("div", { slot: "action", className: styles.dialogActions }, React.createElement(UdpButton, { appearance: "secondary", onClick: closeSurface }, t('common.cancel', { defaultValue: 'Cancel' })), React.createElement(UdpButton, { appearance: "primary", loading: deleting, disabled: (surface === null || surface === void 0 ? void 0 : surface.kind) !== 'confirmDelete' ||
|
|
365
|
+
: ''), React.createElement("div", { slot: "action", className: styles.dialogActions }, React.createElement(UdpButton, { appearance: "secondary", onClick: closeSurface }, t('common.cancel', { defaultValue: 'Cancel' })), React.createElement(UdpButton, { appearance: "primary", danger: true, startIconName: "delete", loading: deleting, disabled: (surface === null || surface === void 0 ? void 0 : surface.kind) !== 'confirmDelete' ||
|
|
295
366
|
!((_b = surface.deleteMethod) === null || _b === void 0 ? void 0 : _b.apiMethodId), onClick: () => void handleConfirmDelete() }, t('common.delete', { defaultValue: 'Delete' })))))));
|
|
296
367
|
};
|
|
297
368
|
export default ActionsCapability;
|