udp-react-enterprise-component-library 27.0.0-next.12 → 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/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/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/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/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 +10 -12
- 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/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/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/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/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/utilities/useDateStringColumnDef.d.ts +1 -1
- package/dist/utilities/i18n/locales/es-US.json +23 -5
- package/dist/utilities/i18n/locales/es-US.mjs +24 -4
- package/dist/utilities/i18n/locales/fr-CA.json +23 -5
- package/dist/utilities/i18n/locales/fr-CA.mjs +24 -4
- package/package.json +30 -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,5 +1,6 @@
|
|
|
1
|
-
import { buildManyToManyChildRequestData, graftChildRows, planChildLevelFetch, planEagerWaves, sliceBulkChildRows, sliceManyToManyChildRows } from "../../../domain/inquiryTree/waveLoad.mjs";
|
|
2
1
|
import { buildPreloadedDisplayList, splitChildLevels } from "../../../domain/inquiryTree/displayTree.mjs";
|
|
2
|
+
import { buildManyToManyChildRequestData, graftChildRows, parseLazyPageSize, planChildLevelFetch, planEagerWaves, sliceBulkChildRows, sliceManyToManyChildRows } from "../../../domain/inquiryTree/waveLoad.mjs";
|
|
3
|
+
import { keyGroupHeadings } from "./pagedChildrenModel.mjs";
|
|
3
4
|
//#region src/inquiry/v2/tree/waveLoader.ts
|
|
4
5
|
/**
|
|
5
6
|
* The v2 loading runtime: it turns the pure wave plan (domain/inquiryTree/
|
|
@@ -8,10 +9,11 @@ import { buildPreloadedDisplayList, splitChildLevels } from "../../../domain/inq
|
|
|
8
9
|
* TWO ENTRY POINTS, ONE MECHANISM:
|
|
9
10
|
* - `hydrateRowsWithWaves` fills the EAGER levels below a set of loaded rows,
|
|
10
11
|
* breadth-first: one batched `parentFK IN (…)` request per level per wave,
|
|
11
|
-
*
|
|
12
|
+
* paged until the server's total is reached (an eager level has no Show
|
|
13
|
+
* More, so it loads whole), levels within a wave in parallel, waves serial
|
|
14
|
+
* by depth. Fetched rows are
|
|
12
15
|
* written onto their parent row under the level's association key, so the
|
|
13
|
-
* display composer walks one row graph
|
|
14
|
-
* server nested anything (it no longer does — every request is lean).
|
|
16
|
+
* display composer walks one row graph.
|
|
15
17
|
* - `loadLazyChildren` fills ONE level on expand: the same planner with a
|
|
16
18
|
* single parent value, then the eager levels below it, then composition.
|
|
17
19
|
*
|
|
@@ -28,23 +30,69 @@ import { buildPreloadedDisplayList, splitChildLevels } from "../../../domain/inq
|
|
|
28
30
|
* discard it the moment that input is superseded; serving a hydration of stale
|
|
29
31
|
* rows is how a menu ends up rendering records the rest of the pane can't see.
|
|
30
32
|
*/
|
|
33
|
+
/**
|
|
34
|
+
* One request's rows. `complete` keeps asking for the next page while the
|
|
35
|
+
* server reports more: an eager level has no Show More, so it must arrive whole
|
|
36
|
+
* (v1 nested eager children uncapped). A lazy page is one page — the menu's
|
|
37
|
+
* Show More asks for the next.
|
|
38
|
+
*/
|
|
39
|
+
const fetchRows = async (context, apiMethodId, data, complete) => {
|
|
40
|
+
const first = await context.fetchRows(apiMethodId, data);
|
|
41
|
+
if (!complete) return first;
|
|
42
|
+
const rows = [...first.rows];
|
|
43
|
+
let pageNumber = Number(data["pageNumber"] ?? 1);
|
|
44
|
+
while (rows.length < first.total) {
|
|
45
|
+
pageNumber += 1;
|
|
46
|
+
const next = await context.fetchRows(apiMethodId, {
|
|
47
|
+
...data,
|
|
48
|
+
pageNumber
|
|
49
|
+
});
|
|
50
|
+
if (!next.rows.length) break;
|
|
51
|
+
rows.push(...next.rows);
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
...first,
|
|
55
|
+
rows
|
|
56
|
+
};
|
|
57
|
+
};
|
|
31
58
|
/** Run ONE planned request and map its rows back to the parents that claim them. */
|
|
32
|
-
const runChildFetch = async (context, request) => {
|
|
33
|
-
const first = await
|
|
34
|
-
|
|
35
|
-
if (request.kind === "
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
59
|
+
const runChildFetch = async (context, request, complete) => {
|
|
60
|
+
const first = await fetchRows(context, request.apiMethodId, request.data, complete);
|
|
61
|
+
const { total } = first;
|
|
62
|
+
if (request.kind === "single") return {
|
|
63
|
+
slices: { [request.parentKey]: await context.stampRows(request.catalogReturnObject, first.rows, first.lookupsMap) },
|
|
64
|
+
total
|
|
65
|
+
};
|
|
66
|
+
if (request.kind === "bulk") return {
|
|
67
|
+
slices: sliceBulkChildRows(request, await context.stampRows(request.catalogReturnObject, first.rows, first.lookupsMap)),
|
|
68
|
+
total
|
|
69
|
+
};
|
|
70
|
+
if (!first.rows.length) return {
|
|
71
|
+
slices: sliceBulkChildRows(request, []),
|
|
72
|
+
total
|
|
73
|
+
};
|
|
74
|
+
const second = await fetchRows(context, request.childApiMethodId, buildManyToManyChildRequestData(request, first.rows, first.rows.length), true);
|
|
75
|
+
return {
|
|
76
|
+
slices: sliceManyToManyChildRows(request, first.rows, await context.stampRows(request.catalogReturnObject, second.rows, second.lookupsMap)),
|
|
77
|
+
total
|
|
78
|
+
};
|
|
39
79
|
};
|
|
40
|
-
/**
|
|
41
|
-
|
|
42
|
-
|
|
80
|
+
/**
|
|
81
|
+
* Fetch one level for a set of parents: plan → requests (parallel) → slices.
|
|
82
|
+
* With a `page` it fetches that page (lazy expand / Show More); without one
|
|
83
|
+
* the level loads whole (an eager wave).
|
|
84
|
+
*/
|
|
85
|
+
const fetchLevel = async (context, plan, parents, page) => {
|
|
86
|
+
const complete = !page;
|
|
87
|
+
const { requests, errorsByParentKey } = planChildLevelFetch(plan, parents, context.catalogObjects, context.promotedEntities, page);
|
|
43
88
|
const errors = Array.from(new Set(Object.values(errorsByParentKey)));
|
|
44
89
|
const rowsByParentKey = {};
|
|
90
|
+
let hasMore = false;
|
|
45
91
|
(await Promise.all(requests.map(async (request) => {
|
|
46
92
|
try {
|
|
47
|
-
|
|
93
|
+
const { slices, total } = await runChildFetch(context, request, complete);
|
|
94
|
+
if (page && total > page.pageNumber * page.pageSize) hasMore = true;
|
|
95
|
+
return slices;
|
|
48
96
|
} catch (error) {
|
|
49
97
|
const reason = error instanceof Error && error.message ? `: ${error.message}` : "";
|
|
50
98
|
errors.push(`Unable to load ${request.catalogReturnObject ?? plan.catalogObjectKey}${reason}`);
|
|
@@ -54,7 +102,8 @@ const fetchLevel = async (context, plan, parents, options = {}) => {
|
|
|
54
102
|
errors.forEach((message) => context.onLevelError?.(message));
|
|
55
103
|
return {
|
|
56
104
|
rowsByParentKey,
|
|
57
|
-
errors
|
|
105
|
+
errors,
|
|
106
|
+
hasMore
|
|
58
107
|
};
|
|
59
108
|
};
|
|
60
109
|
/**
|
|
@@ -68,7 +117,7 @@ const hydrateRowsWithWaves = async (origin, rows, context) => {
|
|
|
68
117
|
if (!rows?.length || !origin) return rows ?? [];
|
|
69
118
|
const waves = planEagerWaves(origin);
|
|
70
119
|
if (!waves.length) return rows;
|
|
71
|
-
const hydrated = rows.map((row) =>
|
|
120
|
+
const hydrated = rows.map((row) => ({ ...row }));
|
|
72
121
|
const parentsByLevelId = /* @__PURE__ */ new Map();
|
|
73
122
|
parentsByLevelId.set(String(origin.id), hydrated.map((row, index) => ({
|
|
74
123
|
key: `#${index}`,
|
|
@@ -85,52 +134,14 @@ const hydrateRowsWithWaves = async (origin, rows, context) => {
|
|
|
85
134
|
}));
|
|
86
135
|
return hydrated;
|
|
87
136
|
};
|
|
88
|
-
/** Find a config level in the nested seed by its wire treeStructure id. */
|
|
89
|
-
const findSeedLevel = (node, id) => {
|
|
90
|
-
if (!node || !id) return null;
|
|
91
|
-
if (String(node.id) === String(id)) return node;
|
|
92
|
-
for (const child of node.children ?? []) {
|
|
93
|
-
const match = findSeedLevel(child, id);
|
|
94
|
-
if (match) return match;
|
|
95
|
-
}
|
|
96
|
-
return null;
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* A level composed as a display ROOT must not carry its own catalogObjectKey.
|
|
100
|
-
* The composer collects the keys of the levels BELOW its root in order and
|
|
101
|
-
* indexes its config levels by position against that list (the legacy
|
|
102
|
-
* processReferences scheme, which every tree satisfies because a tree root's
|
|
103
|
-
* key is empty). Composing a lazily-expanded level as a root breaks that
|
|
104
|
-
* assumption: its key would shift the list by one and every level beneath it
|
|
105
|
-
* would resolve to the wrong config node — silently dropping the eager
|
|
106
|
-
* grandchildren that were just fetched.
|
|
107
|
-
*/
|
|
108
|
-
const asCompositionRoot = (level) => ({
|
|
109
|
-
...level,
|
|
110
|
-
properties: {
|
|
111
|
-
...level.properties,
|
|
112
|
-
catalogObjectKey: ""
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
/**
|
|
116
|
-
* Put the level's own key back on the rows that came from it, so a lazily
|
|
117
|
-
* paged-in row is byte-identical to the same row composed eagerly.
|
|
118
|
-
*/
|
|
119
|
-
const restoreCatalogObjectKey = (node, configNodeId, catalogObjectKey) => {
|
|
120
|
-
if (!node.isGroupNode && String(node.configNodeId) === configNodeId) node.properties = {
|
|
121
|
-
...node.properties,
|
|
122
|
-
catalogObjectKey
|
|
123
|
-
};
|
|
124
|
-
(node.children ?? []).forEach((child) => restoreCatalogObjectKey(child, configNodeId, catalogObjectKey));
|
|
125
|
-
};
|
|
126
137
|
/**
|
|
127
138
|
* Page in ONE row's lazy levels. Same planner and the same batched request as a
|
|
128
139
|
* wave — with a single parent value — then the eager levels below the fetched
|
|
129
140
|
* rows, then composition through the display pipeline, so a lazily-loaded level
|
|
130
141
|
* groups, hides and nests exactly like an eager one.
|
|
131
142
|
*/
|
|
132
|
-
const loadLazyChildren = async ({ node,
|
|
133
|
-
const configNode =
|
|
143
|
+
const loadLazyChildren = async ({ node, findLevel, pageNumber = 1, context, makeId }) => {
|
|
144
|
+
const configNode = findLevel(node.configNodeId);
|
|
134
145
|
if (!configNode) return {
|
|
135
146
|
children: [],
|
|
136
147
|
hasMoreChildren: false,
|
|
@@ -141,35 +152,35 @@ const loadLazyChildren = async ({ node, seed, pageNumber = 1, context, makeId })
|
|
|
141
152
|
key: "p",
|
|
142
153
|
row: node.nodeObj ?? {}
|
|
143
154
|
};
|
|
144
|
-
const { lazyChildNodes } = splitChildLevels(configNode
|
|
155
|
+
const { lazyChildNodes } = splitChildLevels(configNode);
|
|
156
|
+
const pageSize = parseLazyPageSize(configNode);
|
|
145
157
|
let hasMoreChildren = false;
|
|
146
158
|
const levelErrors = [];
|
|
147
159
|
const children = (await Promise.all(lazyChildNodes.map(async (childNode, levelIndex) => {
|
|
148
160
|
const catalogObjectKey = childNode.properties?.["catalogObjectKey"];
|
|
149
|
-
const { rowsByParentKey, errors } = await fetchLevel(context, {
|
|
161
|
+
const { rowsByParentKey, errors, hasMore } = await fetchLevel(context, {
|
|
150
162
|
parentNode: configNode,
|
|
151
163
|
childNode,
|
|
152
164
|
catalogObjectKey
|
|
153
|
-
}, [parentRef], {
|
|
165
|
+
}, [parentRef], {
|
|
166
|
+
pageSize,
|
|
167
|
+
pageNumber
|
|
168
|
+
});
|
|
154
169
|
if (errors.length) levelErrors[levelIndex] = `${childNode.properties?.["name"] || catalogObjectKey}: ${errors[0]}`;
|
|
155
170
|
const childRows = rowsByParentKey[parentRef.key] ?? [];
|
|
156
|
-
if (
|
|
157
|
-
|
|
158
|
-
const built = buildPreloadedDisplayList(asCompositionRoot(childNode), hydrated, {
|
|
171
|
+
if (hasMore) hasMoreChildren = true;
|
|
172
|
+
return buildPreloadedDisplayList(childNode, await hydrateRowsWithWaves(childNode, childRows, context), {
|
|
159
173
|
makeId,
|
|
160
|
-
loadMode: "config",
|
|
161
174
|
catalogObjects: context.catalogObjects,
|
|
162
175
|
promotedEntities: context.promotedEntities
|
|
163
176
|
}) ?? [];
|
|
164
|
-
built.forEach((root) => restoreCatalogObjectKey(root, String(childNode.id), catalogObjectKey));
|
|
165
|
-
return built;
|
|
166
177
|
}))).flat();
|
|
167
178
|
children.forEach((child) => {
|
|
168
179
|
child.parentId = node.id ?? null;
|
|
169
180
|
if (child.isGroupNode) child.parentGroupId = node.id ?? null;
|
|
170
181
|
else child["entityNodeParentId"] = node.id ?? null;
|
|
171
|
-
child["wasLazyLoaded"] = true;
|
|
172
182
|
});
|
|
183
|
+
keyGroupHeadings(children, String(node.id));
|
|
173
184
|
return {
|
|
174
185
|
children,
|
|
175
186
|
hasMoreChildren,
|
|
@@ -178,6 +189,6 @@ const loadLazyChildren = async ({ node, seed, pageNumber = 1, context, makeId })
|
|
|
178
189
|
};
|
|
179
190
|
};
|
|
180
191
|
//#endregion
|
|
181
|
-
export {
|
|
192
|
+
export { hydrateRowsWithWaves, loadLazyChildren };
|
|
182
193
|
|
|
183
194
|
//# sourceMappingURL=waveLoader.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waveLoader.mjs","names":["CHILD_PAGE_SIZE","buildManyToManyChildRequestData","buildPreloadedDisplayList","graftChildRows","planChildLevelFetch","planEagerWaves","sliceBulkChildRows","sliceManyToManyChildRows","splitChildLevels","CatalogObject","ChildFetch","EagerLevelPlan","ParentRowRef","PromotedEntity","DisplayNode","Row","Record","ChildRowsResult","rows","total","lookupsMap","WaveContext","fetchRows","apiMethodId","data","Promise","catalogObjects","promotedEntities","stampRows","entityName","onLevelError","message","LevelResult","rowsByParentKey","errors","runChildFetch","context","request","first","kind","parentKey","catalogReturnObject","length","second","childApiMethodId","fetchLevel","plan","parents","options","pageNumber","requests","errorsByParentKey","Array","from","Set","Object","values","settled","all","map","error","reason","Error","push","catalogObjectKey","forEach","slice","assign","hydrateRowsWithWaves","origin","waves","hydrated","row","structuredClone","parentsByLevelId","Map","set","String","id","index","key","wave","get","parentNode","childNode","findSeedLevel","node","child","children","match","asCompositionRoot","level","properties","restoreCatalogObjectKey","configNodeId","isGroupNode","LazyChildrenResult","hasMoreChildren","errorRetrievingChildren","updatedNodeObj","LoadLazyChildrenArgs","seed","makeId","loadLazyChildren","configNode","nodeObj","parentRef","lazyChildNodes","levelErrors","levels","levelIndex","levelName","childRows","built","loadMode","root","flat","parentId","parentGroupId","find"],"sources":["../../../../src/inquiry/v2/tree/waveLoader.ts"],"sourcesContent":["/**\n * The v2 loading runtime: it turns the pure wave plan (domain/inquiryTree/\n * waveLoad) into requests, cache entries and display rows.\n *\n * TWO ENTRY POINTS, ONE MECHANISM:\n * - `hydrateRowsWithWaves` fills the EAGER levels below a set of loaded rows,\n * breadth-first: one batched `parentFK IN (…)` request per level per wave,\n * levels within a wave in parallel, waves serial by depth. Fetched rows are\n * written onto their parent row under the level's association key, so the\n * display composer walks one row graph and never has to know whether the\n * server nested anything (it no longer does — every request is lean).\n * - `loadLazyChildren` fills ONE level on expand: the same planner with a\n * single parent value, then the eager levels below it, then composition.\n *\n * Caching is the query cache, reached through the injected `fetchRows` (the\n * viewer keys it on method × exact body). A collapsed-then-reopened row, a wave\n * that re-crosses parents it already covered, and a recompose after a catalog\n * change are all cache hits, not network hops.\n *\n * IDENTITY CONTRACT (the menu depends on it). `hydrateRowsWithWaves` returns\n * the caller's OWN array, by reference, when it had nothing to add — so a tree\n * with no eager level never invalidates a downstream memo — and a brand-new\n * array whenever it grafted anything. It never mutates the caller's rows. The\n * caller must therefore pair a result with the exact input it came from and\n * discard it the moment that input is superseded; serving a hydration of stale\n * rows is how a menu ends up rendering records the rest of the pane can't see.\n */\nimport {\n CHILD_PAGE_SIZE,\n buildManyToManyChildRequestData,\n buildPreloadedDisplayList,\n graftChildRows,\n planChildLevelFetch,\n planEagerWaves,\n sliceBulkChildRows,\n sliceManyToManyChildRows,\n splitChildLevels\n} from '../../../domain/inquiryTree';\nimport type {\n CatalogObject,\n ChildFetch,\n EagerLevelPlan,\n ParentRowRef,\n PromotedEntity\n} from '../../../domain/inquiryTree';\nimport type { DisplayNode } from '../../../domain/inquiryTree/displayTree';\n\ntype Row = Record<string, unknown>;\n\n/** What one child request answers with (the v2 query hook's RecordRows). */\nexport interface ChildRowsResult {\n rows: Row[];\n total: number;\n lookupsMap?: Record<string, unknown> | null;\n}\n\n/**\n * Everything the wave executor needs from the outside. Both effects are\n * INJECTED rather than imported so this module stays free of React and the\n * query client — which is what lets the mount-order contract below be tested\n * under the domain harness instead of only in a browser.\n */\nexport interface WaveContext {\n /** Issue one child request. The caller owns caching (inquiryKeys.childBatch). */\n fetchRows: (apiMethodId: string, data: Row) => Promise<ChildRowsResult>;\n catalogObjects?: CatalogObject[] | null;\n promotedEntities?: PromotedEntity[] | null;\n /**\n * Lookup-stamp a page of rows for a known entity — the same pass the root\n * page gets, so a child row's label reads like its parent's.\n */\n stampRows: (\n entityName: string | undefined,\n rows: Row[],\n lookupsMap?: Record<string, unknown> | null\n ) => Promise<Row[]>;\n /** Called once per distinct level failure (un-promoted child, bad assoc). */\n onLevelError?: (message: string) => void;\n}\n\n/** Rows fetched for one level, plus whatever stopped some parents being asked. */\ninterface LevelResult {\n rowsByParentKey: Record<string, Row[]>;\n errors: string[];\n}\n\n/** Run ONE planned request and map its rows back to the parents that claim them. */\nconst runChildFetch = async (\n context: WaveContext,\n request: ChildFetch\n): Promise<Record<string, Row[]>> => {\n const first = await context.fetchRows(request.apiMethodId, request.data);\n\n if (request.kind === 'single') {\n return {\n [request.parentKey]: await context.stampRows(\n request.catalogReturnObject,\n first.rows,\n first.lookupsMap\n )\n };\n }\n\n if (request.kind === 'bulk') {\n return sliceBulkChildRows(\n request,\n await context.stampRows(\n request.catalogReturnObject,\n first.rows,\n first.lookupsMap\n )\n );\n }\n\n // Many-to-many: the first hop returned JOINING rows (which carry the parent\n // key AND the child key); the second fetches every child they name at once.\n if (!first.rows.length) return sliceBulkChildRows(request, []);\n const second = await context.fetchRows(\n request.childApiMethodId,\n buildManyToManyChildRequestData(request, first.rows, first.rows.length)\n );\n return sliceManyToManyChildRows(\n request,\n first.rows,\n await context.stampRows(\n request.catalogReturnObject,\n second.rows,\n second.lookupsMap\n )\n );\n};\n\n/** Fetch one level for a set of parents: plan → requests (parallel) → slices. */\nconst fetchLevel = async (\n context: WaveContext,\n plan: EagerLevelPlan,\n parents: ParentRowRef[],\n options: { pageNumber?: number } = {}\n): Promise<LevelResult> => {\n const { requests, errorsByParentKey } = planChildLevelFetch(\n plan,\n parents,\n context.catalogObjects,\n context.promotedEntities,\n options\n );\n const errors = Array.from(new Set(Object.values(errorsByParentKey)));\n const rowsByParentKey: Record<string, Row[]> = {};\n const settled = await Promise.all(\n requests.map(async (request) => {\n try {\n return await runChildFetch(context, request);\n } catch (error) {\n // A failed level renders empty rather than taking the wave down; the\n // caller decides whether to say so. The thrown reason rides along —\n // this catch covers the lookup STAMPING pass as well as the request, so\n // \"every response was 200 and the level still failed\" has to be\n // readable from the row rather than from the network panel.\n const reason =\n error instanceof Error && error.message ? `: ${error.message}` : '';\n errors.push(\n `Unable to load ${\n request.catalogReturnObject ?? plan.catalogObjectKey\n }${reason}`\n );\n return {};\n }\n })\n );\n settled.forEach((slice) => Object.assign(rowsByParentKey, slice));\n errors.forEach((message) => context.onLevelError?.(message));\n return { rowsByParentKey, errors };\n};\n\n/**\n * Fill every eager level below `origin` for `rows`, breadth-first. Returns a\n * PRIVATE copy of the rows with each level's records grafted on — the caller's\n * (cached) rows are never touched. Identity is preserved when the config has no\n * eager level at all, so a fully lazy tree costs nothing (see the module's\n * IDENTITY CONTRACT).\n */\nexport const hydrateRowsWithWaves = async (\n origin: DisplayNode | null | undefined,\n rows: Row[] | null | undefined,\n context: WaveContext\n): Promise<Row[]> => {\n if (!rows?.length || !origin) return rows ?? [];\n const waves = planEagerWaves(origin);\n if (!waves.length) return rows;\n\n const hydrated = rows.map((row) => structuredClone(row));\n const parentsByLevelId = new Map<string, ParentRowRef[]>();\n parentsByLevelId.set(\n String(origin.id),\n hydrated.map((row, index) => ({ key: `#${index}`, row }))\n );\n\n for (const wave of waves) {\n await Promise.all(\n wave.map(async (plan) => {\n const parents = parentsByLevelId.get(String(plan.parentNode.id)) ?? [];\n if (!parents.length) {\n parentsByLevelId.set(String(plan.childNode.id), []);\n return;\n }\n const { rowsByParentKey } = await fetchLevel(context, plan, parents);\n parentsByLevelId.set(\n String(plan.childNode.id),\n graftChildRows(parents, plan.catalogObjectKey, rowsByParentKey)\n );\n })\n );\n }\n return hydrated;\n};\n\n/** Find a config level in the nested seed by its wire treeStructure id. */\nexport const findSeedLevel = (\n node: DisplayNode | null | undefined,\n id: string | null | undefined\n): DisplayNode | null => {\n if (!node || !id) return null;\n if (String(node.id) === String(id)) return node;\n for (const child of node.children ?? []) {\n const match = findSeedLevel(child, id);\n if (match) return match;\n }\n return null;\n};\n\n/**\n * A level composed as a display ROOT must not carry its own catalogObjectKey.\n * The composer collects the keys of the levels BELOW its root in order and\n * indexes its config levels by position against that list (the legacy\n * processReferences scheme, which every tree satisfies because a tree root's\n * key is empty). Composing a lazily-expanded level as a root breaks that\n * assumption: its key would shift the list by one and every level beneath it\n * would resolve to the wrong config node — silently dropping the eager\n * grandchildren that were just fetched.\n */\nconst asCompositionRoot = (level: DisplayNode): DisplayNode => ({\n ...level,\n properties: { ...level.properties, catalogObjectKey: '' }\n});\n\n/**\n * Put the level's own key back on the rows that came from it, so a lazily\n * paged-in row is byte-identical to the same row composed eagerly.\n */\nconst restoreCatalogObjectKey = (\n node: DisplayNode,\n configNodeId: string,\n catalogObjectKey: string\n): void => {\n if (!node.isGroupNode && String(node.configNodeId) === configNodeId) {\n node.properties = { ...node.properties, catalogObjectKey };\n }\n (node.children ?? []).forEach((child) =>\n restoreCatalogObjectKey(child, configNodeId, catalogObjectKey)\n );\n};\n\nexport interface LazyChildrenResult {\n children: DisplayNode[];\n hasMoreChildren: boolean;\n /**\n * The FIRST failure's own message when there is one, never a bare `true`: the\n * menu renders a stamped string verbatim and falls back to \"Error Retrieving\n * Children\" otherwise, and that generic row is unreadable — a planning\n * failure (un-promoted child entity, no catalog association, a level that has\n * left the configuration) issues NO request at all, so the network tells the\n * reader nothing either.\n */\n errorRetrievingChildren: string | boolean;\n /** The parent's row, unchanged — v2 never rewrites it on a child fetch. */\n updatedNodeObj: Row | undefined;\n}\n\nexport interface LoadLazyChildrenArgs {\n /** The display row being expanded. */\n node: DisplayNode;\n /** The nested tree config (makeDisplayTreeStructure output). */\n seed: DisplayNode | null;\n /** 1 for the first page; Show More asks for the next. */\n pageNumber?: number;\n context: WaveContext;\n makeId: () => string;\n}\n\n/**\n * Page in ONE row's lazy levels. Same planner and the same batched request as a\n * wave — with a single parent value — then the eager levels below the fetched\n * rows, then composition through the display pipeline, so a lazily-loaded level\n * groups, hides and nests exactly like an eager one.\n */\nexport const loadLazyChildren = async ({\n node,\n seed,\n pageNumber = 1,\n context,\n makeId\n}: LoadLazyChildrenArgs): Promise<LazyChildrenResult> => {\n const configNode = findSeedLevel(seed, node.configNodeId);\n if (!configNode) {\n return {\n children: [],\n hasMoreChildren: false,\n errorRetrievingChildren: `Error: tree level ${\n node.configNodeId ?? '(none)'\n } is not in the current tree configuration`,\n updatedNodeObj: node.nodeObj\n };\n }\n\n const parentRef: ParentRowRef = { key: 'p', row: node.nodeObj ?? {} };\n const { lazyChildNodes } = splitChildLevels(configNode, 'config');\n let hasMoreChildren = false;\n // Per LEVEL, positionally — the levels settle in whatever order the network\n // returns them, and \"the first error\" has to mean the first configured level\n // that failed, not the first to finish.\n const levelErrors: Array<string | undefined> = [];\n\n const levels = await Promise.all(\n lazyChildNodes.map(async (childNode, levelIndex) => {\n const catalogObjectKey = childNode.properties?.[\n 'catalogObjectKey'\n ] as string;\n const { rowsByParentKey, errors } = await fetchLevel(\n context,\n { parentNode: configNode, childNode, catalogObjectKey },\n [parentRef],\n { pageNumber }\n );\n if (errors.length) {\n // Name the level the message belongs to: one misconfigured level under\n // a parent must not read as \"this row's children failed\".\n const levelName =\n (childNode.properties?.['name'] as string) || catalogObjectKey;\n levelErrors[levelIndex] = `${levelName}: ${errors[0]}`;\n }\n const childRows = rowsByParentKey[parentRef.key] ?? [];\n // A full page means there is probably another — the menu's Show More row.\n if (childRows.length >= CHILD_PAGE_SIZE) hasMoreChildren = true;\n const hydrated = await hydrateRowsWithWaves(\n childNode,\n childRows,\n context\n );\n const built =\n buildPreloadedDisplayList(asCompositionRoot(childNode), hydrated, {\n makeId,\n loadMode: 'config',\n catalogObjects: context.catalogObjects,\n promotedEntities: context.promotedEntities\n }) ?? [];\n built.forEach((root) =>\n restoreCatalogObjectKey(root, String(childNode.id), catalogObjectKey)\n );\n return built;\n })\n );\n\n const children = levels.flat();\n children.forEach((child) => {\n child.parentId = node.id ?? null;\n if (child.isGroupNode) child.parentGroupId = node.id ?? null;\n else child['entityNodeParentId'] = node.id ?? null;\n // Marks the row as paged in, which is what lets the menu dedup by\n // businessObjectKey when Show More appends the next page. It is NOT the\n // legacy rule-evaluation flag: v2's fetch returns flat child-entity rows\n // (the many-to-many joining row never reaches the composer), so rules\n // evaluate against the same shape an eager level produces.\n child['wasLazyLoaded'] = true;\n });\n\n return {\n children,\n hasMoreChildren,\n errorRetrievingChildren: levelErrors.find((error) => !!error) ?? false,\n updatedNodeObj: node.nodeObj\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuFA,MAAMmC,gBAAgB,OACpBC,SACAC,YACmC;CACnC,MAAMC,QAAQ,MAAMF,QAAQd,UAAUe,QAAQd,aAAac,QAAQb,KAAK;AAExE,KAAIa,QAAQE,SAAS,SACnB,QAAO,GACJF,QAAQG,YAAY,MAAMJ,QAAQR,UACjCS,QAAQI,qBACRH,MAAMpB,MACNoB,MAAMlB,WACR,EACD;AAGH,KAAIiB,QAAQE,SAAS,OACnB,QAAOjC,mBACL+B,SACA,MAAMD,QAAQR,UACZS,QAAQI,qBACRH,MAAMpB,MACNoB,MAAMlB,WAEV,CAAC;AAKH,KAAI,CAACkB,MAAMpB,KAAKwB,OAAQ,QAAOpC,mBAAmB+B,SAAS,EAAE,CAAC;CAC9D,MAAMM,SAAS,MAAMP,QAAQd,UAC3Be,QAAQO,kBACR3C,gCAAgCoC,SAASC,MAAMpB,MAAMoB,MAAMpB,KAAKwB,OAClE,CAAC;AACD,QAAOnC,yBACL8B,SACAC,MAAMpB,MACN,MAAMkB,QAAQR,UACZS,QAAQI,qBACRE,OAAOzB,MACPyB,OAAOvB,WAEX,CAAC;;;AAIH,MAAMyB,aAAa,OACjBT,SACAU,MACAC,SACAC,UAAmC,EAAE,KACZ;CACzB,MAAM,EAAEE,UAAUC,sBAAsB/C,oBACtC0C,MACAC,SACAX,QAAQ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M3D,UAAU,CAAC,CAACA,MAAM,IAAI;EACjEuC,gBAAgBb,KAAKmB;EACtB"}
|
|
1
|
+
{"version":3,"file":"waveLoader.mjs","names":["buildManyToManyChildRequestData","buildPreloadedDisplayList","graftChildRows","parseLazyPageSize","planChildLevelFetch","planEagerWaves","sliceBulkChildRows","sliceManyToManyChildRows","splitChildLevels","CatalogObject","ChildFetch","EagerLevelPlan","ParentRowRef","PromotedEntity","DisplayNode","keyGroupHeadings","Row","Record","ChildRowsResult","rows","total","lookupsMap","WaveContext","fetchRows","apiMethodId","data","Promise","catalogObjects","promotedEntities","stampRows","entityName","onLevelError","message","LevelResult","rowsByParentKey","errors","hasMore","context","complete","first","pageNumber","Number","length","next","push","ChildFetchResult","slices","runChildFetch","request","kind","parentKey","catalogReturnObject","second","childApiMethodId","fetchLevel","plan","parents","page","pageSize","requests","errorsByParentKey","Array","from","Set","Object","values","settled","all","map","error","reason","Error","catalogObjectKey","forEach","slice","assign","hydrateRowsWithWaves","origin","waves","hydrated","row","parentsByLevelId","Map","set","String","id","index","key","wave","get","parentNode","childNode","LazyChildrenResult","children","hasMoreChildren","errorRetrievingChildren","updatedNodeObj","LoadLazyChildrenArgs","node","findLevel","makeId","loadLazyChildren","configNode","configNodeId","nodeObj","parentRef","lazyChildNodes","levelErrors","levels","levelIndex","properties","levelName","childRows","flat","child","parentId","isGroupNode","parentGroupId","find"],"sources":["../../../../src/inquiry/v2/tree/waveLoader.ts"],"sourcesContent":["/**\n * The v2 loading runtime: it turns the pure wave plan (domain/inquiryTree/\n * waveLoad) into requests, cache entries and display rows.\n *\n * TWO ENTRY POINTS, ONE MECHANISM:\n * - `hydrateRowsWithWaves` fills the EAGER levels below a set of loaded rows,\n * breadth-first: one batched `parentFK IN (…)` request per level per wave,\n * paged until the server's total is reached (an eager level has no Show\n * More, so it loads whole), levels within a wave in parallel, waves serial\n * by depth. Fetched rows are\n * written onto their parent row under the level's association key, so the\n * display composer walks one row graph.\n * - `loadLazyChildren` fills ONE level on expand: the same planner with a\n * single parent value, then the eager levels below it, then composition.\n *\n * Caching is the query cache, reached through the injected `fetchRows` (the\n * viewer keys it on method × exact body). A collapsed-then-reopened row, a wave\n * that re-crosses parents it already covered, and a recompose after a catalog\n * change are all cache hits, not network hops.\n *\n * IDENTITY CONTRACT (the menu depends on it). `hydrateRowsWithWaves` returns\n * the caller's OWN array, by reference, when it had nothing to add — so a tree\n * with no eager level never invalidates a downstream memo — and a brand-new\n * array whenever it grafted anything. It never mutates the caller's rows. The\n * caller must therefore pair a result with the exact input it came from and\n * discard it the moment that input is superseded; serving a hydration of stale\n * rows is how a menu ends up rendering records the rest of the pane can't see.\n */\nimport {\n buildManyToManyChildRequestData,\n buildPreloadedDisplayList,\n graftChildRows,\n parseLazyPageSize,\n planChildLevelFetch,\n planEagerWaves,\n sliceBulkChildRows,\n sliceManyToManyChildRows,\n splitChildLevels\n} from '../../../domain/inquiryTree';\nimport type {\n CatalogObject,\n ChildFetch,\n EagerLevelPlan,\n ParentRowRef,\n PromotedEntity\n} from '../../../domain/inquiryTree';\nimport type { DisplayNode } from '../../../domain/inquiryTree/displayTree';\nimport { keyGroupHeadings } from './pagedChildrenModel';\n\ntype Row = Record<string, unknown>;\n\n/** What one child request answers with (the v2 query hook's RecordRows). */\nexport interface ChildRowsResult {\n rows: Row[];\n total: number;\n lookupsMap?: Record<string, unknown> | null;\n}\n\n/**\n * Everything the wave executor needs from the outside. Both effects are\n * INJECTED rather than imported so this module stays free of React and the\n * query client — which is what lets the mount-order contract below be tested\n * under the domain harness instead of only in a browser.\n */\nexport interface WaveContext {\n /** Issue one child request. The caller owns caching (inquiryKeys.childBatch). */\n fetchRows: (apiMethodId: string, data: Row) => Promise<ChildRowsResult>;\n catalogObjects?: CatalogObject[] | null;\n promotedEntities?: PromotedEntity[] | null;\n /**\n * Lookup-stamp a page of rows for a known entity — the same pass the root\n * page gets, so a child row's label reads like its parent's.\n */\n stampRows: (\n entityName: string | undefined,\n rows: Row[],\n lookupsMap?: Record<string, unknown> | null\n ) => Promise<Row[]>;\n /** Called once per distinct level failure (un-promoted child, bad assoc). */\n onLevelError?: (message: string) => void;\n}\n\n/** Rows fetched for one level, plus whatever stopped some parents being asked. */\ninterface LevelResult {\n rowsByParentKey: Record<string, Row[]>;\n errors: string[];\n /** A page was asked for and the server holds rows beyond it. */\n hasMore: boolean;\n}\n\n/**\n * One request's rows. `complete` keeps asking for the next page while the\n * server reports more: an eager level has no Show More, so it must arrive whole\n * (v1 nested eager children uncapped). A lazy page is one page — the menu's\n * Show More asks for the next.\n */\nconst fetchRows = async (\n context: WaveContext,\n apiMethodId: string,\n data: Row,\n complete: boolean\n): Promise<ChildRowsResult> => {\n const first = await context.fetchRows(apiMethodId, data);\n if (!complete) return first;\n const rows = [...first.rows];\n let pageNumber = Number(data['pageNumber'] ?? 1);\n while (rows.length < first.total) {\n pageNumber += 1;\n const next = await context.fetchRows(apiMethodId, { ...data, pageNumber });\n if (!next.rows.length) break;\n rows.push(...next.rows);\n }\n return { ...first, rows };\n};\n\n/** One request's rows per parent, and the server's total for what it paged. */\ninterface ChildFetchResult {\n slices: Record<string, Row[]>;\n total: number;\n}\n\n/** Run ONE planned request and map its rows back to the parents that claim them. */\nconst runChildFetch = async (\n context: WaveContext,\n request: ChildFetch,\n complete: boolean\n): Promise<ChildFetchResult> => {\n const first = await fetchRows(\n context,\n request.apiMethodId,\n request.data,\n complete\n );\n const { total } = first;\n\n if (request.kind === 'single') {\n return {\n slices: {\n [request.parentKey]: await context.stampRows(\n request.catalogReturnObject,\n first.rows,\n first.lookupsMap\n )\n },\n total\n };\n }\n\n if (request.kind === 'bulk') {\n return {\n slices: sliceBulkChildRows(\n request,\n await context.stampRows(\n request.catalogReturnObject,\n first.rows,\n first.lookupsMap\n )\n ),\n total\n };\n }\n\n // Many-to-many: the first hop returned JOINING rows (which carry the parent\n // key AND the child key); the second fetches every child they name at once,\n // always whole — it answers exactly the joining rows already in hand. The\n // page (and so the total) is the joining rows': a short second hop is no\n // sign the parent has nothing more.\n if (!first.rows.length) {\n return { slices: sliceBulkChildRows(request, []), total };\n }\n const second = await fetchRows(\n context,\n request.childApiMethodId,\n buildManyToManyChildRequestData(request, first.rows, first.rows.length),\n true\n );\n return {\n slices: sliceManyToManyChildRows(\n request,\n first.rows,\n await context.stampRows(\n request.catalogReturnObject,\n second.rows,\n second.lookupsMap\n )\n ),\n total\n };\n};\n\n/**\n * Fetch one level for a set of parents: plan → requests (parallel) → slices.\n * With a `page` it fetches that page (lazy expand / Show More); without one\n * the level loads whole (an eager wave).\n */\nconst fetchLevel = async (\n context: WaveContext,\n plan: EagerLevelPlan,\n parents: ParentRowRef[],\n page?: { pageSize: number; pageNumber: number }\n): Promise<LevelResult> => {\n const complete = !page;\n const { requests, errorsByParentKey } = planChildLevelFetch(\n plan,\n parents,\n context.catalogObjects,\n context.promotedEntities,\n page\n );\n const errors = Array.from(new Set(Object.values(errorsByParentKey)));\n const rowsByParentKey: Record<string, Row[]> = {};\n let hasMore = false;\n const settled = await Promise.all(\n requests.map(async (request) => {\n try {\n const { slices, total } = await runChildFetch(\n context,\n request,\n complete\n );\n if (page && total > page.pageNumber * page.pageSize) hasMore = true;\n return slices;\n } catch (error) {\n // A failed level renders empty rather than taking the wave down; the\n // caller decides whether to say so. The thrown reason rides along —\n // this catch covers the lookup STAMPING pass as well as the request, so\n // \"every response was 200 and the level still failed\" has to be\n // readable from the row rather than from the network panel.\n const reason =\n error instanceof Error && error.message ? `: ${error.message}` : '';\n errors.push(\n `Unable to load ${\n request.catalogReturnObject ?? plan.catalogObjectKey\n }${reason}`\n );\n return {};\n }\n })\n );\n settled.forEach((slice) => Object.assign(rowsByParentKey, slice));\n errors.forEach((message) => context.onLevelError?.(message));\n return { rowsByParentKey, errors, hasMore };\n};\n\n/**\n * Fill every eager level below `origin` for `rows`, breadth-first. Returns a\n * PRIVATE copy of the rows with each level's records grafted on — the caller's\n * (cached) rows are never touched. Identity is preserved when the config has no\n * eager level at all, so a fully lazy tree costs nothing (see the module's\n * IDENTITY CONTRACT).\n */\nexport const hydrateRowsWithWaves = async (\n origin: DisplayNode | null | undefined,\n rows: Row[] | null | undefined,\n context: WaveContext\n): Promise<Row[]> => {\n if (!rows?.length || !origin) return rows ?? [];\n const waves = planEagerWaves(origin);\n if (!waves.length) return rows;\n\n // Shallow is enough: grafting only writes a level's key onto each row.\n const hydrated = rows.map((row) => ({ ...row }));\n const parentsByLevelId = new Map<string, ParentRowRef[]>();\n parentsByLevelId.set(\n String(origin.id),\n hydrated.map((row, index) => ({ key: `#${index}`, row }))\n );\n\n for (const wave of waves) {\n await Promise.all(\n wave.map(async (plan) => {\n const parents = parentsByLevelId.get(String(plan.parentNode.id)) ?? [];\n if (!parents.length) {\n parentsByLevelId.set(String(plan.childNode.id), []);\n return;\n }\n const { rowsByParentKey } = await fetchLevel(context, plan, parents);\n parentsByLevelId.set(\n String(plan.childNode.id),\n graftChildRows(parents, plan.catalogObjectKey, rowsByParentKey)\n );\n })\n );\n }\n return hydrated;\n};\nexport interface LazyChildrenResult {\n children: DisplayNode[];\n hasMoreChildren: boolean;\n /**\n * The FIRST failure's own message when there is one, never a bare `true`: a\n * planning failure (un-promoted child entity, no catalog association, a\n * level that has left the configuration) issues NO request at all, so this\n * message — logged by the menu — is the only trace it leaves.\n */\n errorRetrievingChildren: string | boolean;\n /** The parent's row, unchanged — v2 never rewrites it on a child fetch. */\n updatedNodeObj: Row | undefined;\n}\n\nexport interface LoadLazyChildrenArgs {\n /** The display row being expanded. */\n node: DisplayNode;\n /**\n * The config level a row's `configNodeId` names — the menu's lookup, which\n * spans this tree and any other tree a loaded root came from.\n */\n findLevel: (id: string | number | null | undefined) => DisplayNode | null;\n /** 1 for the first page; Show More asks for the next. */\n pageNumber?: number;\n context: WaveContext;\n makeId: () => string;\n}\n\n/**\n * Page in ONE row's lazy levels. Same planner and the same batched request as a\n * wave — with a single parent value — then the eager levels below the fetched\n * rows, then composition through the display pipeline, so a lazily-loaded level\n * groups, hides and nests exactly like an eager one.\n */\nexport const loadLazyChildren = async ({\n node,\n findLevel,\n pageNumber = 1,\n context,\n makeId\n}: LoadLazyChildrenArgs): Promise<LazyChildrenResult> => {\n const configNode = findLevel(node.configNodeId);\n if (!configNode) {\n return {\n children: [],\n hasMoreChildren: false,\n errorRetrievingChildren: `Error: tree level ${\n node.configNodeId ?? '(none)'\n } is not in the current tree configuration`,\n updatedNodeObj: node.nodeObj\n };\n }\n\n const parentRef: ParentRowRef = { key: 'p', row: node.nodeObj ?? {} };\n const { lazyChildNodes } = splitChildLevels(configNode);\n const pageSize = parseLazyPageSize(configNode);\n let hasMoreChildren = false;\n // Per LEVEL, positionally — the levels settle in whatever order the network\n // returns them, and \"the first error\" has to mean the first configured level\n // that failed, not the first to finish.\n const levelErrors: Array<string | undefined> = [];\n\n const levels = await Promise.all(\n lazyChildNodes.map(async (childNode, levelIndex) => {\n const catalogObjectKey = childNode.properties?.[\n 'catalogObjectKey'\n ] as string;\n const { rowsByParentKey, errors, hasMore } = await fetchLevel(\n context,\n { parentNode: configNode, childNode, catalogObjectKey },\n [parentRef],\n { pageSize, pageNumber }\n );\n if (errors.length) {\n // Name the level the message belongs to: one misconfigured level under\n // a parent must not read as \"this row's children failed\".\n const levelName =\n (childNode.properties?.['name'] as string) || catalogObjectKey;\n levelErrors[levelIndex] = `${levelName}: ${errors[0]}`;\n }\n const childRows = rowsByParentKey[parentRef.key] ?? [];\n // The server's total, not the page's length, says whether Show More has\n // anything to show.\n if (hasMore) hasMoreChildren = true;\n const hydrated = await hydrateRowsWithWaves(\n childNode,\n childRows,\n context\n );\n return (\n buildPreloadedDisplayList(childNode, hydrated, {\n makeId,\n catalogObjects: context.catalogObjects,\n promotedEntities: context.promotedEntities\n }) ?? []\n );\n })\n );\n\n const children = levels.flat();\n children.forEach((child) => {\n child.parentId = node.id ?? null;\n if (child.isGroupNode) child.parentGroupId = node.id ?? null;\n else child['entityNodeParentId'] = node.id ?? null;\n });\n keyGroupHeadings(children, String(node.id));\n\n return {\n children,\n hasMoreChildren,\n errorRetrievingChildren: levelErrors.find((error) => !!error) ?? false,\n updatedNodeObj: node.nodeObj\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgGA,MAAMuB,YAAY,OAChBc,SACAb,aACAC,MACAa,aAC6B;CAC7B,MAAMC,QAAQ,MAAMF,QAAQd,UAAUC,aAAaC,KAAK;AACxD,KAAI,CAACa,SAAU,QAAOC;CACtB,MAAMpB,OAAO,CAAC,GAAGoB,MAAMpB,KAAK;CAC5B,IAAIqB,aAAaC,OAAOhB,KAAK,iBAAiB,EAAE;AAChD,QAAON,KAAKuB,SAASH,MAAMnB,OAAO;AAChCoB,gBAAc;EACd,MAAMG,OAAO,MAAMN,QAAQd,UAAUC,aAAa;GAAE,GAAGC;GAAMe;GAAY,CAAC;AAC1E,MAAI,CAACG,KAAKxB,KAAKuB,OAAQ;AACvBvB,OAAKyB,KAAK,GAAGD,KAAKxB,KAAK;;AAEzB,QAAO;EAAE,GAAGoB;EAAOpB;EAAM;;;AAU3B,MAAM4B,gBAAgB,OACpBV,SACAW,SACAV,aAC8B;CAC9B,MAAMC,QAAQ,MAAMhB,UAClBc,SACAW,QAAQxB,aACRwB,QAAQvB,MACRa,SACD;CACD,MAAM,EAAElB,UAAUmB;AAElB,KAAIS,QAAQC,SAAS,SACnB,QAAO;EACLH,QAAQ,GACLE,QAAQE,YAAY,MAAMb,QAAQR,UACjCmB,QAAQG,qBACRZ,MAAMpB,MACNoB,MAAMlB,WACR,EACD;EACDD;EACD;AAGH,KAAI4B,QAAQC,SAAS,OACnB,QAAO;EACLH,QAAQxC,mBACN0C,SACA,MAAMX,QAAQR,UACZmB,QAAQG,qBACRZ,MAAMpB,MACNoB,MAAMlB,WAEV,CAAC;EACDD;EACD;AAQH,KAAI,CAACmB,MAAMpB,KAAKuB,OACd,QAAO;EAAEI,QAAQxC,mBAAmB0C,SAAS,EAAE,CAAC;EAAE5B;EAAO;CAE3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ACvD,MAAM5C,WAAWvD,kBAAkBmG,WAAW;CAC9C,IAAIR,kBAAkB;CAItB,MAAMa,cAAyC,EAAE;CAuCjD,MAAMd,YArCS,MAAMnE,QAAQyC,IAC3BuC,eAAetC,IAAI,OAAOuB,WAAWkB,eAAe;EAClD,MAAMrC,mBAAmBmB,UAAUmB,aACjC;EAEF,MAAM,EAAE5E,iBAAiBC,QAAQC,YAAY,MAAMkB,WACjDjB,SACA;GAAEqD,YAAYY;GAAYX;GAAWnB;GAAkB,EACvD,CAACiC,UAAU,EACX;GAAE/C;GAAUlB;GACd,CAAC;AACD,MAAIL,OAAOO,OAKTiE,aAAYE,cAAc,GADvBlB,UAAUmB,aAAa,WAAsBtC,iBACV,IAAKrC,OAAO;EAEpD,MAAM6E,YAAY9E,gBAAgBuE,UAAUlB,QAAQ,EAAE;AAGtD,MAAInD,QAAS0D,mBAAkB;AAM/B,SACE7F,0BAA0B0F,WANX,MAAMf,qBACrBe,WACAqB,WACA3E,QACD,EAEgD;GAC7C+D;GACAzE,gBAAgBU,QAAQV;GACxBC,kBAAkBS,QAAQT;GAC3B,CAAC,IAAI,EAAE;GAGd,CAAC,EAEuBqF,MAAM;AAC9BpB,UAASpB,SAASyC,UAAU;AAC1BA,QAAMC,WAAWjB,KAAKb,MAAM;AAC5B,MAAI6B,MAAME,YAAaF,OAAMG,gBAAgBnB,KAAKb,MAAM;MACnD6B,OAAM,wBAAwBhB,KAAKb,MAAM;GAC9C;AACFtE,kBAAiB8E,UAAUT,OAAOc,KAAKb,GAAG,CAAC;AAE3C,QAAO;EACLQ;EACAC;EACAC,yBAAyBY,YAAYW,MAAMjD,UAAU,CAAC,CAACA,MAAM,IAAI;EACjE2B,gBAAgBE,KAAKM;EACtB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* A row's primary text stays on one line and ellipsizes, so every row in a
|
|
2
|
+
list is the same height however long a name is or however narrow the pane. */
|
|
3
|
+
.oneLine {
|
|
4
|
+
display: block;
|
|
5
|
+
min-width: 0;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
white-space: nowrap;
|
|
8
|
+
text-overflow: ellipsis;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* A list item pads its content in from its own edge so the hover wash has
|
|
12
|
+
room. Pulling the list out by that same inset puts the row's content on the
|
|
13
|
+
section's text edge — title, rows and controls then share one left line —
|
|
14
|
+
and lets the wash bleed into the gutter. Row dividers stay on the text edge
|
|
15
|
+
too, rather than following the wash out. */
|
|
16
|
+
.flush {
|
|
17
|
+
margin-inline: calc(-1 * var(--spacingHorizontalM));
|
|
18
|
+
--udp-list-divider-inset: var(--spacingHorizontalM);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* The scroll box around a flush list: it grows into the gutter by the same
|
|
22
|
+
inset and pads it back, so the rows' wash is inside the box rather than
|
|
23
|
+
clipped by it, and everything else in the box stays on the text edge. */
|
|
24
|
+
.bleed {
|
|
25
|
+
margin-inline: calc(-1 * var(--spacingHorizontalM));
|
|
26
|
+
padding-inline: var(--spacingHorizontalM);
|
|
27
|
+
}
|
|
@@ -16,17 +16,21 @@ export interface RecentlyLoadedWire {
|
|
|
16
16
|
}
|
|
17
17
|
/** One row of the Recent Records list. */
|
|
18
18
|
export interface RecentRecordRow {
|
|
19
|
+
/** The record's identity (recordKeyOf) — unique within the list. */
|
|
20
|
+
key: string;
|
|
19
21
|
/** The record's display label, as it was stamped when it was loaded. */
|
|
20
22
|
label: string;
|
|
21
23
|
/** The entity, humanized ("Works Request"). */
|
|
22
24
|
entity: string;
|
|
23
|
-
/** Raw ISO timestamp — the widget
|
|
25
|
+
/** Raw ISO timestamp — the widget formats it for display. */
|
|
24
26
|
dateLoaded: string;
|
|
25
27
|
/** The history entry itself — replayed through `onLoadedNodeClick`. */
|
|
26
28
|
node: RecentlyLoadedWire;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
|
-
* The history as list rows,
|
|
31
|
+
* The history as list rows, newest first, one row per record (recordKeyOf).
|
|
32
|
+
* The server log is append-only, so a record loaded three times arrives three
|
|
33
|
+
* times; only its latest load is listed.
|
|
30
34
|
* Entries the tree can no longer name are still listed — dropping them would
|
|
31
35
|
* turn a loadable record into a silent absence — but they are labelled with
|
|
32
36
|
* `unnamedLabel` (the caller's translated fallback) rather than an empty row.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetRowModel.d.ts","sourceRoot":"","sources":["../../../../src/inquiry/v2/widgets/widgetRowModel.ts"],"names":[],"mappings":"AAaA;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE;QACZ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,0CAA0C;AAC1C,MAAM,WAAW,eAAe;IAC9B,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf
|
|
1
|
+
{"version":3,"file":"widgetRowModel.d.ts","sourceRoot":"","sources":["../../../../src/inquiry/v2/widgets/widgetRowModel.ts"],"names":[],"mappings":"AAaA;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE;QACZ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,0CAA0C;AAC1C,MAAM,WAAW,eAAe;IAC9B,sEAAoE;IACpE,GAAG,EAAE,MAAM,CAAC;IACZ,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,+DAA6D;IAC7D,UAAU,EAAE,MAAM,CAAC;IACnB,yEAAuE;IACvE,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AA+BD;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,0EAwB9B,CAAC"}
|
|
@@ -9,24 +9,59 @@
|
|
|
9
9
|
* back to something identifying rather than a blank row
|
|
10
10
|
* (frontend-standards: "never render a blank label").
|
|
11
11
|
*/
|
|
12
|
-
import { entityNounOf } from '../search/searchModel';
|
|
12
|
+
import { asText, entityNounOf } from '../search/searchModel';
|
|
13
13
|
const isNonEmptyString = (value) => typeof value === 'string' && value.trim().length > 0;
|
|
14
|
+
const dateOf = (node) => isNonEmptyString(node === null || node === void 0 ? void 0 : node.dateLoaded) ? node.dateLoaded : '';
|
|
14
15
|
/**
|
|
15
|
-
*
|
|
16
|
+
* A logged record's identity: its entity plus the identifier filters its
|
|
17
|
+
* `queryPayload` replays. v1 and v2 log the same record under different payload
|
|
18
|
+
* envelopes (page size, eager load) but the same `filterElements`, so the
|
|
19
|
+
* filters — field case-folded, value as text, order ignored — are the key. An
|
|
20
|
+
* entry with no filters cannot be told apart from another record, so it is
|
|
21
|
+
* keyed by its position in the list and never merged.
|
|
22
|
+
*/
|
|
23
|
+
const recordKeyOf = (node, entityName, position) => {
|
|
24
|
+
var _a;
|
|
25
|
+
const filters = (_a = node === null || node === void 0 ? void 0 : node.queryPayload) === null || _a === void 0 ? void 0 : _a['filterElements'];
|
|
26
|
+
const pairs = (Array.isArray(filters) ? filters : [])
|
|
27
|
+
.map((filter) => [
|
|
28
|
+
asText(filter === null || filter === void 0 ? void 0 : filter['searchField']).toLowerCase(),
|
|
29
|
+
asText(filter === null || filter === void 0 ? void 0 : filter['searchValue'])
|
|
30
|
+
])
|
|
31
|
+
.sort();
|
|
32
|
+
return pairs.length ? JSON.stringify([entityName, pairs]) : `#${position}`;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* The history as list rows, newest first, one row per record (recordKeyOf).
|
|
36
|
+
* The server log is append-only, so a record loaded three times arrives three
|
|
37
|
+
* times; only its latest load is listed.
|
|
16
38
|
* Entries the tree can no longer name are still listed — dropping them would
|
|
17
39
|
* turn a loadable record into a silent absence — but they are labelled with
|
|
18
40
|
* `unnamedLabel` (the caller's translated fallback) rather than an empty row.
|
|
19
41
|
*/
|
|
20
|
-
export const toRecentRecordRows = (nodes, unnamedLabel) =>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
42
|
+
export const toRecentRecordRows = (nodes, unnamedLabel) => {
|
|
43
|
+
const seen = new Set();
|
|
44
|
+
return [...(nodes !== null && nodes !== void 0 ? nodes : [])]
|
|
45
|
+
.sort((a, b) => dateOf(b).localeCompare(dateOf(a)))
|
|
46
|
+
.flatMap((node, position) => {
|
|
47
|
+
var _a, _b;
|
|
48
|
+
var _c;
|
|
49
|
+
const entityName = (_c = (_a = node === null || node === void 0 ? void 0 : node.nodeDetails) === null || _a === void 0 ? void 0 : _a.catalogReturnObject) !== null && _c !== void 0 ? _c : '';
|
|
50
|
+
const rawLabel = (_b = node === null || node === void 0 ? void 0 : node.nodeDetails) === null || _b === void 0 ? void 0 : _b.nodeLabel;
|
|
51
|
+
const label = isNonEmptyString(rawLabel) ? rawLabel.trim() : unnamedLabel;
|
|
52
|
+
const key = recordKeyOf(node, entityName, position);
|
|
53
|
+
if (seen.has(key))
|
|
54
|
+
return [];
|
|
55
|
+
seen.add(key);
|
|
56
|
+
return [
|
|
57
|
+
{
|
|
58
|
+
key,
|
|
59
|
+
label,
|
|
60
|
+
entity: entityName ? entityNounOf(entityName) : '',
|
|
61
|
+
dateLoaded: dateOf(node),
|
|
62
|
+
node
|
|
63
|
+
}
|
|
64
|
+
];
|
|
65
|
+
});
|
|
66
|
+
};
|
|
32
67
|
//# sourceMappingURL=widgetRowModel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetRowModel.js","sourceRoot":"","sources":["../../../../src/inquiry/v2/widgets/widgetRowModel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"widgetRowModel.js","sourceRoot":"","sources":["../../../../src/inquiry/v2/widgets/widgetRowModel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAiC7D,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAAmB,EAAE,CAC3D,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AAEvD,MAAM,MAAM,GAAG,CAAC,IAAwB,EAAU,EAAE,CAClD,gBAAgB,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;AAE5D;;;;;;;GAOG;AACH,MAAM,WAAW,GAAG,CAClB,IAAwB,EACxB,UAAkB,EAClB,QAAgB,EACR,EAAE,CAAC;;IACX,MAAM,OAAO,GAAG,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,YAAY,0CAAG,gBAAgB,CAAC,CAAC;IACvD,MAAM,KAAK,GAAG,CAAC,KAAK,CAAC,OAA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AE,CAAC,CAAC,CAAC,YAAY,CAAC;QAC1E,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;QACpD,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO,EAAE,CAAC;QAC7B,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACd,OAAO;YACL;gBACE,GAAG;gBACH,KAAK;gBACL,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE;gBAClD,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC;gBACxB,IAAI;aACL;SACF,CAAC;IAAA,CACH,CAAC,CAAC;AAAA,CACN,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { entityNounOf } from "../search/searchModel.mjs";
|
|
1
|
+
import { asText, entityNounOf } from "../search/searchModel.mjs";
|
|
2
2
|
//#region src/inquiry/v2/widgets/widgetRowModel.ts
|
|
3
3
|
/**
|
|
4
4
|
* The explore-page widgets' PURE half — no React, no HTTP — so it runs under
|
|
@@ -12,22 +12,46 @@ import { entityNounOf } from "../search/searchModel.mjs";
|
|
|
12
12
|
* (frontend-standards: "never render a blank label").
|
|
13
13
|
*/
|
|
14
14
|
const isNonEmptyString = (value) => typeof value === "string" && value.trim().length > 0;
|
|
15
|
+
const dateOf = (node) => isNonEmptyString(node?.dateLoaded) ? node.dateLoaded : "";
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
+
* A logged record's identity: its entity plus the identifier filters its
|
|
18
|
+
* `queryPayload` replays. v1 and v2 log the same record under different payload
|
|
19
|
+
* envelopes (page size, eager load) but the same `filterElements`, so the
|
|
20
|
+
* filters — field case-folded, value as text, order ignored — are the key. An
|
|
21
|
+
* entry with no filters cannot be told apart from another record, so it is
|
|
22
|
+
* keyed by its position in the list and never merged.
|
|
23
|
+
*/
|
|
24
|
+
const recordKeyOf = (node, entityName, position) => {
|
|
25
|
+
const filters = node?.queryPayload?.["filterElements"];
|
|
26
|
+
const pairs = (Array.isArray(filters) ? filters : []).map((filter) => [asText(filter?.["searchField"]).toLowerCase(), asText(filter?.["searchValue"])]).sort();
|
|
27
|
+
return pairs.length ? JSON.stringify([entityName, pairs]) : `#${position}`;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* The history as list rows, newest first, one row per record (recordKeyOf).
|
|
31
|
+
* The server log is append-only, so a record loaded three times arrives three
|
|
32
|
+
* times; only its latest load is listed.
|
|
17
33
|
* Entries the tree can no longer name are still listed — dropping them would
|
|
18
34
|
* turn a loadable record into a silent absence — but they are labelled with
|
|
19
35
|
* `unnamedLabel` (the caller's translated fallback) rather than an empty row.
|
|
20
36
|
*/
|
|
21
|
-
const toRecentRecordRows = (nodes, unnamedLabel) =>
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
37
|
+
const toRecentRecordRows = (nodes, unnamedLabel) => {
|
|
38
|
+
const seen = /* @__PURE__ */ new Set();
|
|
39
|
+
return [...nodes ?? []].sort((a, b) => dateOf(b).localeCompare(dateOf(a))).flatMap((node, position) => {
|
|
40
|
+
const entityName = node?.nodeDetails?.catalogReturnObject ?? "";
|
|
41
|
+
const rawLabel = node?.nodeDetails?.nodeLabel;
|
|
42
|
+
const label = isNonEmptyString(rawLabel) ? rawLabel.trim() : unnamedLabel;
|
|
43
|
+
const key = recordKeyOf(node, entityName, position);
|
|
44
|
+
if (seen.has(key)) return [];
|
|
45
|
+
seen.add(key);
|
|
46
|
+
return [{
|
|
47
|
+
key,
|
|
48
|
+
label,
|
|
49
|
+
entity: entityName ? entityNounOf(entityName) : "",
|
|
50
|
+
dateLoaded: dateOf(node),
|
|
51
|
+
node
|
|
52
|
+
}];
|
|
53
|
+
});
|
|
54
|
+
};
|
|
31
55
|
//#endregion
|
|
32
56
|
export { toRecentRecordRows };
|
|
33
57
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetRowModel.mjs","names":["entityNounOf","RecentlyLoadedWire","apiMethodId","dateLoaded","nodeDetails","nodeLabel","catalogReturnObject","treeStructureId","queryPayload","Record","key","RecentRecordRow","label","entity","node","isNonEmptyString","value","trim","length","toRecentRecordRows","nodes","unnamedLabel","
|
|
1
|
+
{"version":3,"file":"widgetRowModel.mjs","names":["asText","entityNounOf","RecentlyLoadedWire","apiMethodId","dateLoaded","nodeDetails","nodeLabel","catalogReturnObject","treeStructureId","queryPayload","Record","key","RecentRecordRow","label","entity","node","isNonEmptyString","value","trim","length","dateOf","recordKeyOf","entityName","position","filters","pairs","Array","isArray","map","filter","toLowerCase","sort","JSON","stringify","toRecentRecordRows","nodes","unnamedLabel","seen","Set","a","b","localeCompare","flatMap","rawLabel","has","add"],"sources":["../../../../src/inquiry/v2/widgets/widgetRowModel.ts"],"sourcesContent":["/**\n * The explore-page widgets' PURE half — no React, no HTTP — so it runs under\n * the node:test domain harness (`pnpm test:domain`).\n *\n * `toRecentRecordRows` — the recently-loaded history as list rows. The entity\n * is humanized through the SAME helper the search surface uses\n * (`entityNounOf`), so \"…Models.WorksRequest\" reads \"Works Request\"\n * everywhere, and a history entry whose label the server never stamped falls\n * back to something identifying rather than a blank row\n * (frontend-standards: \"never render a blank label\").\n */\nimport { asText, entityNounOf } from '../search/searchModel';\n\n/**\n * One recently-loaded history entry, structurally. Mirrors\n * `api/queries.RecentlyLoadedNode`; declared here so this module stays inside\n * the domain harness (queries.ts is React + axios and cannot compile there).\n */\nexport interface RecentlyLoadedWire {\n apiMethodId?: string;\n dateLoaded?: string;\n nodeDetails?: {\n nodeLabel?: string;\n catalogReturnObject?: string;\n treeStructureId?: string;\n };\n queryPayload?: Record<string, unknown>;\n [key: string]: unknown;\n}\n\n/** One row of the Recent Records list. */\nexport interface RecentRecordRow {\n /** The record's identity (recordKeyOf) — unique within the list. */\n key: string;\n /** The record's display label, as it was stamped when it was loaded. */\n label: string;\n /** The entity, humanized (\"Works Request\"). */\n entity: string;\n /** Raw ISO timestamp — the widget formats it for display. */\n dateLoaded: string;\n /** The history entry itself — replayed through `onLoadedNodeClick`. */\n node: RecentlyLoadedWire;\n}\n\nconst isNonEmptyString = (value: unknown): value is string =>\n typeof value === 'string' && value.trim().length > 0;\n\nconst dateOf = (node: RecentlyLoadedWire): string =>\n isNonEmptyString(node?.dateLoaded) ? node.dateLoaded : '';\n\n/**\n * A logged record's identity: its entity plus the identifier filters its\n * `queryPayload` replays. v1 and v2 log the same record under different payload\n * envelopes (page size, eager load) but the same `filterElements`, so the\n * filters — field case-folded, value as text, order ignored — are the key. An\n * entry with no filters cannot be told apart from another record, so it is\n * keyed by its position in the list and never merged.\n */\nconst recordKeyOf = (\n node: RecentlyLoadedWire,\n entityName: string,\n position: number\n): string => {\n const filters = node?.queryPayload?.['filterElements'];\n const pairs = (Array.isArray(filters) ? filters : [])\n .map((filter: Record<string, unknown>) => [\n asText(filter?.['searchField']).toLowerCase(),\n asText(filter?.['searchValue'])\n ])\n .sort();\n return pairs.length ? JSON.stringify([entityName, pairs]) : `#${position}`;\n};\n\n/**\n * The history as list rows, newest first, one row per record (recordKeyOf).\n * The server log is append-only, so a record loaded three times arrives three\n * times; only its latest load is listed.\n * Entries the tree can no longer name are still listed — dropping them would\n * turn a loadable record into a silent absence — but they are labelled with\n * `unnamedLabel` (the caller's translated fallback) rather than an empty row.\n */\nexport const toRecentRecordRows = (\n nodes: RecentlyLoadedWire[] | null | undefined,\n unnamedLabel: string\n): RecentRecordRow[] => {\n const seen = new Set<string>();\n return [...(nodes ?? [])]\n .sort((a, b) => dateOf(b).localeCompare(dateOf(a)))\n .flatMap((node, position) => {\n const entityName = node?.nodeDetails?.catalogReturnObject ?? '';\n const rawLabel = node?.nodeDetails?.nodeLabel;\n const label = isNonEmptyString(rawLabel) ? rawLabel.trim() : unnamedLabel;\n const key = recordKeyOf(node, entityName, position);\n if (seen.has(key)) return [];\n seen.add(key);\n return [\n {\n key,\n label,\n entity: entityName ? entityNounOf(entityName) : '',\n dateLoaded: dateOf(node),\n node\n }\n ];\n });\n};\n"],"mappings":";;;;;;;;;;;;;AA4CA,MAAMgB,oBAAoBC,UACxB,OAAOA,UAAU,YAAYA,MAAMC,MAAM,CAACC,SAAS;AAErD,MAAMC,UAAUL,SACdC,iBAAiBD,MAAMX,WAAW,GAAGW,KAAKX,aAAa;;;;;;;;;AAUzD,MAAMiB,eACJN,MACAO,YACAC,aACW;CACX,MAAMC,UAAUT,MAAMN,eAAe;CACrC,MAAMgB,SAASC,MAAMC,QAAQH,QAAQ,GAAGA,UAAU,EAAE,EACjDI,KAAKC,WAAoC,CACxC7B,OAAO6B,SAAS,eAAe,CAACC,aAAa,EAC7C9B,OAAO6B,SAAS,eAAe,CAChC,CAAC,CACDE,MAAM;AACT,QAAON,MAAMN,SAASa,KAAKC,UAAU,CAACX,YAAYG,MAAM,CAAC,GAAG,IAAIF;;;;;;;;;;AAWlE,MAAaW,sBACXC,OACAC,iBACsB;CACtB,MAAMC,uBAAO,IAAIC,KAAa;AAC9B,QAAO,CAAC,GAAIH,SAAS,EAAE,CAAE,CACtBJ,MAAMQ,GAAGC,MAAMpB,OAAOoB,EAAE,CAACC,cAAcrB,OAAOmB,EAAE,CAAC,CAAC,CAClDG,SAAS3B,MAAMQ,aAAa;EAC3B,MAAMD,aAAaP,MAAMV,aAAaE,uBAAuB;EAC7D,MAAMoC,WAAW5B,MAAMV,aAAaC;EACpC,MAAMO,QAAQG,iBAAiB2B,SAAS,GAAGA,SAASzB,MAAM,GAAGkB;EAC7D,MAAMzB,MAAMU,YAAYN,MAAMO,YAAYC,SAAS;AACnD,MAAIc,KAAKO,IAAIjC,IAAI,CAAE,QAAO,EAAE;AAC5B0B,OAAKQ,IAAIlC,IAAI;AACb,SAAO,CACL;GACEA;GACAE;GACAC,QAAQQ,aAAarB,aAAaqB,WAAW,GAAG;GAChDlB,YAAYgB,OAAOL,KAAK;GACxBA;GACD,CACF;GACD"}
|
|
@@ -7,9 +7,9 @@ import { asText } from "./text.mjs";
|
|
|
7
7
|
import { parsePatch, tenantLabelField } from "./config/layers.mjs";
|
|
8
8
|
import { usePromotedEntity } from "./api/promoted.mjs";
|
|
9
9
|
import { loadEntityMetadata } from "./metadata/useEntityMetadata.mjs";
|
|
10
|
+
import { labelsFor } from "./api/labels.mjs";
|
|
10
11
|
import { useHolds } from "./useEntityPage.mjs";
|
|
11
12
|
import { tagsForBusinessKeys, useAllTags } from "./api/tagsApi.mjs";
|
|
12
|
-
import { labelsFor } from "./api/labels.mjs";
|
|
13
13
|
import { MAINTENANCE_GRID_ID } from "./grid/gridId.mjs";
|
|
14
14
|
import { tagsCellRenderer } from "./grid/MaintenanceGrid.mjs";
|
|
15
15
|
import { RecordSheet } from "./record/RecordSheet.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { executeQueryWithParameters } from "../../udp/utilities/methodUtils.mjs";
|
|
2
|
-
import { appQueryClient } from "../../providers/QueryProvider.mjs";
|
|
3
2
|
import { asText } from "../text.mjs";
|
|
4
3
|
import { getPromotedEntity } from "./promoted.mjs";
|
|
5
4
|
import { search, searchEntity } from "./entityApi.mjs";
|
|
5
|
+
import { appQueryClient } from "../../providers/QueryProvider.mjs";
|
|
6
6
|
import { maintenanceKeys } from "../queryKeys.mjs";
|
|
7
7
|
//#region src/maintenance/api/lookupApi.ts
|
|
8
8
|
/** Every curated `udp.Lookup` (domain and virtual), by name — the lookups a field can take its options from. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c } from "../../reactCompilerRuntime.mjs";
|
|
2
|
-
import { appQueryClient } from "../../providers/QueryProvider.mjs";
|
|
3
2
|
import { getPromotedEntity } from "./promoted.mjs";
|
|
4
3
|
import { createEntity, deleteEntity, eqFilter, inFilter, search, searchEntity } from "./entityApi.mjs";
|
|
4
|
+
import { appQueryClient } from "../../providers/QueryProvider.mjs";
|
|
5
5
|
import { maintenanceKeys } from "../queryKeys.mjs";
|
|
6
6
|
import { useQuery } from "@tanstack/react-query";
|
|
7
7
|
//#region src/maintenance/api/tagsApi.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeDefaults.d.ts","sourceRoot":"","sources":["../../../src/maintenance/config/nodeDefaults.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,kBAAkB;IACjC,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qGAAqG;IACrG,YAAY,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpD,uCAAuC;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,4CAA4C;IAC5C,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;
|
|
1
|
+
{"version":3,"file":"nodeDefaults.d.ts","sourceRoot":"","sources":["../../../src/maintenance/config/nodeDefaults.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,kBAAkB;IACjC,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qGAAqG;IACrG,YAAY,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpD,uCAAuC;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,4CAA4C;IAC5C,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAoBD,eAAO,MAAM,kBAAkB,gEAS9B,CAAC"}
|