@canonical/dataviews-core 0.47.0 → 0.48.0
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/README.md +27 -19
- package/dist/esm/lib/assertion/assertInvariant.js +14 -0
- package/dist/esm/lib/assertion/assertInvariant.js.map +1 -0
- package/dist/esm/lib/assertion/index.js +2 -0
- package/dist/esm/lib/assertion/index.js.map +1 -0
- package/dist/esm/lib/bindings/index.js +6 -20
- package/dist/esm/lib/bindings/index.js.map +1 -1
- package/dist/esm/lib/coordinator/createQueryCoordinator.js +65 -6
- package/dist/esm/lib/coordinator/createQueryCoordinator.js.map +1 -1
- package/dist/esm/lib/coordinator/index.js +2 -0
- package/dist/esm/lib/coordinator/index.js.map +1 -1
- package/dist/esm/lib/coordinator/isClauseReplaced.js +27 -0
- package/dist/esm/lib/coordinator/isClauseReplaced.js.map +1 -0
- package/dist/esm/lib/coordinator/readWithheld.js +13 -0
- package/dist/esm/lib/coordinator/readWithheld.js.map +1 -0
- package/dist/esm/lib/display/constants.js +2 -1
- package/dist/esm/lib/display/constants.js.map +1 -1
- package/dist/esm/lib/display/resolveDisplayStatus.js +24 -4
- package/dist/esm/lib/display/resolveDisplayStatus.js.map +1 -1
- package/dist/esm/lib/filter/createFilterInput.js +50 -16
- package/dist/esm/lib/filter/createFilterInput.js.map +1 -1
- package/dist/esm/lib/filter/createFilterInputs.js +116 -29
- package/dist/esm/lib/filter/createFilterInputs.js.map +1 -1
- package/dist/esm/lib/geometry/buildColumnTemplate.js +2 -2
- package/dist/esm/lib/geometry/buildColumnTemplate.js.map +1 -1
- package/dist/esm/lib/geometry/createColumnLayout.js +7 -10
- package/dist/esm/lib/geometry/createColumnLayout.js.map +1 -1
- package/dist/esm/lib/geometry/createGridInteraction.js +8 -5
- package/dist/esm/lib/geometry/createGridInteraction.js.map +1 -1
- package/dist/esm/lib/geometry/resolveColumns.js +5 -5
- package/dist/esm/lib/geometry/resolveColumns.js.map +1 -1
- package/dist/esm/lib/index.js +1 -1
- package/dist/esm/lib/index.js.map +1 -1
- package/dist/esm/lib/indexeddb/createIndexedDBViewStore.js +2 -2
- package/dist/esm/lib/indexeddb/createIndexedDBViewStore.js.map +1 -1
- package/dist/esm/lib/indexeddb/readSavedView.js +6 -2
- package/dist/esm/lib/indexeddb/readSavedView.js.map +1 -1
- package/dist/esm/lib/location/createMemoryLocation.js +2 -0
- package/dist/esm/lib/location/createMemoryLocation.js.map +1 -1
- package/dist/esm/lib/location/createPlatformLocation.js +3 -0
- package/dist/esm/lib/location/createPlatformLocation.js.map +1 -1
- package/dist/esm/lib/messages/composeStatus.js +10 -0
- package/dist/esm/lib/messages/composeStatus.js.map +1 -0
- package/dist/esm/lib/messages/constants.js +323 -0
- package/dist/esm/lib/messages/constants.js.map +1 -1
- package/dist/esm/lib/messages/resolveMessages.js +1 -1
- package/dist/esm/lib/messages/resolveMessages.js.map +1 -1
- package/dist/esm/lib/observable/createChannel.js +4 -2
- package/dist/esm/lib/observable/createChannel.js.map +1 -1
- package/dist/esm/lib/presentation/constants.js +5 -12
- package/dist/esm/lib/presentation/constants.js.map +1 -1
- package/dist/esm/lib/presentation/createMemoryPresentation.js +12 -0
- package/dist/esm/lib/presentation/createMemoryPresentation.js.map +1 -0
- package/dist/esm/lib/presentation/createPresentation.js +3 -3
- package/dist/esm/lib/presentation/createPresentation.js.map +1 -1
- package/dist/esm/lib/presentation/hideColumn.js +7 -6
- package/dist/esm/lib/presentation/hideColumn.js.map +1 -1
- package/dist/esm/lib/presentation/index.js +4 -1
- package/dist/esm/lib/presentation/index.js.map +1 -1
- package/dist/esm/lib/presentation/isTableKey.js +9 -0
- package/dist/esm/lib/presentation/isTableKey.js.map +1 -0
- package/dist/esm/lib/presentation/moveColumn.js +7 -7
- package/dist/esm/lib/presentation/moveColumn.js.map +1 -1
- package/dist/esm/lib/presentation/pickTableKeys.js +6 -0
- package/dist/esm/lib/presentation/pickTableKeys.js.map +1 -0
- package/dist/esm/lib/presentation/resetColumnArrangement.js +8 -12
- package/dist/esm/lib/presentation/resetColumnArrangement.js.map +1 -1
- package/dist/esm/lib/presentation/resolveArrangementParams.js +7 -12
- package/dist/esm/lib/presentation/resolveArrangementParams.js.map +1 -1
- package/dist/esm/lib/presentation/resolveColumnArrangement.js +9 -8
- package/dist/esm/lib/presentation/resolveColumnArrangement.js.map +1 -1
- package/dist/esm/lib/presentation/showColumn.js +5 -4
- package/dist/esm/lib/presentation/showColumn.js.map +1 -1
- package/dist/esm/lib/presentation/spellColumnArrangement.js +5 -9
- package/dist/esm/lib/presentation/spellColumnArrangement.js.map +1 -1
- package/dist/esm/lib/presentation/spellWidthKey.js +4 -4
- package/dist/esm/lib/presentation/spellWidthKey.js.map +1 -1
- package/dist/esm/lib/provider/constants.js +3 -22
- package/dist/esm/lib/provider/constants.js.map +1 -1
- package/dist/esm/lib/provider/createDataViewsProvider.js +46 -19
- package/dist/esm/lib/provider/createDataViewsProvider.js.map +1 -1
- package/dist/esm/lib/provider/createQueryCommands.js +32 -20
- package/dist/esm/lib/provider/createQueryCommands.js.map +1 -1
- package/dist/esm/lib/provider/createRecordTyping.js +14 -12
- package/dist/esm/lib/provider/createRecordTyping.js.map +1 -1
- package/dist/esm/lib/provider/createRequestCompleter.js +8 -3
- package/dist/esm/lib/provider/createRequestCompleter.js.map +1 -1
- package/dist/esm/lib/provider/isDataViewsProvider.js +4 -2
- package/dist/esm/lib/provider/isDataViewsProvider.js.map +1 -1
- package/dist/esm/lib/provider/isSameQuery.js +13 -0
- package/dist/esm/lib/provider/isSameQuery.js.map +1 -0
- package/dist/esm/lib/provider/listCarriedIssues.js +20 -0
- package/dist/esm/lib/provider/listCarriedIssues.js.map +1 -0
- package/dist/esm/lib/provider/observePorts.js +2 -2
- package/dist/esm/lib/provider/observePorts.js.map +1 -1
- package/dist/esm/lib/provider/readCommandCause.js +28 -0
- package/dist/esm/lib/provider/readCommandCause.js.map +1 -0
- package/dist/esm/lib/provider/readLocatedArrangement.js +15 -13
- package/dist/esm/lib/provider/readLocatedArrangement.js.map +1 -1
- package/dist/esm/lib/provider/readProviderHost.js +2 -2
- package/dist/esm/lib/provider/readProviderHost.js.map +1 -1
- package/dist/esm/lib/provider/readProviderRegistry.js +20 -0
- package/dist/esm/lib/provider/readProviderRegistry.js.map +1 -0
- package/dist/esm/lib/provider/readStartingPoint.js +2 -1
- package/dist/esm/lib/provider/readStartingPoint.js.map +1 -1
- package/dist/esm/lib/provider/registerProviderHost.js +2 -2
- package/dist/esm/lib/provider/registerProviderHost.js.map +1 -1
- package/dist/esm/lib/provider/resolveHistoryPolicy.js +7 -7
- package/dist/esm/lib/provider/resolveHistoryPolicy.js.map +1 -1
- package/dist/esm/lib/provider/runSource.js +13 -8
- package/dist/esm/lib/provider/runSource.js.map +1 -1
- package/dist/esm/lib/provider/shouldAdoptLocation.js +15 -0
- package/dist/esm/lib/provider/shouldAdoptLocation.js.map +1 -0
- package/dist/esm/lib/provider/spellLocation.js +7 -3
- package/dist/esm/lib/provider/spellLocation.js.map +1 -1
- package/dist/esm/lib/provider/syncLocation.js +61 -31
- package/dist/esm/lib/provider/syncLocation.js.map +1 -1
- package/dist/esm/lib/query/applyQueryCommand.js +129 -38
- package/dist/esm/lib/query/applyQueryCommand.js.map +1 -1
- package/dist/esm/lib/query/areListsEqual.js +1 -1
- package/dist/esm/lib/query/areListsEqual.js.map +1 -1
- package/dist/esm/lib/query/canonicalizeSlice.js +14 -17
- package/dist/esm/lib/query/canonicalizeSlice.js.map +1 -1
- package/dist/esm/lib/query/compareConjuncts.js +44 -0
- package/dist/esm/lib/query/compareConjuncts.js.map +1 -0
- package/dist/esm/lib/query/constants.js +6 -2
- package/dist/esm/lib/query/constants.js.map +1 -1
- package/dist/esm/lib/query/index.js +2 -0
- package/dist/esm/lib/query/index.js.map +1 -1
- package/dist/esm/lib/query/listConjuncts.js +13 -0
- package/dist/esm/lib/query/listConjuncts.js.map +1 -0
- package/dist/esm/lib/query/readCondition.js +36 -0
- package/dist/esm/lib/query/readCondition.js.map +1 -0
- package/dist/esm/lib/query/rejectOperandArity.js +2 -4
- package/dist/esm/lib/query/rejectOperandArity.js.map +1 -1
- package/dist/esm/lib/result/areFieldFacetsEqual.js +7 -1
- package/dist/esm/lib/result/areFieldFacetsEqual.js.map +1 -1
- package/dist/esm/lib/rows/constants.js +1 -1
- package/dist/esm/lib/rows/constants.js.map +1 -1
- package/dist/esm/lib/rows/createRowModel.js +2 -2
- package/dist/esm/lib/rows/createRowModel.js.map +1 -1
- package/dist/esm/lib/rows/createRowScopes.js +5 -2
- package/dist/esm/lib/rows/createRowScopes.js.map +1 -1
- package/dist/esm/lib/schema/createSchema.js +21 -10
- package/dist/esm/lib/schema/createSchema.js.map +1 -1
- package/dist/esm/lib/schema/parseNumberWithUnit.js +72 -0
- package/dist/esm/lib/schema/parseNumberWithUnit.js.map +1 -0
- package/dist/esm/lib/schema/resolveFieldKind.js +88 -29
- package/dist/esm/lib/schema/resolveFieldKind.js.map +1 -1
- package/dist/esm/lib/selection/createSelection.js +4 -2
- package/dist/esm/lib/selection/createSelection.js.map +1 -1
- package/dist/esm/lib/source/copyCapabilities.js +0 -1
- package/dist/esm/lib/source/copyCapabilities.js.map +1 -1
- package/dist/esm/lib/source/createArraySource.js +11 -8
- package/dist/esm/lib/source/createArraySource.js.map +1 -1
- package/dist/esm/lib/source/createPage.js +0 -1
- package/dist/esm/lib/source/createPage.js.map +1 -1
- package/dist/esm/lib/source/createQuerySource.js +32 -13
- package/dist/esm/lib/source/createQuerySource.js.map +1 -1
- package/dist/esm/lib/source/createRefusal.js +5 -0
- package/dist/esm/lib/source/createRefusal.js.map +1 -0
- package/dist/esm/lib/source/createRelaySource.js +49 -60
- package/dist/esm/lib/source/createRelaySource.js.map +1 -1
- package/dist/esm/lib/source/declareCapabilities.js +0 -1
- package/dist/esm/lib/source/declareCapabilities.js.map +1 -1
- package/dist/esm/lib/source/executeSlice.js +1 -0
- package/dist/esm/lib/source/executeSlice.js.map +1 -1
- package/dist/esm/lib/source/foldText.js +3 -0
- package/dist/esm/lib/source/foldText.js.map +1 -1
- package/dist/esm/lib/source/index.js +3 -1
- package/dist/esm/lib/source/index.js.map +1 -1
- package/dist/esm/lib/source/listFilterRefusals.js +30 -0
- package/dist/esm/lib/source/listFilterRefusals.js.map +1 -0
- package/dist/esm/lib/source/listGroupRefusals.js +22 -0
- package/dist/esm/lib/source/listGroupRefusals.js.map +1 -0
- package/dist/esm/lib/source/listOfferedOperators.js +25 -0
- package/dist/esm/lib/source/listOfferedOperators.js.map +1 -0
- package/dist/esm/lib/source/listQueryRefusals.js +35 -0
- package/dist/esm/lib/source/listQueryRefusals.js.map +1 -0
- package/dist/esm/lib/source/listSortRefusals.js +27 -0
- package/dist/esm/lib/source/listSortRefusals.js.map +1 -0
- package/dist/esm/lib/source/listWindowRefusals.js +20 -0
- package/dist/esm/lib/source/listWindowRefusals.js.map +1 -0
- package/dist/esm/lib/source/orderRows.js +36 -12
- package/dist/esm/lib/source/orderRows.js.map +1 -1
- package/dist/esm/lib/source/readFacets.js +30 -15
- package/dist/esm/lib/source/readFacets.js.map +1 -1
- package/dist/esm/lib/source/readRelayPage.js +55 -0
- package/dist/esm/lib/source/readRelayPage.js.map +1 -0
- package/dist/esm/lib/source/readSlice.js +5 -3
- package/dist/esm/lib/source/readSlice.js.map +1 -1
- package/dist/esm/lib/source/resolveErrorDelivery.js +27 -0
- package/dist/esm/lib/source/resolveErrorDelivery.js.map +1 -0
- package/dist/esm/lib/source/selectRows.js +72 -16
- package/dist/esm/lib/source/selectRows.js.map +1 -1
- package/dist/esm/lib/views/createViewCommands.js +6 -3
- package/dist/esm/lib/views/createViewCommands.js.map +1 -1
- package/dist/esm/lib/views/readStoredQuery.js +2 -1
- package/dist/esm/lib/views/readStoredQuery.js.map +1 -1
- package/dist/esm/lib/virtualization/createSizeIndex.js +19 -10
- package/dist/esm/lib/virtualization/createSizeIndex.js.map +1 -1
- package/dist/esm/lib/virtualization/createVirtualRange.js +30 -28
- package/dist/esm/lib/virtualization/createVirtualRange.js.map +1 -1
- package/dist/esm/lib/wire/areQueryIssuesEqual.js +12 -0
- package/dist/esm/lib/wire/areQueryIssuesEqual.js.map +1 -0
- package/dist/esm/lib/wire/constants.js +56 -36
- package/dist/esm/lib/wire/constants.js.map +1 -1
- package/dist/esm/lib/wire/decodeQuery.js +140 -168
- package/dist/esm/lib/wire/decodeQuery.js.map +1 -1
- package/dist/esm/lib/wire/encodeCarryingQuery.js +294 -0
- package/dist/esm/lib/wire/encodeCarryingQuery.js.map +1 -0
- package/dist/esm/lib/wire/encodeQuery.js +8 -76
- package/dist/esm/lib/wire/encodeQuery.js.map +1 -1
- package/dist/esm/lib/wire/index.js +6 -1
- package/dist/esm/lib/wire/index.js.map +1 -1
- package/dist/esm/lib/wire/isNarrowingIssue.js +15 -0
- package/dist/esm/lib/wire/isNarrowingIssue.js.map +1 -0
- package/dist/esm/lib/wire/isOwnedKey.js +6 -2
- package/dist/esm/lib/wire/isOwnedKey.js.map +1 -1
- package/dist/esm/lib/wire/isReservedKey.js +9 -0
- package/dist/esm/lib/wire/isReservedKey.js.map +1 -0
- package/dist/esm/lib/wire/readArrangementParams.js +18 -14
- package/dist/esm/lib/wire/readArrangementParams.js.map +1 -1
- package/dist/esm/lib/wire/readKeyPredicate.js +146 -0
- package/dist/esm/lib/wire/readKeyPredicate.js.map +1 -0
- package/dist/esm/lib/wire/readTableKey.js +21 -0
- package/dist/esm/lib/wire/readTableKey.js.map +1 -0
- package/dist/esm/lib/wire/readUndeclaredField.js +19 -0
- package/dist/esm/lib/wire/readUndeclaredField.js.map +1 -0
- package/dist/esm/lib/wire/readWireKey.js +38 -0
- package/dist/esm/lib/wire/readWireKey.js.map +1 -0
- package/dist/esm/lib/wire/recordConjunct.js +48 -0
- package/dist/esm/lib/wire/recordConjunct.js.map +1 -0
- package/dist/esm/lib/wire/rejectWireName.js +3 -2
- package/dist/esm/lib/wire/rejectWireName.js.map +1 -1
- package/dist/esm/lib/wire/spellArrangementKey.js +7 -0
- package/dist/esm/lib/wire/spellArrangementKey.js.map +1 -0
- package/dist/esm/lib/wire/spellArrangementParams.js +12 -15
- package/dist/esm/lib/wire/spellArrangementParams.js.map +1 -1
- package/dist/esm/lib/wire/spellOperand.js +33 -0
- package/dist/esm/lib/wire/spellOperand.js.map +1 -0
- package/dist/esm/lib/wire/spellTableId.js +12 -0
- package/dist/esm/lib/wire/spellTableId.js.map +1 -0
- package/dist/esm/lib/wire/spellWireKey.js +7 -4
- package/dist/esm/lib/wire/spellWireKey.js.map +1 -1
- package/dist/esm/lib/wire/spellWireValues.js +18 -0
- package/dist/esm/lib/wire/spellWireValues.js.map +1 -0
- package/dist/esm/testing/answerWith.js +10 -0
- package/dist/esm/testing/buildFailedResult.js +12 -0
- package/dist/esm/testing/buildPage.js +19 -0
- package/dist/esm/testing/buildRefusedResult.js +18 -0
- package/dist/esm/testing/buildRowModel.js +15 -0
- package/dist/esm/testing/buildSettledPage.js +22 -0
- package/dist/esm/testing/buildStoredView.js +19 -0
- package/dist/esm/testing/classifyInitializer.js +50 -0
- package/dist/esm/testing/countAtLeast.js +9 -0
- package/dist/esm/testing/countExactly.js +9 -0
- package/dist/esm/testing/createCountedRows.js +28 -0
- package/dist/esm/testing/createCountingViewStore.js +36 -0
- package/dist/esm/testing/createDeferred.js +9 -0
- package/dist/esm/testing/createManualSource.js +56 -0
- package/dist/esm/testing/createRecordingLocation.js +53 -0
- package/dist/esm/testing/createStandInPresentationStore.js +15 -0
- package/dist/esm/testing/createStandInViewStore.js +23 -0
- package/dist/esm/testing/declare.js +10 -0
- package/dist/esm/testing/declareSort.js +17 -0
- package/dist/esm/testing/filterStatusBy.js +13 -0
- package/dist/esm/testing/fixtures.js +694 -0
- package/dist/esm/testing/flushPresentation.js +16 -0
- package/dist/esm/testing/index.js +35 -0
- package/dist/esm/testing/installFakeClock.js +18 -0
- package/dist/esm/testing/isMovableForm.js +7 -0
- package/dist/esm/testing/isWrappedInitializer.js +33 -0
- package/dist/esm/testing/isWrapperCallee.js +10 -0
- package/dist/esm/testing/judgeExports.js +54 -0
- package/dist/esm/testing/listBracedExports.js +45 -0
- package/dist/esm/testing/listExports.js +68 -0
- package/dist/esm/testing/listFileRuleFindings.js +76 -0
- package/dist/esm/testing/listUnmarkedNames.js +40 -0
- package/dist/esm/testing/maskSource.js +149 -0
- package/dist/esm/testing/observeUntilFinished.js +15 -0
- package/dist/esm/testing/openIndexedDBTab.js +20 -0
- package/dist/esm/testing/orderNodesByName.js +31 -0
- package/dist/esm/testing/readDeclarationDoc.js +15 -0
- package/dist/esm/testing/readDeclarationExport.js +41 -0
- package/dist/esm/testing/readDefaultExport.js +55 -0
- package/dist/esm/testing/readDisplayStatus.js +14 -0
- package/dist/esm/testing/readFileRole.js +16 -0
- package/dist/esm/testing/readGroup.js +8 -0
- package/dist/esm/testing/readId.js +9 -0
- package/dist/esm/testing/readIssuedRequest.js +12 -0
- package/dist/esm/testing/readLocalBinding.js +44 -0
- package/dist/esm/testing/readSucceededPage.js +7 -0
- package/dist/esm/testing/relayTypes.js +5 -0
- package/dist/esm/testing/respellLink.js +27 -0
- package/dist/esm/testing/runFailureHandlers.js +26 -0
- package/dist/esm/testing/settleCalls.js +11 -0
- package/dist/esm/testing/skipBalanced.js +20 -0
- package/dist/esm/testing/skipTypeAnnotation.js +33 -0
- package/dist/esm/testing/types.js +2 -0
- package/dist/esm/testing/waitForState.js +40 -0
- package/dist/types/lib/assertion/assertInvariant.d.ts +9 -0
- package/dist/types/lib/assertion/assertInvariant.d.ts.map +1 -0
- package/dist/types/lib/assertion/index.d.ts +2 -0
- package/dist/types/lib/assertion/index.d.ts.map +1 -0
- package/dist/types/lib/bindings/index.d.ts +6 -20
- package/dist/types/lib/bindings/index.d.ts.map +1 -1
- package/dist/types/lib/coordinator/createQueryCoordinator.d.ts.map +1 -1
- package/dist/types/lib/coordinator/index.d.ts +2 -0
- package/dist/types/lib/coordinator/index.d.ts.map +1 -1
- package/dist/types/lib/coordinator/isClauseReplaced.d.ts +12 -0
- package/dist/types/lib/coordinator/isClauseReplaced.d.ts.map +1 -0
- package/dist/types/lib/coordinator/readWithheld.d.ts +9 -0
- package/dist/types/lib/coordinator/readWithheld.d.ts.map +1 -0
- package/dist/types/lib/coordinator/types.d.ts +34 -11
- package/dist/types/lib/coordinator/types.d.ts.map +1 -1
- package/dist/types/lib/display/constants.d.ts.map +1 -1
- package/dist/types/lib/display/resolveDisplayStatus.d.ts +6 -0
- package/dist/types/lib/display/resolveDisplayStatus.d.ts.map +1 -1
- package/dist/types/lib/display/types.d.ts +22 -16
- package/dist/types/lib/display/types.d.ts.map +1 -1
- package/dist/types/lib/filter/createFilterInput.d.ts.map +1 -1
- package/dist/types/lib/filter/createFilterInputs.d.ts +4 -2
- package/dist/types/lib/filter/createFilterInputs.d.ts.map +1 -1
- package/dist/types/lib/filter/types.d.ts +55 -2
- package/dist/types/lib/filter/types.d.ts.map +1 -1
- package/dist/types/lib/geometry/createColumnLayout.d.ts +3 -6
- package/dist/types/lib/geometry/createColumnLayout.d.ts.map +1 -1
- package/dist/types/lib/geometry/createGridInteraction.d.ts +3 -0
- package/dist/types/lib/geometry/createGridInteraction.d.ts.map +1 -1
- package/dist/types/lib/geometry/types.d.ts +3 -1
- package/dist/types/lib/geometry/types.d.ts.map +1 -1
- package/dist/types/lib/index.d.ts +7 -7
- package/dist/types/lib/index.d.ts.map +1 -1
- package/dist/types/lib/indexeddb/createIndexedDBViewStore.d.ts.map +1 -1
- package/dist/types/lib/indexeddb/readSavedView.d.ts +4 -1
- package/dist/types/lib/indexeddb/readSavedView.d.ts.map +1 -1
- package/dist/types/lib/indexeddb/types.d.ts +7 -0
- package/dist/types/lib/indexeddb/types.d.ts.map +1 -1
- package/dist/types/lib/location/createMemoryLocation.d.ts +2 -0
- package/dist/types/lib/location/createMemoryLocation.d.ts.map +1 -1
- package/dist/types/lib/location/createPlatformLocation.d.ts +3 -0
- package/dist/types/lib/location/createPlatformLocation.d.ts.map +1 -1
- package/dist/types/lib/messages/composeStatus.d.ts +6 -0
- package/dist/types/lib/messages/composeStatus.d.ts.map +1 -0
- package/dist/types/lib/messages/constants.d.ts +27 -1
- package/dist/types/lib/messages/constants.d.ts.map +1 -1
- package/dist/types/lib/messages/types.d.ts +381 -88
- package/dist/types/lib/messages/types.d.ts.map +1 -1
- package/dist/types/lib/observable/createChannel.d.ts +2 -0
- package/dist/types/lib/observable/createChannel.d.ts.map +1 -1
- package/dist/types/lib/presentation/constants.d.ts +4 -12
- package/dist/types/lib/presentation/constants.d.ts.map +1 -1
- package/dist/types/lib/presentation/createMemoryPresentation.d.ts +10 -0
- package/dist/types/lib/presentation/createMemoryPresentation.d.ts.map +1 -0
- package/dist/types/lib/presentation/hideColumn.d.ts +2 -2
- package/dist/types/lib/presentation/hideColumn.d.ts.map +1 -1
- package/dist/types/lib/presentation/index.d.ts +4 -1
- package/dist/types/lib/presentation/index.d.ts.map +1 -1
- package/dist/types/lib/presentation/isTableKey.d.ts +6 -0
- package/dist/types/lib/presentation/isTableKey.d.ts.map +1 -0
- package/dist/types/lib/presentation/moveColumn.d.ts +2 -3
- package/dist/types/lib/presentation/moveColumn.d.ts.map +1 -1
- package/dist/types/lib/presentation/pickTableKeys.d.ts +4 -0
- package/dist/types/lib/presentation/pickTableKeys.d.ts.map +1 -0
- package/dist/types/lib/presentation/resetColumnArrangement.d.ts +3 -8
- package/dist/types/lib/presentation/resetColumnArrangement.d.ts.map +1 -1
- package/dist/types/lib/presentation/resolveArrangementParams.d.ts +3 -9
- package/dist/types/lib/presentation/resolveArrangementParams.d.ts.map +1 -1
- package/dist/types/lib/presentation/resolveColumnArrangement.d.ts +3 -2
- package/dist/types/lib/presentation/resolveColumnArrangement.d.ts.map +1 -1
- package/dist/types/lib/presentation/showColumn.d.ts +1 -1
- package/dist/types/lib/presentation/showColumn.d.ts.map +1 -1
- package/dist/types/lib/presentation/spellColumnArrangement.d.ts +3 -7
- package/dist/types/lib/presentation/spellColumnArrangement.d.ts.map +1 -1
- package/dist/types/lib/presentation/spellWidthKey.d.ts +2 -2
- package/dist/types/lib/presentation/spellWidthKey.d.ts.map +1 -1
- package/dist/types/lib/presentation/types.d.ts +6 -2
- package/dist/types/lib/presentation/types.d.ts.map +1 -1
- package/dist/types/lib/provider/constants.d.ts +3 -15
- package/dist/types/lib/provider/constants.d.ts.map +1 -1
- package/dist/types/lib/provider/createDataViewsProvider.d.ts.map +1 -1
- package/dist/types/lib/provider/createQueryCommands.d.ts.map +1 -1
- package/dist/types/lib/provider/createRecordTyping.d.ts.map +1 -1
- package/dist/types/lib/provider/createRequestCompleter.d.ts.map +1 -1
- package/dist/types/lib/provider/isDataViewsProvider.d.ts.map +1 -1
- package/dist/types/lib/provider/isSameQuery.d.ts +8 -0
- package/dist/types/lib/provider/isSameQuery.d.ts.map +1 -0
- package/dist/types/lib/provider/listCarriedIssues.d.ts +10 -0
- package/dist/types/lib/provider/listCarriedIssues.d.ts.map +1 -0
- package/dist/types/lib/provider/readCommandCause.d.ts +10 -0
- package/dist/types/lib/provider/readCommandCause.d.ts.map +1 -0
- package/dist/types/lib/provider/readLocatedArrangement.d.ts +3 -5
- package/dist/types/lib/provider/readLocatedArrangement.d.ts.map +1 -1
- package/dist/types/lib/provider/readProviderRegistry.d.ts +10 -0
- package/dist/types/lib/provider/readProviderRegistry.d.ts.map +1 -0
- package/dist/types/lib/provider/readStartingPoint.d.ts.map +1 -1
- package/dist/types/lib/provider/runSource.d.ts.map +1 -1
- package/dist/types/lib/provider/shouldAdoptLocation.d.ts +19 -0
- package/dist/types/lib/provider/shouldAdoptLocation.d.ts.map +1 -0
- package/dist/types/lib/provider/spellLocation.d.ts +10 -1
- package/dist/types/lib/provider/spellLocation.d.ts.map +1 -1
- package/dist/types/lib/provider/syncLocation.d.ts.map +1 -1
- package/dist/types/lib/provider/types.d.ts +91 -36
- package/dist/types/lib/provider/types.d.ts.map +1 -1
- package/dist/types/lib/query/applyQueryCommand.d.ts +7 -2
- package/dist/types/lib/query/applyQueryCommand.d.ts.map +1 -1
- package/dist/types/lib/query/canonicalizeSlice.d.ts +4 -2
- package/dist/types/lib/query/canonicalizeSlice.d.ts.map +1 -1
- package/dist/types/lib/query/compareConjuncts.d.ts +14 -0
- package/dist/types/lib/query/compareConjuncts.d.ts.map +1 -0
- package/dist/types/lib/query/constants.d.ts +2 -2
- package/dist/types/lib/query/constants.d.ts.map +1 -1
- package/dist/types/lib/query/index.d.ts +2 -0
- package/dist/types/lib/query/index.d.ts.map +1 -1
- package/dist/types/lib/query/listConjuncts.d.ts +11 -0
- package/dist/types/lib/query/listConjuncts.d.ts.map +1 -0
- package/dist/types/lib/query/readCondition.d.ts +14 -0
- package/dist/types/lib/query/readCondition.d.ts.map +1 -0
- package/dist/types/lib/query/rejectOperandArity.d.ts +2 -2
- package/dist/types/lib/query/rejectOperandArity.d.ts.map +1 -1
- package/dist/types/lib/query/types.d.ts +89 -16
- package/dist/types/lib/query/types.d.ts.map +1 -1
- package/dist/types/lib/result/areFieldFacetsEqual.d.ts +7 -1
- package/dist/types/lib/result/areFieldFacetsEqual.d.ts.map +1 -1
- package/dist/types/lib/result/types.d.ts +66 -24
- package/dist/types/lib/result/types.d.ts.map +1 -1
- package/dist/types/lib/rows/createRowScopes.d.ts +3 -0
- package/dist/types/lib/rows/createRowScopes.d.ts.map +1 -1
- package/dist/types/lib/rows/types.d.ts +3 -3
- package/dist/types/lib/rows/types.d.ts.map +1 -1
- package/dist/types/lib/schema/createSchema.d.ts.map +1 -1
- package/dist/types/lib/schema/parseNumberWithUnit.d.ts +15 -0
- package/dist/types/lib/schema/parseNumberWithUnit.d.ts.map +1 -0
- package/dist/types/lib/schema/resolveFieldKind.d.ts.map +1 -1
- package/dist/types/lib/schema/types.d.ts +93 -29
- package/dist/types/lib/schema/types.d.ts.map +1 -1
- package/dist/types/lib/selection/createSelection.d.ts +2 -0
- package/dist/types/lib/selection/createSelection.d.ts.map +1 -1
- package/dist/types/lib/source/copyCapabilities.d.ts.map +1 -1
- package/dist/types/lib/source/createArraySource.d.ts +5 -2
- package/dist/types/lib/source/createArraySource.d.ts.map +1 -1
- package/dist/types/lib/source/createPage.d.ts.map +1 -1
- package/dist/types/lib/source/createQuerySource.d.ts +7 -0
- package/dist/types/lib/source/createQuerySource.d.ts.map +1 -1
- package/dist/types/lib/source/createRefusal.d.ts +4 -0
- package/dist/types/lib/source/createRefusal.d.ts.map +1 -0
- package/dist/types/lib/source/createRelaySource.d.ts +7 -1
- package/dist/types/lib/source/createRelaySource.d.ts.map +1 -1
- package/dist/types/lib/source/declareCapabilities.d.ts.map +1 -1
- package/dist/types/lib/source/executeSlice.d.ts.map +1 -1
- package/dist/types/lib/source/foldText.d.ts +3 -0
- package/dist/types/lib/source/foldText.d.ts.map +1 -1
- package/dist/types/lib/source/index.d.ts +3 -1
- package/dist/types/lib/source/index.d.ts.map +1 -1
- package/dist/types/lib/source/listFilterRefusals.d.ts +11 -0
- package/dist/types/lib/source/listFilterRefusals.d.ts.map +1 -0
- package/dist/types/lib/source/listGroupRefusals.d.ts +10 -0
- package/dist/types/lib/source/listGroupRefusals.d.ts.map +1 -0
- package/dist/types/lib/source/listOfferedOperators.d.ts +14 -0
- package/dist/types/lib/source/listOfferedOperators.d.ts.map +1 -0
- package/dist/types/lib/source/{refusalsOf.d.ts → listQueryRefusals.d.ts} +3 -3
- package/dist/types/lib/source/listQueryRefusals.d.ts.map +1 -0
- package/dist/types/lib/source/listSortRefusals.d.ts +10 -0
- package/dist/types/lib/source/listSortRefusals.d.ts.map +1 -0
- package/dist/types/lib/source/listWindowRefusals.d.ts +9 -0
- package/dist/types/lib/source/listWindowRefusals.d.ts.map +1 -0
- package/dist/types/lib/source/orderRows.d.ts +10 -5
- package/dist/types/lib/source/orderRows.d.ts.map +1 -1
- package/dist/types/lib/source/readFacets.d.ts +1 -1
- package/dist/types/lib/source/readFacets.d.ts.map +1 -1
- package/dist/types/lib/source/readRelayPage.d.ts +19 -0
- package/dist/types/lib/source/readRelayPage.d.ts.map +1 -0
- package/dist/types/lib/source/readSlice.d.ts +5 -3
- package/dist/types/lib/source/readSlice.d.ts.map +1 -1
- package/dist/types/lib/source/resolveErrorDelivery.d.ts +9 -0
- package/dist/types/lib/source/resolveErrorDelivery.d.ts.map +1 -0
- package/dist/types/lib/source/selectRows.d.ts +4 -2
- package/dist/types/lib/source/selectRows.d.ts.map +1 -1
- package/dist/types/lib/source/types.d.ts +36 -17
- package/dist/types/lib/source/types.d.ts.map +1 -1
- package/dist/types/lib/views/createViewCommands.d.ts.map +1 -1
- package/dist/types/lib/views/readStoredQuery.d.ts.map +1 -1
- package/dist/types/lib/views/types.d.ts +1 -1
- package/dist/types/lib/views/types.d.ts.map +1 -1
- package/dist/types/lib/virtualization/createSizeIndex.d.ts +3 -0
- package/dist/types/lib/virtualization/createSizeIndex.d.ts.map +1 -1
- package/dist/types/lib/virtualization/createVirtualRange.d.ts +4 -1
- package/dist/types/lib/virtualization/createVirtualRange.d.ts.map +1 -1
- package/dist/types/lib/virtualization/types.d.ts +4 -4
- package/dist/types/lib/virtualization/types.d.ts.map +1 -1
- package/dist/types/lib/wire/areQueryIssuesEqual.d.ts +7 -0
- package/dist/types/lib/wire/areQueryIssuesEqual.d.ts.map +1 -0
- package/dist/types/lib/wire/constants.d.ts +54 -18
- package/dist/types/lib/wire/constants.d.ts.map +1 -1
- package/dist/types/lib/wire/decodeQuery.d.ts +7 -4
- package/dist/types/lib/wire/decodeQuery.d.ts.map +1 -1
- package/dist/types/lib/wire/encodeCarryingQuery.d.ts +9 -0
- package/dist/types/lib/wire/encodeCarryingQuery.d.ts.map +1 -0
- package/dist/types/lib/wire/encodeQuery.d.ts.map +1 -1
- package/dist/types/lib/wire/index.d.ts +6 -1
- package/dist/types/lib/wire/index.d.ts.map +1 -1
- package/dist/types/lib/wire/isNarrowingIssue.d.ts +13 -0
- package/dist/types/lib/wire/isNarrowingIssue.d.ts.map +1 -0
- package/dist/types/lib/wire/isOwnedKey.d.ts +3 -1
- package/dist/types/lib/wire/isOwnedKey.d.ts.map +1 -1
- package/dist/types/lib/wire/isReservedKey.d.ts +6 -0
- package/dist/types/lib/wire/isReservedKey.d.ts.map +1 -0
- package/dist/types/lib/wire/readArrangementParams.d.ts +4 -8
- package/dist/types/lib/wire/readArrangementParams.d.ts.map +1 -1
- package/dist/types/lib/wire/readKeyPredicate.d.ts +9 -0
- package/dist/types/lib/wire/readKeyPredicate.d.ts.map +1 -0
- package/dist/types/lib/wire/readTableKey.d.ts +13 -0
- package/dist/types/lib/wire/readTableKey.d.ts.map +1 -0
- package/dist/types/lib/wire/readUndeclaredField.d.ts +11 -0
- package/dist/types/lib/wire/readUndeclaredField.d.ts.map +1 -0
- package/dist/types/lib/wire/readWireKey.d.ts +11 -0
- package/dist/types/lib/wire/readWireKey.d.ts.map +1 -0
- package/dist/types/lib/wire/recordConjunct.d.ts +10 -0
- package/dist/types/lib/wire/recordConjunct.d.ts.map +1 -0
- package/dist/types/lib/wire/rejectWireName.d.ts.map +1 -1
- package/dist/types/lib/wire/spellArrangementKey.d.ts +4 -0
- package/dist/types/lib/wire/spellArrangementKey.d.ts.map +1 -0
- package/dist/types/lib/wire/spellArrangementParams.d.ts +3 -9
- package/dist/types/lib/wire/spellArrangementParams.d.ts.map +1 -1
- package/dist/types/lib/wire/spellOperand.d.ts +4 -0
- package/dist/types/lib/wire/spellOperand.d.ts.map +1 -0
- package/dist/types/lib/wire/spellTableId.d.ts +6 -0
- package/dist/types/lib/wire/spellTableId.d.ts.map +1 -0
- package/dist/types/lib/wire/spellWireKey.d.ts +4 -4
- package/dist/types/lib/wire/spellWireKey.d.ts.map +1 -1
- package/dist/types/lib/wire/spellWireValues.d.ts +13 -0
- package/dist/types/lib/wire/spellWireValues.d.ts.map +1 -0
- package/dist/types/lib/wire/types.d.ts +68 -31
- package/dist/types/lib/wire/types.d.ts.map +1 -1
- package/dist/types/testing/answerWith.d.ts +9 -0
- package/dist/types/testing/buildFailedResult.d.ts +10 -0
- package/dist/types/testing/buildPage.d.ts +8 -0
- package/dist/types/testing/buildRefusedResult.d.ts +10 -0
- package/dist/types/testing/buildRowModel.d.ts +9 -0
- package/dist/types/testing/buildSettledPage.d.ts +17 -0
- package/dist/types/testing/buildStoredView.d.ts +8 -0
- package/dist/types/testing/classifyInitializer.d.ts +6 -0
- package/dist/types/testing/countAtLeast.d.ts +8 -0
- package/dist/types/testing/countExactly.d.ts +8 -0
- package/dist/types/testing/createCountedRows.d.ts +13 -0
- package/dist/types/testing/createCountingViewStore.d.ts +10 -0
- package/dist/types/testing/createDeferred.d.ts +8 -0
- package/dist/types/testing/createManualSource.d.ts +16 -0
- package/dist/types/testing/createRecordingLocation.d.ts +20 -0
- package/dist/types/testing/createStandInPresentationStore.d.ts +9 -0
- package/dist/types/testing/createStandInViewStore.d.ts +9 -0
- package/dist/types/testing/declare.d.ts +8 -0
- package/dist/types/testing/declareSort.d.ts +9 -0
- package/dist/types/testing/filterStatusBy.d.ts +8 -0
- package/dist/types/testing/fixtures.d.ts +117 -0
- package/dist/types/testing/flushPresentation.d.ts +13 -0
- package/dist/types/testing/index.d.ts +37 -0
- package/dist/types/testing/installFakeClock.d.ts +14 -0
- package/dist/types/testing/isMovableForm.d.ts +6 -0
- package/dist/types/testing/isWrappedInitializer.d.ts +6 -0
- package/dist/types/testing/isWrapperCallee.d.ts +2 -0
- package/dist/types/testing/judgeExports.d.ts +8 -0
- package/dist/types/testing/listBracedExports.d.ts +6 -0
- package/dist/types/testing/listExports.d.ts +7 -0
- package/dist/types/testing/listFileRuleFindings.d.ts +12 -0
- package/dist/types/testing/listUnmarkedNames.d.ts +10 -0
- package/dist/types/testing/maskSource.d.ts +6 -0
- package/dist/types/testing/observeUntilFinished.d.ts +12 -0
- package/dist/types/testing/openIndexedDBTab.d.ts +12 -0
- package/dist/types/testing/orderNodesByName.d.ts +11 -0
- package/dist/types/testing/readDeclarationDoc.d.ts +6 -0
- package/dist/types/testing/readDeclarationExport.d.ts +6 -0
- package/dist/types/testing/readDefaultExport.d.ts +6 -0
- package/dist/types/testing/readDisplayStatus.d.ts +8 -0
- package/dist/types/testing/readFileRole.d.ts +3 -0
- package/dist/types/testing/readGroup.d.ts +2 -0
- package/dist/types/testing/readId.d.ts +8 -0
- package/dist/types/testing/readIssuedRequest.d.ts +7 -0
- package/dist/types/testing/readLocalBinding.d.ts +6 -0
- package/dist/types/testing/readSucceededPage.d.ts +3 -0
- package/dist/types/testing/relayTypes.d.ts +38 -0
- package/dist/types/testing/respellLink.d.ts +12 -0
- package/dist/types/testing/runFailureHandlers.d.ts +12 -0
- package/dist/types/testing/settleCalls.d.ts +15 -0
- package/dist/types/testing/skipBalanced.d.ts +5 -0
- package/dist/types/testing/skipTypeAnnotation.d.ts +5 -0
- package/dist/types/testing/types.d.ts +228 -0
- package/dist/types/testing/waitForState.d.ts +11 -0
- package/package.json +19 -9
- package/dist/esm/lib/messages/DEFAULT_MESSAGES.js +0 -194
- package/dist/esm/lib/messages/DEFAULT_MESSAGES.js.map +0 -1
- package/dist/esm/lib/source/refusalsOf.js +0 -74
- package/dist/esm/lib/source/refusalsOf.js.map +0 -1
- package/dist/types/lib/messages/DEFAULT_MESSAGES.d.ts +0 -10
- package/dist/types/lib/messages/DEFAULT_MESSAGES.d.ts.map +0 -1
- package/dist/types/lib/source/refusalsOf.d.ts.map +0 -1
|
@@ -9,15 +9,14 @@ import type { DataViewsState, QueryCoordinator } from "../coordinator/index.js";
|
|
|
9
9
|
import type { HistoryMode, QueryLocation } from "../location/index.js";
|
|
10
10
|
import type { Channel, ReadonlyChannel } from "../observable/index.js";
|
|
11
11
|
import type { Presentation, PresentationStore, ViewArrangement } from "../presentation/index.js";
|
|
12
|
-
import type { GroupPath, GroupTerm, Predicate, PredicateOperator, Query,
|
|
13
|
-
import type { Completion, SourceRefusal } from "../result/index.js";
|
|
12
|
+
import type { GroupPath, GroupTerm, Predicate, PredicateOperator, PredicateRef, Query, QueryClearPath, QueryCommand, SortTerm, WindowNavigation } from "../query/index.js";
|
|
13
|
+
import type { Completion, QueryIssue, SourceRefusal } from "../result/index.js";
|
|
14
14
|
import type { Applicability, RowIdentifier, RowModel, RowRecord } from "../rows/index.js";
|
|
15
15
|
import type { SchemaFieldDefinition } from "../schema/index.js";
|
|
16
16
|
import type { Selection } from "../selection/index.js";
|
|
17
17
|
import type { DataViewsSnapshot } from "../snapshot/index.js";
|
|
18
18
|
import type { FacetFieldNameOf, Source, SourceCapabilities } from "../source/index.js";
|
|
19
19
|
import type { SavedViews, ViewAdoptionCause, ViewStore } from "../views/index.js";
|
|
20
|
-
import type { QueryIssue } from "../wire/index.js";
|
|
21
20
|
/**
|
|
22
21
|
* The provider: the one owner of a collection's state and of the ports
|
|
23
22
|
* that feed it. Built once per page over a module-scope collection, a
|
|
@@ -89,18 +88,23 @@ export type DataViewsProvider<TFields extends readonly SchemaFieldDefinition[] =
|
|
|
89
88
|
readonly navigateWindow: (window: WindowNavigation) => readonly SourceRefusal[];
|
|
90
89
|
readonly setSort: (sort: readonly SortTerm[]) => readonly SourceRefusal[];
|
|
91
90
|
readonly setSearch: (search: string) => readonly SourceRefusal[];
|
|
91
|
+
/**
|
|
92
|
+
* Empty the named parts of the query, and their refused clauses, in one
|
|
93
|
+
* transition from page one. A clear that changes nothing commits nothing.
|
|
94
|
+
*/
|
|
95
|
+
readonly clear: (paths: readonly [QueryClearPath, ...QueryClearPath[]]) => readonly SourceRefusal[];
|
|
92
96
|
/**
|
|
93
97
|
* Replace the grouping levels. Reserved: refused while no source declares
|
|
94
98
|
* a groupable field.
|
|
95
99
|
*
|
|
96
|
-
*
|
|
100
|
+
* The group header row calls this.
|
|
97
101
|
*/
|
|
98
102
|
readonly setGroup: (group: readonly GroupTerm[]) => readonly SourceRefusal[];
|
|
99
103
|
/**
|
|
100
104
|
* Replace the collapsed group paths. Reserved: refused while no source
|
|
101
105
|
* honours collapse.
|
|
102
106
|
*
|
|
103
|
-
*
|
|
107
|
+
* The group header's disclosure calls this.
|
|
104
108
|
*/
|
|
105
109
|
readonly setCollapsed: (collapsed: readonly GroupPath[]) => readonly SourceRefusal[];
|
|
106
110
|
/**
|
|
@@ -112,7 +116,8 @@ export type DataViewsProvider<TFields extends readonly SchemaFieldDefinition[] =
|
|
|
112
116
|
* leaves the request pending for the first observer. Nothing is started
|
|
113
117
|
* or subscribed either way, and the first observer takes the source up
|
|
114
118
|
* over the rows drawn without asking for them again. This is the call a
|
|
115
|
-
* server render makes before rendering.
|
|
119
|
+
* server render makes before rendering. A query withheld for a link's
|
|
120
|
+
* refused clauses is not asked for: nothing happens.
|
|
116
121
|
*/
|
|
117
122
|
readonly refresh: () => void;
|
|
118
123
|
/**
|
|
@@ -120,7 +125,7 @@ export type DataViewsProvider<TFields extends readonly SchemaFieldDefinition[] =
|
|
|
120
125
|
* source's own check. Empty means executable. What a control reads before
|
|
121
126
|
* offering a destination.
|
|
122
127
|
*/
|
|
123
|
-
readonly
|
|
128
|
+
readonly listRefusals: (query: Query) => readonly SourceRefusal[];
|
|
124
129
|
/**
|
|
125
130
|
* Run one declared action over the given identities, or over the
|
|
126
131
|
* selection when none are given. Resolves with the settled run once every
|
|
@@ -271,7 +276,7 @@ export type Transition = {
|
|
|
271
276
|
readonly history: HistoryMode | null;
|
|
272
277
|
};
|
|
273
278
|
/** The history mode of every cause, resolved from the provider's policy. */
|
|
274
|
-
export type TransitionHistory = Readonly<Record<TransitionCause, HistoryMode | null>>;
|
|
279
|
+
export type TransitionHistory = Readonly<Record<QueryTransition, HistoryMode> & Record<Exclude<TransitionCause, QueryTransition>, HistoryMode | null>>;
|
|
275
280
|
/**
|
|
276
281
|
* The provider's internal host: what its ports and the framework bindings
|
|
277
282
|
* drive, and nothing an application writes reaches. Reachable through
|
|
@@ -280,27 +285,53 @@ export type TransitionHistory = Readonly<Record<TransitionCause, HistoryMode | n
|
|
|
280
285
|
* @experimental Pre-release: the whole surface is still settling, and this
|
|
281
286
|
* name may change or move before the first release.
|
|
282
287
|
*/
|
|
283
|
-
export type ProviderHost<TFields extends readonly SchemaFieldDefinition[] = readonly SchemaFieldDefinition[], TRow extends object = RowRecord> = Pick<DataViewsProvider<TFields, TRow>, "collection" | "capabilities" | "state" | "
|
|
288
|
+
export type ProviderHost<TFields extends readonly SchemaFieldDefinition[] = readonly SchemaFieldDefinition[], TRow extends object = RowRecord> = Pick<DataViewsProvider<TFields, TRow>, "collection" | "capabilities" | "state" | "listRefusals"> & {
|
|
284
289
|
/**
|
|
285
|
-
* Replace the
|
|
286
|
-
*
|
|
290
|
+
* Replace the conjunct at `nth` of the predicate's address, 0 when left
|
|
291
|
+
* out, or add it where the address holds none, as one transition; the
|
|
292
|
+
* window returns to page one. Given `history`, the transition enters
|
|
293
|
+
* history that way rather than as the policy says: a typed value's later
|
|
294
|
+
* edits in one input session replace the entry its first one entered.
|
|
295
|
+
*/
|
|
296
|
+
readonly setPredicate: (predicate: Predicate, nth?: number, history?: HistoryMode) => readonly SourceRefusal[];
|
|
297
|
+
/**
|
|
298
|
+
* Add a conjunct beside any already at its address, as one transition;
|
|
299
|
+
* the window returns to page one. A conjunct the query already holds is
|
|
300
|
+
* no change, since A AND A is A. Given `history`, the transition enters
|
|
301
|
+
* history that way rather than as the policy says.
|
|
302
|
+
*/
|
|
303
|
+
readonly addPredicate: (predicate: Predicate, history?: HistoryMode) => readonly SourceRefusal[];
|
|
304
|
+
/**
|
|
305
|
+
* Remove the conjunct at `nth` of an address, 0 when left out; the window
|
|
306
|
+
* returns to page one. A conjunct already gone is no change.
|
|
307
|
+
*/
|
|
308
|
+
readonly removePredicate: (field: string, operator: PredicateOperator, nth?: number) => readonly SourceRefusal[];
|
|
309
|
+
/**
|
|
310
|
+
* Remove the named conjuncts and add others, as one transition: a set
|
|
311
|
+
* moved to another operator, two bounds merged into one. Each ref names a
|
|
312
|
+
* conjunct as the query stands before the edit; one naming none, or named
|
|
313
|
+
* twice, is a stale reading of the query and throws. The window returns to
|
|
287
314
|
* page one.
|
|
288
315
|
*/
|
|
289
|
-
readonly
|
|
290
|
-
/**
|
|
291
|
-
|
|
292
|
-
|
|
316
|
+
readonly editPredicates: (remove: readonly PredicateRef[], add: readonly Predicate[]) => readonly SourceRefusal[];
|
|
317
|
+
/**
|
|
318
|
+
* Request the current query again and name the request. A withheld query
|
|
319
|
+
* is never asked for, so refreshing one throws.
|
|
320
|
+
*/
|
|
293
321
|
readonly refresh: () => string;
|
|
294
322
|
/**
|
|
295
323
|
* Adopt an externally authoritative query with the saved view open beside
|
|
296
324
|
* it — null for none — and name the request it issued, or null when the
|
|
297
|
-
* query did not move. Query and view move as one
|
|
298
|
-
* enters history once. The cause says whose
|
|
299
|
-
* (`adopt`), which is never written back; a view
|
|
300
|
-
* enters history as the policy says; or a view
|
|
301
|
-
* (`revert`), which replaces.
|
|
325
|
+
* query did not move or is withheld. Query and view move as one
|
|
326
|
+
* transition, so one write enters history once. The cause says whose
|
|
327
|
+
* authority: the location's (`adopt`), which is never written back; a view
|
|
328
|
+
* opened (`view`), which enters history as the policy says; or a view
|
|
329
|
+
* reverted to or left (`revert`), which replaces. Given the narrowing
|
|
330
|
+
* clauses its link was refused for, the query is withheld rather than run;
|
|
331
|
+
* given none, nothing is withheld; left out, what is withheld stands while
|
|
332
|
+
* the slice stays where it is.
|
|
302
333
|
*/
|
|
303
|
-
readonly adopt: (query: Query, cause: AdoptionCause, view: string | null) => string | null;
|
|
334
|
+
readonly adopt: (query: Query, cause: AdoptionCause, view: string | null, withheld?: readonly QueryIssue[]) => string | null;
|
|
304
335
|
/**
|
|
305
336
|
* The saved view open beside the query — the location's `view`, or the
|
|
306
337
|
* snapshot's — or null: read with the query the provider stands on when
|
|
@@ -317,9 +348,18 @@ export type ProviderHost<TFields extends readonly SchemaFieldDefinition[] = read
|
|
|
317
348
|
/**
|
|
318
349
|
* A query spelled as the location would carry it, the location's other
|
|
319
350
|
* parameters preserved — the destination a link or a form leads to. Null
|
|
320
|
-
* without a location: there is nowhere for a destination to lead.
|
|
351
|
+
* without a location: there is nowhere for a destination to lead. The
|
|
352
|
+
* refused clauses the query is withheld for are carried as the location
|
|
353
|
+
* spells them, so a link drawn over a refused link widens nothing.
|
|
321
354
|
*/
|
|
322
355
|
readonly spellQuery: (query: Query) => URLSearchParams | null;
|
|
356
|
+
/**
|
|
357
|
+
* Remove one refused parameter of the location — a filter or the search
|
|
358
|
+
* a followed link carried — as the link to the URL without it does: the
|
|
359
|
+
* location moves, entering history as a filter or the search does, and
|
|
360
|
+
* the query it then carries is read. Nothing happens without a location.
|
|
361
|
+
*/
|
|
362
|
+
readonly clearRefused: (parameter: string) => void;
|
|
323
363
|
/**
|
|
324
364
|
* The read side of the location port the provider was given, or null:
|
|
325
365
|
* what a control spelling destinations watches, since the location's
|
|
@@ -334,24 +374,24 @@ export type ProviderHost<TFields extends readonly SchemaFieldDefinition[] = read
|
|
|
334
374
|
* Always "applies" on a monomorphic collection, and on a field the schema
|
|
335
375
|
* does not scope.
|
|
336
376
|
*
|
|
337
|
-
*
|
|
338
|
-
*
|
|
377
|
+
* The body cell reads this: a not-applicable cell is the third state
|
|
378
|
+
* beside value and empty.
|
|
339
379
|
*/
|
|
340
|
-
readonly
|
|
380
|
+
readonly readApplicability: (field: string, row: TRow) => Applicability;
|
|
341
381
|
/**
|
|
342
382
|
* The type remembered for a selected identity, or null when the provider
|
|
343
383
|
* never modelled it while it was selected — a selection restored by a host
|
|
344
384
|
* over rows this provider has not seen. A remembered type is let go when
|
|
345
385
|
* the rows are next replaced after its identity leaves the selection, so
|
|
346
386
|
* one reselected before then answers as before. It answers from the row on
|
|
347
|
-
* display whenever there is one, so it never contradicts `
|
|
387
|
+
* display whenever there is one, so it never contradicts `readApplicability`,
|
|
348
388
|
* and it changes only with a `rows` or a `selection` publication: watching
|
|
349
389
|
* those is watching this.
|
|
350
390
|
*
|
|
351
|
-
*
|
|
352
|
-
*
|
|
391
|
+
* `useDataViewsAction` reads this to decide whether an action applies to
|
|
392
|
+
* records selected on an earlier page.
|
|
353
393
|
*/
|
|
354
|
-
readonly
|
|
394
|
+
readonly readRecordType: (id: string) => string | null;
|
|
355
395
|
};
|
|
356
396
|
/** Configuration of one collection's record typing. */
|
|
357
397
|
export type RecordTypingConfig<TFields extends readonly SchemaFieldDefinition[], TRow extends object = RowRecord> = {
|
|
@@ -365,11 +405,11 @@ export type RecordTypingConfig<TFields extends readonly SchemaFieldDefinition[],
|
|
|
365
405
|
/** One collection's record typing: what the provider answers about types. */
|
|
366
406
|
export type RecordTyping<TRow extends object = RowRecord> = {
|
|
367
407
|
/** Why a model cannot be displayed, or null when every row is typed. */
|
|
368
|
-
readonly
|
|
408
|
+
readonly readRejection: (model: RowModel<TRow>) => string | null;
|
|
369
409
|
/** Whether a schema field applies to a row. */
|
|
370
|
-
readonly
|
|
410
|
+
readonly readApplicability: (field: string, row: TRow) => Applicability;
|
|
371
411
|
/** The remembered type of a selected identity. */
|
|
372
|
-
readonly
|
|
412
|
+
readonly readRecordType: (id: string) => string | null;
|
|
373
413
|
/** Take the type of every selected row of a model about to be replaced. */
|
|
374
414
|
readonly remember: (model: RowModel<TRow>) => void;
|
|
375
415
|
/** Drop the memory: the generation moved, so nothing displayed survives. */
|
|
@@ -417,6 +457,11 @@ export type StartingPoint = {
|
|
|
417
457
|
* when it carries one, the snapshot's otherwise, none without either.
|
|
418
458
|
*/
|
|
419
459
|
readonly issues: readonly QueryIssue[];
|
|
460
|
+
/**
|
|
461
|
+
* The location's refused clauses that would have narrowed its query, which
|
|
462
|
+
* withhold it; none when the provider does not stand on the location.
|
|
463
|
+
*/
|
|
464
|
+
readonly withheld: readonly QueryIssue[];
|
|
420
465
|
/** The saved view open beside the query the provider stands on. */
|
|
421
466
|
readonly view: string | null;
|
|
422
467
|
/** The snapshot's arrangement, with the view it was drawn under, if any. */
|
|
@@ -450,7 +495,7 @@ export type PortsObservationConfig = {
|
|
|
450
495
|
/** The ports, in the order they start; they stop in reverse. */
|
|
451
496
|
readonly ports: readonly PortRun[];
|
|
452
497
|
/** Runs once the first observer has started every port. */
|
|
453
|
-
readonly
|
|
498
|
+
readonly runAfterStart: () => void;
|
|
454
499
|
};
|
|
455
500
|
/** Configuration of the provider's query path. */
|
|
456
501
|
export type QueryCommandsConfig<TRow extends object = RowRecord> = {
|
|
@@ -470,9 +515,13 @@ export type QueryCommandsConfig<TRow extends object = RowRecord> = {
|
|
|
470
515
|
* The provider's query path: the refusal check, the command boundary, and
|
|
471
516
|
* the two moves the ports make.
|
|
472
517
|
*/
|
|
473
|
-
export type QueryCommands = Pick<ProviderHost, "
|
|
474
|
-
/**
|
|
475
|
-
|
|
518
|
+
export type QueryCommands = Pick<ProviderHost, "listRefusals" | "adopt" | "refresh"> & {
|
|
519
|
+
/**
|
|
520
|
+
* Apply one command at the boundary; the refusals it incurs, empty when
|
|
521
|
+
* applied. Given `history`, its transition enters history that way rather
|
|
522
|
+
* than as the policy says.
|
|
523
|
+
*/
|
|
524
|
+
readonly applyCommand: (command: QueryCommand, history?: HistoryMode) => readonly SourceRefusal[];
|
|
476
525
|
};
|
|
477
526
|
/**
|
|
478
527
|
* The location sync: the loop and the issues it publishes. On start the
|
|
@@ -487,6 +536,12 @@ export type QueryCommands = Pick<ProviderHost, "refusals" | "adopt" | "refresh">
|
|
|
487
536
|
export type LocationSync = PortRun & {
|
|
488
537
|
/** The owned parameters the location carries that were refused. */
|
|
489
538
|
readonly issues: ReadonlyChannel<readonly QueryIssue[]>;
|
|
539
|
+
/**
|
|
540
|
+
* Remove one refused parameter from the location, entering history as
|
|
541
|
+
* `history` says, and read the location that leaves: the move a link to
|
|
542
|
+
* the URL without that parameter makes.
|
|
543
|
+
*/
|
|
544
|
+
readonly clearRefused: (parameter: string, history: HistoryMode) => void;
|
|
490
545
|
};
|
|
491
546
|
/** Configuration of the provider's action runner. */
|
|
492
547
|
export type ActionRunnerConfig<TRow extends object = RowRecord> = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/provider/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;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AAQ,CAAC,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;CAC1E,CAAC;AAEF,qDAAqD;AACrD,MAAM,MAAM,kBAAkB,CAAC,IAAI,SAAS,MAAM,GAAG,SAAS,IAAI;IAChE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,kBAAkB,CAAC;IAC1C,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;CAC/B,CAAC;AAEF,uDAAuD;AACvD,MAAM,MAAM,sBAAsB,CAAC,IAAI,SAAS,MAAM,GAAG,SAAS,IAAI;IACpE,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC7C,2DAA2D;IAC3D,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;IACvC,8DAA8D;IAC9D,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACjD,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAC9B,CAAC"}
|
|
@@ -2,10 +2,15 @@ import type { QueryCommand, QueryCommandResult, ResultWindow, Slice } from "./ty
|
|
|
2
2
|
/**
|
|
3
3
|
* Apply one addressed query command as a coherent transition: a changed
|
|
4
4
|
* query resets the window to its first page, window-only commands leave the
|
|
5
|
-
* query untouched, and a semantically unchanged edit changes nothing
|
|
5
|
+
* query untouched, and a semantically unchanged edit changes nothing: a
|
|
6
|
+
* conjunct added where the slice already holds it among them.
|
|
6
7
|
* Commands that violate the bounded grammar (empty fields, wrong arities,
|
|
7
8
|
* non-finite numbers, non-positive or fractional window values, an empty
|
|
8
|
-
* cursor token) are rejected with the input state unchanged
|
|
9
|
+
* cursor token) are rejected with the input state unchanged, and so is one
|
|
10
|
+
* naming a conjunct the slice does not hold: a place that is no whole
|
|
11
|
+
* number, one past the conjuncts at its address, or a conjunct an edit
|
|
12
|
+
* names twice. A clear naming no part of the query, or one it has not, is
|
|
13
|
+
* rejected too.
|
|
9
14
|
*
|
|
10
15
|
* @experimental Pre-release: the whole surface is still settling, and this
|
|
11
16
|
* name may change or move before the first release.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyQueryCommand.d.ts","sourceRoot":"","sources":["../../../../src/lib/query/applyQueryCommand.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"applyQueryCommand.d.ts","sourceRoot":"","sources":["../../../../src/lib/query/applyQueryCommand.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAIV,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,KAAK,EACN,MAAM,YAAY,CAAC;AAwIpB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,YAAY,GACpB,kBAAkB,CAwFpB"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Slice } from "./types.js";
|
|
2
2
|
/**
|
|
3
|
-
* Normalize a slice to its canonical form: set operands are sets,
|
|
4
|
-
*
|
|
3
|
+
* Normalize a slice to its canonical form: set operands are sets, every
|
|
4
|
+
* conjunct is kept — two on one address both restrict — ordered by
|
|
5
|
+
* address and then by operands, and only identical conjuncts collapse,
|
|
6
|
+
* since `A AND A` is `A`; sort and group terms keep their order
|
|
5
7
|
* with a repeated sort field collapsed to its first occurrence, and an empty
|
|
6
8
|
* search is no search. Idempotent:
|
|
7
9
|
* `canonicalizeSlice(canonicalizeSlice(x))` equals `canonicalizeSlice(x)`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canonicalizeSlice.d.ts","sourceRoot":"","sources":["../../../../src/lib/query/canonicalizeSlice.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAA0C,KAAK,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"canonicalizeSlice.d.ts","sourceRoot":"","sources":["../../../../src/lib/query/canonicalizeSlice.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAA0C,KAAK,EAAE,MAAM,YAAY,CAAC;AA4BhF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAe7D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Predicate } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* The total order of conjuncts in a canonical slice: by address — the
|
|
4
|
+
* field, then the operator — and then by operands, compared from the left,
|
|
5
|
+
* a shorter list first where one is the start of the other. Zero only for
|
|
6
|
+
* conjuncts the query cannot tell apart once their operands are
|
|
7
|
+
* canonical, which is how a canonical slice collapses `A AND A` to `A`.
|
|
8
|
+
* Pure.
|
|
9
|
+
*
|
|
10
|
+
* @experimental Pre-release: the whole surface is still settling, and this
|
|
11
|
+
* name may change or move before the first release.
|
|
12
|
+
*/
|
|
13
|
+
export default function compareConjuncts(a: Predicate, b: Predicate): number;
|
|
14
|
+
//# sourceMappingURL=compareConjuncts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareConjuncts.d.ts","sourceRoot":"","sources":["../../../../src/lib/query/compareConjuncts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAoB,MAAM,YAAY,CAAC;AAqB9D;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,MAAM,CAkB3E"}
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
import type { PredicateOperator, ResultWindow, Slice } from "./types.js";
|
|
6
6
|
/**
|
|
7
7
|
* How many operands each operator carries: `isAny` and `isNone` a non-empty
|
|
8
|
-
* set,
|
|
8
|
+
* set, every other operator exactly one.
|
|
9
9
|
* An operator carrying `many` is a set operator: its operands are compared,
|
|
10
10
|
* canonicalized and spelled as a set.
|
|
11
11
|
*/
|
|
12
|
-
export declare const OPERATOR_ARITY: Readonly<Record<PredicateOperator, "
|
|
12
|
+
export declare const OPERATOR_ARITY: Readonly<Record<PredicateOperator, "one" | "many">>;
|
|
13
13
|
/**
|
|
14
14
|
* The window a collection starts on when nothing else says otherwise: the first
|
|
15
15
|
* page of fifty, from the start of the result, with nothing collapsed. One
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/lib/query/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEzE;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CACnC,MAAM,CAAC,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/lib/query/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEzE;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CACnC,MAAM,CAAC,iBAAiB,EAAE,KAAK,GAAG,MAAM,CAAC,CAazC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,EAAE,YAK3B,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,EAAE,KAKxB,CAAC"}
|
|
@@ -8,8 +8,10 @@ export { default as canonicalizeSlice } from "./canonicalizeSlice.js";
|
|
|
8
8
|
export { default as collapseSortTerms } from "./collapseSortTerms.js";
|
|
9
9
|
export { DEFAULT_WINDOW, EMPTY_SLICE, OPERATOR_ARITY } from "./constants.js";
|
|
10
10
|
export { default as cycleSortTerm } from "./cycleSortTerm.js";
|
|
11
|
+
export { default as listConjuncts } from "./listConjuncts.js";
|
|
11
12
|
export { default as placeSortTerm } from "./placeSortTerm.js";
|
|
12
13
|
export { default as rankOperand } from "./rankOperand.js";
|
|
14
|
+
export { default as readCondition } from "./readCondition.js";
|
|
13
15
|
export { default as rejectOperandArity } from "./rejectOperandArity.js";
|
|
14
16
|
export { default as rejectWindow } from "./rejectWindow.js";
|
|
15
17
|
export { default as spellQueryKey } from "./spellQueryKey.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/query/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC9D,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AAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC9D,mBAAmB,YAAY,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Predicate, PredicateOperator, Slice } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* The conjuncts a slice holds at one address, in canonical order: what a
|
|
4
|
+
* conjunct's `nth` counts through. Each is the canonical copy, so its set
|
|
5
|
+
* operands are an ordered set. Pure.
|
|
6
|
+
*
|
|
7
|
+
* @experimental Pre-release: the whole surface is still settling, and this
|
|
8
|
+
* name may change or move before the first release.
|
|
9
|
+
*/
|
|
10
|
+
export default function listConjuncts(slice: Slice, field: string, operator: PredicateOperator): readonly Predicate[];
|
|
11
|
+
//# sourceMappingURL=listConjuncts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listConjuncts.d.ts","sourceRoot":"","sources":["../../../../src/lib/query/listConjuncts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEtE;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,iBAAiB,GAC1B,SAAS,SAAS,EAAE,CAItB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Predicate, PredicateCondition } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* The condition a predicate asserts about a record, read from its operator:
|
|
4
|
+
* `isAny` and `is` include; `isNone`, `isNot` and `notContains` exclude;
|
|
5
|
+
* `contains`, `startsWith` and `endsWith` match; `gte` and `lte` bound a
|
|
6
|
+
* range. `isSet` reads its operand: `false` excludes, and `true`, or no
|
|
7
|
+
* operand at all, asserts presence. An operator outside the grammar
|
|
8
|
+
* throws. Pure.
|
|
9
|
+
*
|
|
10
|
+
* @experimental Pre-release: the whole surface is still settling, and this
|
|
11
|
+
* name may change or move before the first release.
|
|
12
|
+
*/
|
|
13
|
+
export default function readCondition(predicate: Predicate): PredicateCondition;
|
|
14
|
+
//# sourceMappingURL=readCondition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readCondition.d.ts","sourceRoot":"","sources":["../../../../src/lib/query/readCondition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,SAAS,EAAE,SAAS,GACnB,kBAAkB,CAyBpB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { PredicateOperator } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* Why a count of operands is not one the operator carries, or null when it
|
|
4
|
-
* is: `isAny` and `isNone` need at least one,
|
|
5
|
-
*
|
|
4
|
+
* is: `isAny` and `isNone` need at least one, every other operator exactly
|
|
5
|
+
* one.
|
|
6
6
|
*/
|
|
7
7
|
export default function rejectOperandArity(operator: PredicateOperator, count: number): string | null;
|
|
8
8
|
//# sourceMappingURL=rejectOperandArity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rejectOperandArity.d.ts","sourceRoot":"","sources":["../../../../src/lib/query/rejectOperandArity.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,EAAE,MAAM,GACZ,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"rejectOperandArity.d.ts","sourceRoot":"","sources":["../../../../src/lib/query/rejectOperandArity.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,EAAE,MAAM,GACZ,MAAM,GAAG,IAAI,CAWf"}
|
|
@@ -9,15 +9,17 @@
|
|
|
9
9
|
* @experimental Pre-release: the whole surface is still settling, and this
|
|
10
10
|
* name may change or move before the first release.
|
|
11
11
|
*/
|
|
12
|
-
export type PredicateOperator = "isAny" | "isNone" | "gte" | "lte" | "isSet" | "contains" | "startsWith";
|
|
12
|
+
export type PredicateOperator = "isAny" | "isNone" | "gte" | "lte" | "isSet" | "is" | "isNot" | "contains" | "notContains" | "startsWith" | "endsWith";
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* What a predicate's operator asserts about a record: that its value is one
|
|
15
|
+
* of the operands (`inclusion`), that the test is negated (`exclusion`),
|
|
16
|
+
* that its value holds the operand as text (`match`), that it lies at or
|
|
17
|
+
* beyond a bound (`range`), or that the field holds a value (`presence`).
|
|
16
18
|
*
|
|
17
19
|
* @experimental Pre-release: the whole surface is still settling, and this
|
|
18
20
|
* name may change or move before the first release.
|
|
19
21
|
*/
|
|
20
|
-
export type
|
|
22
|
+
export type PredicateCondition = "inclusion" | "exclusion" | "match" | "range" | "presence";
|
|
21
23
|
/**
|
|
22
24
|
* A semantic operand value. Field metadata owns coercion; core never guesses.
|
|
23
25
|
*
|
|
@@ -26,10 +28,12 @@ export type SetOperator = Extract<PredicateOperator, "isAny" | "isNone">;
|
|
|
26
28
|
*/
|
|
27
29
|
export type PredicateOperand = string | number | boolean | null;
|
|
28
30
|
/**
|
|
29
|
-
* One filter clause
|
|
30
|
-
*
|
|
31
|
-
* `
|
|
32
|
-
*
|
|
31
|
+
* One filter clause — a conjunct of the slice's filter — addressed by its
|
|
32
|
+
* field and operator; an address may hold several, and each restricts the
|
|
33
|
+
* result. `isAny` and `isNone` operands are a non-empty set; `isSet` carries
|
|
34
|
+
* one boolean, `true` for a field that holds a value and `false` for one
|
|
35
|
+
* that holds none; every other operator carries exactly one operand.
|
|
36
|
+
* Numbers must be finite.
|
|
33
37
|
*
|
|
34
38
|
* @experimental Pre-release: the whole surface is still settling, and this
|
|
35
39
|
* name may change or move before the first release.
|
|
@@ -39,6 +43,43 @@ export type Predicate = {
|
|
|
39
43
|
readonly operator: PredicateOperator;
|
|
40
44
|
readonly operands: readonly PredicateOperand[];
|
|
41
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* One conjunct of a slice's filter, by address and place.
|
|
48
|
+
*
|
|
49
|
+
* @experimental Pre-release: the whole surface is still settling, and this
|
|
50
|
+
* name may change or move before the first release.
|
|
51
|
+
*/
|
|
52
|
+
export type PredicateRef = {
|
|
53
|
+
readonly field: string;
|
|
54
|
+
readonly operator: PredicateOperator;
|
|
55
|
+
/** Zero-based among the conjuncts at this address, in canonical order. */
|
|
56
|
+
readonly nth: number;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Conjuncts to remove and conjuncts to add, as one edit: each ref names a
|
|
60
|
+
* conjunct as the slice stands before the edit, and each added conjunct
|
|
61
|
+
* stands beside whatever remains.
|
|
62
|
+
*
|
|
63
|
+
* @experimental Pre-release: the whole surface is still settling, and this
|
|
64
|
+
* name may change or move before the first release.
|
|
65
|
+
*/
|
|
66
|
+
export type PredicateEdit = {
|
|
67
|
+
/**
|
|
68
|
+
* The conjuncts removed, each named as the slice stands before the
|
|
69
|
+
* edit, so removing one never moves the place of another.
|
|
70
|
+
*/
|
|
71
|
+
readonly remove: readonly PredicateRef[];
|
|
72
|
+
/** The conjuncts added, beside whatever already stands. */
|
|
73
|
+
readonly add: readonly Predicate[];
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* A part of the query `clear` empties: `filter`, every conjunct of the
|
|
77
|
+
* filter, or `search`, the search text.
|
|
78
|
+
*
|
|
79
|
+
* @experimental Pre-release: the whole surface is still settling, and this
|
|
80
|
+
* name may change or move before the first release.
|
|
81
|
+
*/
|
|
82
|
+
export type QueryClearPath = "filter" | "search";
|
|
42
83
|
/**
|
|
43
84
|
* Sort direction of a single ordered term.
|
|
44
85
|
*
|
|
@@ -85,6 +126,12 @@ export type GroupPath = readonly PredicateOperand[];
|
|
|
85
126
|
* name may change or move before the first release.
|
|
86
127
|
*/
|
|
87
128
|
export type Slice = {
|
|
129
|
+
/**
|
|
130
|
+
* The conjuncts every row must match, all of them: two on one address
|
|
131
|
+
* both restrict, so `tags` any of `a` and `tags` any of `b` asks for rows
|
|
132
|
+
* holding both. Their order carries no meaning; the canonical form sorts
|
|
133
|
+
* them.
|
|
134
|
+
*/
|
|
88
135
|
readonly filter: readonly Predicate[];
|
|
89
136
|
readonly search: string | null;
|
|
90
137
|
readonly sort: readonly SortTerm[];
|
|
@@ -137,25 +184,46 @@ export type Query = {
|
|
|
137
184
|
*/
|
|
138
185
|
export type WindowNavigation = Partial<Omit<ResultWindow, "collapsed">>;
|
|
139
186
|
/**
|
|
140
|
-
* An addressed query command
|
|
141
|
-
*
|
|
187
|
+
* An addressed query command: a predicate command names one conjunct by
|
|
188
|
+
* its `nth`, 0 when left out, `addPredicate` adds one beside those at its
|
|
189
|
+
* address, and `clear` empties whole parts.
|
|
190
|
+
*
|
|
191
|
+
* @experimental Pre-release: the whole surface is still settling, and this
|
|
192
|
+
* name may change or move before the first release.
|
|
142
193
|
*/
|
|
143
194
|
export type QueryCommand = {
|
|
144
195
|
readonly kind: "setPredicate";
|
|
145
196
|
readonly predicate: Predicate;
|
|
146
197
|
/**
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
* query never stands on both, or on neither.
|
|
198
|
+
* The conjunct at the predicate's address it replaces, 0 when left
|
|
199
|
+
* out. Where the address holds none, the 0th is added.
|
|
150
200
|
*/
|
|
151
|
-
readonly
|
|
201
|
+
readonly nth?: number | undefined;
|
|
202
|
+
} | {
|
|
203
|
+
readonly kind: "addPredicate";
|
|
204
|
+
/**
|
|
205
|
+
* The conjunct added beside any already at its address. One the
|
|
206
|
+
* slice already holds changes nothing, since A AND A is A.
|
|
207
|
+
*/
|
|
208
|
+
readonly predicate: Predicate;
|
|
152
209
|
} | {
|
|
153
210
|
readonly kind: "removePredicate";
|
|
154
211
|
readonly field: string;
|
|
155
212
|
readonly operator: PredicateOperator;
|
|
156
|
-
|
|
213
|
+
/** The conjunct at the address it removes, 0 when left out. */
|
|
214
|
+
readonly nth?: number | undefined;
|
|
215
|
+
} | ({
|
|
216
|
+
readonly kind: "editPredicates";
|
|
217
|
+
} & PredicateEdit) | {
|
|
157
218
|
readonly kind: "setSearch";
|
|
158
219
|
readonly search: string;
|
|
220
|
+
} | {
|
|
221
|
+
readonly kind: "clear";
|
|
222
|
+
/**
|
|
223
|
+
* The parts emptied, one or more; repeated or reordered, they name
|
|
224
|
+
* the same clear.
|
|
225
|
+
*/
|
|
226
|
+
readonly paths: readonly [QueryClearPath, ...QueryClearPath[]];
|
|
159
227
|
} | {
|
|
160
228
|
readonly kind: "setSort";
|
|
161
229
|
readonly sort: readonly SortTerm[];
|
|
@@ -168,7 +236,12 @@ export type QueryCommand = {
|
|
|
168
236
|
} | ({
|
|
169
237
|
readonly kind: "navigateWindow";
|
|
170
238
|
} & WindowNavigation);
|
|
171
|
-
/**
|
|
239
|
+
/**
|
|
240
|
+
* Outcome of applying a query command: accepted change or explicit rejection.
|
|
241
|
+
*
|
|
242
|
+
* @experimental Pre-release: the whole surface is still settling, and this
|
|
243
|
+
* name may change or move before the first release.
|
|
244
|
+
*/
|
|
172
245
|
export type QueryCommandResult = (Query & {
|
|
173
246
|
readonly status: "accepted";
|
|
174
247
|
/** True when the semantic query changed (dirty comparisons, history). */
|