@mistriwork/engine 0.0.0-stage → 1.0.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +17 -2
- package/dist/adapters/adapter.d.ts +693 -0
- package/dist/adapters/adapter.js +444 -0
- package/dist/adapters/cache/cacheStore.d.ts +75 -0
- package/dist/adapters/cache/cacheStore.js +160 -0
- package/dist/adapters/cache/resp.d.ts +52 -0
- package/dist/adapters/cache/resp.js +237 -0
- package/dist/adapters/commands/canonicalJson.d.ts +19 -0
- package/dist/adapters/commands/canonicalJson.js +154 -0
- package/dist/adapters/connect.d.ts +29 -0
- package/dist/adapters/connect.js +40 -0
- package/dist/adapters/connectionBudget.d.ts +101 -0
- package/dist/adapters/connectionBudget.js +128 -0
- package/dist/adapters/dbLatency.d.ts +35 -0
- package/dist/adapters/dbLatency.js +79 -0
- package/dist/adapters/epochCache.d.ts +50 -0
- package/dist/adapters/epochCache.js +85 -0
- package/dist/adapters/http/egress.d.ts +48 -0
- package/dist/adapters/http/egress.js +175 -0
- package/dist/adapters/http/httpAdapter.d.ts +71 -0
- package/dist/adapters/http/httpAdapter.js +512 -0
- package/dist/adapters/http/httpDescription.d.ts +32 -0
- package/dist/adapters/http/httpDescription.js +246 -0
- package/dist/adapters/http/openapi.d.ts +98 -0
- package/dist/adapters/http/openapi.js +487 -0
- package/dist/adapters/layoutRefusal.d.ts +24 -0
- package/dist/adapters/layoutRefusal.js +35 -0
- package/dist/adapters/net/networkPolicy.d.ts +44 -0
- package/dist/adapters/net/networkPolicy.js +123 -0
- package/dist/adapters/net/untrustedDatabase.d.ts +18 -0
- package/dist/adapters/net/untrustedDatabase.js +120 -0
- package/dist/adapters/poolAdmission.d.ts +43 -0
- package/dist/adapters/poolAdmission.js +184 -0
- package/dist/adapters/poolMetrics.d.ts +121 -0
- package/dist/adapters/poolMetrics.js +185 -0
- package/dist/adapters/postgres.d.ts +436 -0
- package/dist/adapters/postgres.js +1890 -0
- package/dist/adapters/postgresCatalog.d.ts +96 -0
- package/dist/adapters/postgresCatalog.js +387 -0
- package/dist/adapters/postgresCatalogDigest.d.ts +30 -0
- package/dist/adapters/postgresCatalogDigest.js +87 -0
- package/dist/adapters/postgresCatalogRows.d.ts +62 -0
- package/dist/adapters/postgresCatalogRows.js +37 -0
- package/dist/adapters/postgresDates.d.ts +1 -0
- package/dist/adapters/postgresDates.js +39 -0
- package/dist/adapters/postgresMaintenance.d.ts +33 -0
- package/dist/adapters/postgresMaintenance.js +179 -0
- package/dist/adapters/postgresPool.d.ts +255 -0
- package/dist/adapters/postgresPool.js +838 -0
- package/dist/adapters/postgresPooler.d.ts +28 -0
- package/dist/adapters/postgresPooler.js +267 -0
- package/dist/adapters/postgresReadCatalog.d.ts +31 -0
- package/dist/adapters/postgresReadCatalog.js +226 -0
- package/dist/adapters/postgresReadSnapshot.d.ts +46 -0
- package/dist/adapters/postgresReadSnapshot.js +133 -0
- package/dist/adapters/postgresSchemaEpoch.d.ts +24 -0
- package/dist/adapters/postgresSchemaEpoch.js +149 -0
- package/dist/adapters/postgresTransactionHandle.d.ts +173 -0
- package/dist/adapters/postgresTransactionHandle.js +524 -0
- package/dist/adapters/postgresValues.d.ts +30 -0
- package/dist/adapters/postgresValues.js +75 -0
- package/dist/adapters/replicas.d.ts +70 -0
- package/dist/adapters/replicas.js +208 -0
- package/dist/adapters/reservedSql.d.ts +38 -0
- package/dist/adapters/reservedSql.js +264 -0
- package/dist/adapters/rolePrivileges.d.ts +17 -0
- package/dist/adapters/rolePrivileges.js +22 -0
- package/dist/adapters/scoped/keyRows.d.ts +65 -0
- package/dist/adapters/scoped/keyRows.js +173 -0
- package/dist/adapters/scoped/postgresScopeCatalog.d.ts +16 -0
- package/dist/adapters/scoped/postgresScopeCatalog.js +117 -0
- package/dist/adapters/scoped/scopedCommandOperations.d.ts +5 -0
- package/dist/adapters/scoped/scopedCommandOperations.js +48 -0
- package/dist/adapters/scoped/scopedReads.d.ts +20 -0
- package/dist/adapters/scoped/scopedReads.js +174 -0
- package/dist/adapters/scoped/scopedTransaction.d.ts +89 -0
- package/dist/adapters/scoped/scopedTransaction.js +303 -0
- package/dist/adapters/scoped/sqliteScopeCatalog.d.ts +16 -0
- package/dist/adapters/scoped/sqliteScopeCatalog.js +241 -0
- package/dist/adapters/scoped/updateGuard.d.ts +3 -0
- package/dist/adapters/scoped/updateGuard.js +40 -0
- package/dist/adapters/serverSettings.d.ts +45 -0
- package/dist/adapters/serverSettings.js +46 -0
- package/dist/adapters/sqlite.d.ts +262 -0
- package/dist/adapters/sqlite.js +1434 -0
- package/dist/adapters/sqliteCostlyReads.d.ts +33 -0
- package/dist/adapters/sqliteCostlyReads.js +49 -0
- package/dist/adapters/sqliteDecimals.d.ts +22 -0
- package/dist/adapters/sqliteDecimals.js +57 -0
- package/dist/adapters/sqliteHandles.d.ts +43 -0
- package/dist/adapters/sqliteHandles.js +143 -0
- package/dist/adapters/sqliteStatementProcess.d.ts +29 -0
- package/dist/adapters/sqliteStatementProcess.js +131 -0
- package/dist/adapters/statementControl.d.ts +34 -0
- package/dist/adapters/statementControl.js +90 -0
- package/dist/adapters/storeHost.d.ts +130 -0
- package/dist/adapters/storeHost.js +13 -0
- package/dist/adapters/telemetry/drivers.d.ts +21 -0
- package/dist/adapters/telemetry/drivers.js +321 -0
- package/dist/adapters/telemetry/metrics.d.ts +63 -0
- package/dist/adapters/telemetry/metrics.js +122 -0
- package/dist/adapters/telemetry/otlp.d.ts +12 -0
- package/dist/adapters/telemetry/otlp.js +320 -0
- package/dist/adapters/telemetry/otlpEncode.d.ts +48 -0
- package/dist/adapters/telemetry/otlpEncode.js +366 -0
- package/dist/adapters/telemetry/otlpEnv.d.ts +1 -0
- package/dist/adapters/telemetry/otlpEnv.js +12 -0
- package/dist/adapters/telemetry/serverTiming.d.ts +83 -0
- package/dist/adapters/telemetry/serverTiming.js +503 -0
- package/dist/adapters/telemetry/start.d.ts +10 -0
- package/dist/adapters/telemetry/start.js +25 -0
- package/dist/adapters/telemetry/statement.d.ts +16 -0
- package/dist/adapters/telemetry/statement.js +134 -0
- package/dist/adapters/telemetry/trace.d.ts +127 -0
- package/dist/adapters/telemetry/trace.js +295 -0
- package/dist/adapters/writeAhead.d.ts +27 -0
- package/dist/adapters/writeAhead.js +46 -0
- package/dist/adapters/writeAttribution.d.ts +18 -0
- package/dist/adapters/writeAttribution.js +23 -0
- package/dist/adapters/writeCapture.d.ts +73 -0
- package/dist/adapters/writeCapture.js +20 -0
- package/dist/adapters/writeLanes.d.ts +94 -0
- package/dist/adapters/writeLanes.js +232 -0
- package/dist/engine.d.ts +15 -0
- package/dist/engine.js +13 -0
- package/dist/server/auth/credentials.d.ts +61 -0
- package/dist/server/auth/credentials.js +260 -0
- package/dist/server/cacheService.d.ts +50 -0
- package/dist/server/cacheService.js +110 -0
- package/dist/server/cli/args.d.ts +176 -0
- package/dist/server/cli/args.js +342 -0
- package/dist/server/cli/bin.d.ts +5 -0
- package/dist/server/cli/bin.js +66 -0
- package/dist/server/cli/browser.d.ts +15 -0
- package/dist/server/cli/browser.js +37 -0
- package/dist/server/cli/config.d.ts +50 -0
- package/dist/server/cli/config.js +206 -0
- package/dist/server/cli/startup.d.ts +36 -0
- package/dist/server/cli/startup.js +128 -0
- package/dist/server/cli/startupOptions.d.ts +63 -0
- package/dist/server/cli/startupOptions.js +143 -0
- package/dist/server/cli/subcommand.d.ts +28 -0
- package/dist/server/cli/subcommand.js +32 -0
- package/dist/server/cli/usage.d.ts +13 -0
- package/dist/server/cli/usage.js +31 -0
- package/dist/server/clientHttp.d.ts +184 -0
- package/dist/server/clientHttp.js +700 -0
- package/dist/server/clientSurface.d.ts +128 -0
- package/dist/server/clientSurface.js +182 -0
- package/dist/server/columnGrants.d.ts +103 -0
- package/dist/server/columnGrants.js +730 -0
- package/dist/server/compileCache.d.ts +1 -0
- package/dist/server/compileCache.js +30 -0
- package/dist/server/config/locations.d.ts +1 -0
- package/dist/server/config/locations.js +15 -0
- package/dist/server/configPaths.d.ts +7 -0
- package/dist/server/configPaths.js +34 -0
- package/dist/server/configSections.d.ts +64 -0
- package/dist/server/configSections.js +72 -0
- package/dist/server/connectionRedaction.d.ts +30 -0
- package/dist/server/connectionRedaction.js +77 -0
- package/dist/server/connections.d.ts +353 -0
- package/dist/server/connections.js +978 -0
- package/dist/server/constraints.d.ts +82 -0
- package/dist/server/constraints.js +169 -0
- package/dist/server/demo.d.ts +9 -0
- package/dist/server/demo.js +554 -0
- package/dist/server/devclient.d.ts +108 -0
- package/dist/server/devclient.js +361 -0
- package/dist/server/evidence.d.ts +55 -0
- package/dist/server/evidence.js +323 -0
- package/dist/server/hiddenColumns.d.ts +32 -0
- package/dist/server/hiddenColumns.js +238 -0
- package/dist/server/http/baselineHeaders.d.ts +24 -0
- package/dist/server/http/baselineHeaders.js +12 -0
- package/dist/server/http/captured.d.ts +35 -0
- package/dist/server/http/captured.js +73 -0
- package/dist/server/http/clock.d.ts +1 -0
- package/dist/server/http/clock.js +14 -0
- package/dist/server/http/connectionSource.d.ts +4 -0
- package/dist/server/http/connectionSource.js +48 -0
- package/dist/server/http/context.d.ts +189 -0
- package/dist/server/http/context.js +11 -0
- package/dist/server/http/crawlerText.d.ts +15 -0
- package/dist/server/http/crawlerText.js +32 -0
- package/dist/server/http/dataRoutes.d.ts +88 -0
- package/dist/server/http/dataRoutes.js +137 -0
- package/dist/server/http/door.d.ts +57 -0
- package/dist/server/http/door.js +39 -0
- package/dist/server/http/exportRoute.d.ts +15 -0
- package/dist/server/http/exportRoute.js +320 -0
- package/dist/server/http/firstPaint.d.ts +108 -0
- package/dist/server/http/firstPaint.js +262 -0
- package/dist/server/http/httpOperationRoutes.d.ts +11 -0
- package/dist/server/http/httpOperationRoutes.js +50 -0
- package/dist/server/http/pageReads.d.ts +20 -0
- package/dist/server/http/pageReads.js +205 -0
- package/dist/server/http/pageRoutes.d.ts +39 -0
- package/dist/server/http/pageRoutes.js +291 -0
- package/dist/server/http/probes.d.ts +22 -0
- package/dist/server/http/probes.js +27 -0
- package/dist/server/http/rateLimit.d.ts +131 -0
- package/dist/server/http/rateLimit.js +351 -0
- package/dist/server/http/readRoutes.d.ts +9 -0
- package/dist/server/http/readRoutes.js +131 -0
- package/dist/server/http/readRouting.d.ts +20 -0
- package/dist/server/http/readRouting.js +80 -0
- package/dist/server/http/recordCompose.d.ts +67 -0
- package/dist/server/http/recordCompose.js +167 -0
- package/dist/server/http/recordWrites.d.ts +89 -0
- package/dist/server/http/recordWrites.js +298 -0
- package/dist/server/http/refusalReport.d.ts +38 -0
- package/dist/server/http/refusalReport.js +63 -0
- package/dist/server/http/reply.d.ts +130 -0
- package/dist/server/http/reply.js +394 -0
- package/dist/server/http/requestOrigin.d.ts +11 -0
- package/dist/server/http/requestOrigin.js +8 -0
- package/dist/server/http/router.d.ts +45 -0
- package/dist/server/http/router.js +22 -0
- package/dist/server/http/serverCore.d.ts +68 -0
- package/dist/server/http/serverCore.js +177 -0
- package/dist/server/http/traceRequest.d.ts +30 -0
- package/dist/server/http/traceRequest.js +224 -0
- package/dist/server/http/trust.d.ts +261 -0
- package/dist/server/http/trust.js +472 -0
- package/dist/server/http/writeRefusal.d.ts +33 -0
- package/dist/server/http/writeRefusal.js +24 -0
- package/dist/server/httpConnection.d.ts +49 -0
- package/dist/server/httpConnection.js +170 -0
- package/dist/server/impact.d.ts +55 -0
- package/dist/server/impact.js +47 -0
- package/dist/server/journal.d.ts +134 -0
- package/dist/server/journal.js +398 -0
- package/dist/server/keysetReadHttp.d.ts +52 -0
- package/dist/server/keysetReadHttp.js +85 -0
- package/dist/server/layouts.d.ts +49 -0
- package/dist/server/layouts.js +192 -0
- package/dist/server/migrate/cli.d.ts +55 -0
- package/dist/server/migrate/cli.js +517 -0
- package/dist/server/migrate/database.d.ts +37 -0
- package/dist/server/migrate/database.js +247 -0
- package/dist/server/migrate/desired.d.ts +76 -0
- package/dist/server/migrate/desired.js +292 -0
- package/dist/server/migrate/files.d.ts +34 -0
- package/dist/server/migrate/files.js +141 -0
- package/dist/server/migrate/flyway.d.ts +7 -0
- package/dist/server/migrate/flyway.js +69 -0
- package/dist/server/migrate/history.d.ts +70 -0
- package/dist/server/migrate/history.js +211 -0
- package/dist/server/migrate/runner.d.ts +100 -0
- package/dist/server/migrate/runner.js +409 -0
- package/dist/server/migrate/snapshot.d.ts +30 -0
- package/dist/server/migrate/snapshot.js +239 -0
- package/dist/server/migrate/target.d.ts +33 -0
- package/dist/server/migrate/target.js +82 -0
- package/dist/server/openapiDraft.d.ts +25 -0
- package/dist/server/openapiDraft.js +171 -0
- package/dist/server/operations/diagnostics.d.ts +101 -0
- package/dist/server/operations/diagnostics.js +284 -0
- package/dist/server/operations/requestMetrics.d.ts +33 -0
- package/dist/server/operations/requestMetrics.js +94 -0
- package/dist/server/packageVersion.d.ts +1 -0
- package/dist/server/packageVersion.js +11 -0
- package/dist/server/poolConfig.d.ts +34 -0
- package/dist/server/poolConfig.js +114 -0
- package/dist/server/product.d.ts +20 -0
- package/dist/server/product.js +12 -0
- package/dist/server/recordHistoryOperations.d.ts +39 -0
- package/dist/server/recordHistoryOperations.js +43 -0
- package/dist/server/recordWriteOperations.d.ts +111 -0
- package/dist/server/recordWriteOperations.js +329 -0
- package/dist/server/resourceReadHttp.d.ts +81 -0
- package/dist/server/resourceReadHttp.js +606 -0
- package/dist/server/resourceReadOperations.d.ts +147 -0
- package/dist/server/resourceReadOperations.js +452 -0
- package/dist/server/scaffoldMachine.d.ts +54 -0
- package/dist/server/scaffoldMachine.js +184 -0
- package/dist/server/seed/cli.d.ts +20 -0
- package/dist/server/seed/cli.js +164 -0
- package/dist/server/seed/lexicon.d.ts +26 -0
- package/dist/server/seed/lexicon.js +585 -0
- package/dist/server/seed/seed.d.ts +70 -0
- package/dist/server/seed/seed.js +779 -0
- package/dist/server/seed/words.d.ts +21 -0
- package/dist/server/seed/words.js +164 -0
- package/dist/server/serverRequests.d.ts +6 -0
- package/dist/server/serverRequests.js +33 -0
- package/dist/server/serverTimeouts.d.ts +33 -0
- package/dist/server/serverTimeouts.js +32 -0
- package/dist/server/shapeonly.d.ts +32 -0
- package/dist/server/shapeonly.js +110 -0
- package/dist/server/startupWarnings.d.ts +32 -0
- package/dist/server/startupWarnings.js +92 -0
- package/dist/shared/addressParams.d.ts +28 -0
- package/dist/shared/addressParams.js +47 -0
- package/dist/shared/appCards.d.ts +123 -0
- package/dist/shared/appCards.js +385 -0
- package/dist/shared/appComponents.d.ts +177 -0
- package/dist/shared/appComponents.js +422 -0
- package/dist/shared/appDocuments.d.ts +43 -0
- package/dist/shared/appDocuments.js +131 -0
- package/dist/shared/appEmbeds.d.ts +21 -0
- package/dist/shared/appEmbeds.js +24 -0
- package/dist/shared/appIcons.d.ts +28 -0
- package/dist/shared/appIcons.js +223 -0
- package/dist/shared/appLinks.d.ts +17 -0
- package/dist/shared/appLinks.js +124 -0
- package/dist/shared/appListColumns.d.ts +3 -0
- package/dist/shared/appListColumns.js +66 -0
- package/dist/shared/appLocale.d.ts +36 -0
- package/dist/shared/appLocale.js +86 -0
- package/dist/shared/appMessages.d.ts +44 -0
- package/dist/shared/appMessages.js +78 -0
- package/dist/shared/appNoun.d.ts +21 -0
- package/dist/shared/appNoun.js +32 -0
- package/dist/shared/autoBucket.d.ts +98 -0
- package/dist/shared/autoBucket.js +305 -0
- package/dist/shared/autoValues.d.ts +25 -0
- package/dist/shared/autoValues.js +25 -0
- package/dist/shared/breakdown.d.ts +228 -0
- package/dist/shared/breakdown.js +557 -0
- package/dist/shared/breakdowntext.d.ts +41 -0
- package/dist/shared/breakdowntext.js +400 -0
- package/dist/shared/builtInThemes.d.ts +2 -0
- package/dist/shared/builtInThemes.js +771 -0
- package/dist/shared/chartSeparation.d.ts +11 -0
- package/dist/shared/chartSeparation.js +58 -0
- package/dist/shared/clauses.d.ts +22 -0
- package/dist/shared/clauses.js +97 -0
- package/dist/shared/columnCaption.d.ts +16 -0
- package/dist/shared/columnCaption.js +90 -0
- package/dist/shared/commandFieldPath.d.ts +2 -0
- package/dist/shared/commandFieldPath.js +7 -0
- package/dist/shared/commandWire.d.ts +26 -0
- package/dist/shared/commandWire.js +41 -0
- package/dist/shared/computed.d.ts +161 -0
- package/dist/shared/computed.js +378 -0
- package/dist/shared/computedParse.d.ts +13 -0
- package/dist/shared/computedParse.js +278 -0
- package/dist/shared/computedValue.d.ts +47 -0
- package/dist/shared/computedValue.js +191 -0
- package/dist/shared/connection.d.ts +30 -0
- package/dist/shared/connection.js +1 -0
- package/dist/shared/csv.d.ts +20 -0
- package/dist/shared/csv.js +63 -0
- package/dist/shared/dashLayout.d.ts +30 -0
- package/dist/shared/dashLayout.js +132 -0
- package/dist/shared/dashboardAsks.d.ts +93 -0
- package/dist/shared/dashboardAsks.js +129 -0
- package/dist/shared/dashboardTrend.d.ts +20 -0
- package/dist/shared/dashboardTrend.js +50 -0
- package/dist/shared/declaredReferences.d.ts +50 -0
- package/dist/shared/declaredReferences.js +202 -0
- package/dist/shared/definedFields.d.ts +63 -0
- package/dist/shared/definedFields.js +103 -0
- package/dist/shared/definedValues.d.ts +63 -0
- package/dist/shared/definedValues.js +184 -0
- package/dist/shared/displayDefaults.d.ts +135 -0
- package/dist/shared/displayDefaults.js +529 -0
- package/dist/shared/dueDate.d.ts +6 -0
- package/dist/shared/dueDate.js +6 -0
- package/dist/shared/duration.d.ts +4 -0
- package/dist/shared/duration.js +23 -0
- package/dist/shared/fileBounds.d.ts +9 -0
- package/dist/shared/fileBounds.js +9 -0
- package/dist/shared/filter.d.ts +217 -0
- package/dist/shared/filter.js +305 -0
- package/dist/shared/firstPaint.d.ts +24 -0
- package/dist/shared/firstPaint.js +33 -0
- package/dist/shared/form.d.ts +21 -0
- package/dist/shared/form.js +25 -0
- package/dist/shared/formValues.d.ts +104 -0
- package/dist/shared/formValues.js +352 -0
- package/dist/shared/funnel.d.ts +45 -0
- package/dist/shared/funnel.js +108 -0
- package/dist/shared/httpOperations.d.ts +48 -0
- package/dist/shared/httpOperations.js +9 -0
- package/dist/shared/iconGlyphs.d.ts +4 -0
- package/dist/shared/iconGlyphs.js +151 -0
- package/dist/shared/iconWeights.d.ts +3 -0
- package/dist/shared/iconWeights.js +162 -0
- package/dist/shared/imageWidths.d.ts +32 -0
- package/dist/shared/imageWidths.js +38 -0
- package/dist/shared/keysetPage.d.ts +64 -0
- package/dist/shared/keysetPage.js +161 -0
- package/dist/shared/like.d.ts +20 -0
- package/dist/shared/like.js +29 -0
- package/dist/shared/listEmpty.d.ts +12 -0
- package/dist/shared/listEmpty.js +36 -0
- package/dist/shared/listFilters.d.ts +28 -0
- package/dist/shared/listFilters.js +84 -0
- package/dist/shared/listPresentations.d.ts +199 -0
- package/dist/shared/listPresentations.js +7 -0
- package/dist/shared/listQuestion.d.ts +52 -0
- package/dist/shared/listQuestion.js +137 -0
- package/dist/shared/lookPalettes.d.ts +62 -0
- package/dist/shared/lookPalettes.js +306 -0
- package/dist/shared/maskQuoted.d.ts +24 -0
- package/dist/shared/maskQuoted.js +48 -0
- package/dist/shared/mentionLabel.d.ts +19 -0
- package/dist/shared/mentionLabel.js +38 -0
- package/dist/shared/mentionLookup.d.ts +17 -0
- package/dist/shared/mentionLookup.js +64 -0
- package/dist/shared/menuCounts.d.ts +16 -0
- package/dist/shared/menuCounts.js +74 -0
- package/dist/shared/model.d.ts +79 -0
- package/dist/shared/model.js +153 -0
- package/dist/shared/money.d.ts +44 -0
- package/dist/shared/money.js +81 -0
- package/dist/shared/moneyEntry.d.ts +7 -0
- package/dist/shared/moneyEntry.js +27 -0
- package/dist/shared/mount.d.ts +118 -0
- package/dist/shared/mount.js +248 -0
- package/dist/shared/niceTicks.d.ts +26 -0
- package/dist/shared/niceTicks.js +50 -0
- package/dist/shared/order.d.ts +59 -0
- package/dist/shared/order.js +133 -0
- package/dist/shared/page.d.ts +135 -0
- package/dist/shared/page.js +1187 -0
- package/dist/shared/pageAnatomy.d.ts +99 -0
- package/dist/shared/pageAnatomy.js +370 -0
- package/dist/shared/pageConfig.d.ts +25 -0
- package/dist/shared/pageConfig.js +1308 -0
- package/dist/shared/pageEmptyActions.d.ts +12 -0
- package/dist/shared/pageEmptyActions.js +20 -0
- package/dist/shared/pageLayouts.d.ts +72 -0
- package/dist/shared/pageLayouts.js +205 -0
- package/dist/shared/pageModel.d.ts +785 -0
- package/dist/shared/pageModel.js +121 -0
- package/dist/shared/pagePaths.d.ts +180 -0
- package/dist/shared/pagePaths.js +869 -0
- package/dist/shared/pagePlans.d.ts +52 -0
- package/dist/shared/pagePlans.js +108 -0
- package/dist/shared/pageRoutes.d.ts +9 -0
- package/dist/shared/pageRoutes.js +9 -0
- package/dist/shared/query.d.ts +166 -0
- package/dist/shared/query.js +1302 -0
- package/dist/shared/queryDates.d.ts +12 -0
- package/dist/shared/queryDates.js +101 -0
- package/dist/shared/queryOperands.d.ts +99 -0
- package/dist/shared/queryOperands.js +131 -0
- package/dist/shared/reads.d.ts +103 -0
- package/dist/shared/reads.js +154 -0
- package/dist/shared/recordLabel.d.ts +51 -0
- package/dist/shared/recordLabel.js +123 -0
- package/dist/shared/recordReadKeys.d.ts +30 -0
- package/dist/shared/recordReadKeys.js +51 -0
- package/dist/shared/recordReads.d.ts +268 -0
- package/dist/shared/recordReads.js +368 -0
- package/dist/shared/recordview.d.ts +198 -0
- package/dist/shared/recordview.js +356 -0
- package/dist/shared/referenceModel.d.ts +58 -0
- package/dist/shared/referenceModel.js +194 -0
- package/dist/shared/refusal.d.ts +64 -0
- package/dist/shared/refusal.js +144 -0
- package/dist/shared/relatedCreate.d.ts +30 -0
- package/dist/shared/relatedCreate.js +162 -0
- package/dist/shared/resourceHttp.d.ts +464 -0
- package/dist/shared/resourceHttp.js +1 -0
- package/dist/shared/richText.d.ts +85 -0
- package/dist/shared/richText.js +305 -0
- package/dist/shared/rollups.d.ts +143 -0
- package/dist/shared/rollups.js +64 -0
- package/dist/shared/rowScope.d.ts +72 -0
- package/dist/shared/rowScope.js +376 -0
- package/dist/shared/runtimeTables.d.ts +44 -0
- package/dist/shared/runtimeTables.js +79 -0
- package/dist/shared/schema.d.ts +523 -0
- package/dist/shared/schema.js +627 -0
- package/dist/shared/schematext.d.ts +38 -0
- package/dist/shared/schematext.js +101 -0
- package/dist/shared/scopeCatalog.d.ts +29 -0
- package/dist/shared/scopeCatalog.js +468 -0
- package/dist/shared/servedApp.d.ts +681 -0
- package/dist/shared/servedApp.js +45 -0
- package/dist/shared/sessionLease.d.ts +34 -0
- package/dist/shared/sessionLease.js +3 -0
- package/dist/shared/shape.d.ts +55 -0
- package/dist/shared/shape.js +168 -0
- package/dist/shared/slug.d.ts +1 -0
- package/dist/shared/slug.js +12 -0
- package/dist/shared/sortText.d.ts +14 -0
- package/dist/shared/sortText.js +26 -0
- package/dist/shared/sqlRelation.d.ts +4 -0
- package/dist/shared/sqlRelation.js +8 -0
- package/dist/shared/sqlsaved.d.ts +44 -0
- package/dist/shared/sqlsaved.js +63 -0
- package/dist/shared/stitchedPaths.d.ts +27 -0
- package/dist/shared/stitchedPaths.js +38 -0
- package/dist/shared/structuredFilter.d.ts +22 -0
- package/dist/shared/structuredFilter.js +1 -0
- package/dist/shared/subtitlePath.d.ts +20 -0
- package/dist/shared/subtitlePath.js +24 -0
- package/dist/shared/suggest.d.ts +18 -0
- package/dist/shared/suggest.js +59 -0
- package/dist/shared/tableSizing.d.ts +4 -0
- package/dist/shared/tableSizing.js +9 -0
- package/dist/shared/tagLists.d.ts +57 -0
- package/dist/shared/tagLists.js +34 -0
- package/dist/shared/textRules.d.ts +54 -0
- package/dist/shared/textRules.js +133 -0
- package/dist/shared/theme.d.ts +94 -0
- package/dist/shared/theme.js +800 -0
- package/dist/shared/themeColor.d.ts +34 -0
- package/dist/shared/themeColor.js +109 -0
- package/dist/shared/themeFaces.d.ts +30 -0
- package/dist/shared/themeFaces.js +42 -0
- package/dist/shared/themeInk.d.ts +20 -0
- package/dist/shared/themeInk.js +52 -0
- package/dist/shared/themeLooks.d.ts +9 -0
- package/dist/shared/themeLooks.js +572 -0
- package/dist/shared/themeParts.d.ts +26 -0
- package/dist/shared/themeParts.js +71 -0
- package/dist/shared/themePartsCheck.d.ts +21 -0
- package/dist/shared/themePartsCheck.js +91 -0
- package/dist/shared/themePresets.d.ts +85 -0
- package/dist/shared/themePresets.js +139 -0
- package/dist/shared/themeRecipeWords.d.ts +156 -0
- package/dist/shared/themeRecipeWords.js +156 -0
- package/dist/shared/themeRecipes.d.ts +213 -0
- package/dist/shared/themeRecipes.js +234 -0
- package/dist/shared/themeResolve.d.ts +55 -0
- package/dist/shared/themeResolve.js +52 -0
- package/dist/shared/themeTokens.d.ts +107 -0
- package/dist/shared/themeTokens.js +116 -0
- package/dist/shared/themeType.d.ts +38 -0
- package/dist/shared/themeType.js +205 -0
- package/dist/shared/unitWord.d.ts +4 -0
- package/dist/shared/unitWord.js +37 -0
- package/dist/shared/view.d.ts +195 -0
- package/dist/shared/view.js +987 -0
- package/dist/shared/viewLabels.d.ts +47 -0
- package/dist/shared/viewLabels.js +459 -0
- package/dist/shared/viewPaths.d.ts +248 -0
- package/dist/shared/viewPaths.js +294 -0
- package/dist/shared/viewtext.d.ts +57 -0
- package/dist/shared/viewtext.js +282 -0
- package/dist/shared/vocabulary.d.ts +71 -0
- package/dist/shared/vocabulary.js +249 -0
- package/dist/shared/weekStart.d.ts +7 -0
- package/dist/shared/weekStart.js +36 -0
- package/mark.svg +1 -0
- package/package.json +261 -4
- package/schema/model.d.ts +298 -0
- package/schema/theme.d.ts +587 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Paging by key: the next page is the rows after the last one shown, in the
|
|
3
|
+
* list's own order, rather than the rows after skipping every earlier page.
|
|
4
|
+
*
|
|
5
|
+
* An offset makes the database walk and throw away every row before the
|
|
6
|
+
* page — page 40,000 of a sorted list was fifteen seconds on SQLite with the
|
|
7
|
+
* server's one handle held throughout — and the HTTP routes refuse one past
|
|
8
|
+
* 10,000 (MAX_PAGE_OFFSET). A page after a boundary costs what the first
|
|
9
|
+
* page costs, however deep: the boundary is the last row's sort values and
|
|
10
|
+
* key, and the continuation is "after it in this order", which an index on
|
|
11
|
+
* the sort column reads as a range.
|
|
12
|
+
*
|
|
13
|
+
* The continuation is a filter like any other, so every layer that checks a
|
|
14
|
+
* filter — a reader's grants, hidden columns, a row scope — checks it: it is
|
|
15
|
+
* only ever an additional AND on columns the reader already sorts by. Where a
|
|
16
|
+
* boundary cannot be exact the list pages by offset as before: no primary
|
|
17
|
+
* key (the order is not total), a sort through a reference, or a column whose
|
|
18
|
+
* value does not come back as it is stored (JSON, bytes, money, a float
|
|
19
|
+
* read back rounded).
|
|
20
|
+
*
|
|
21
|
+
* NULL sorts last ascending on PostgreSQL and first on SQLite, and
|
|
22
|
+
* no statement here says NULLS FIRST/LAST, so each engine's own placement is
|
|
23
|
+
* the one the continuation follows.
|
|
24
|
+
*/
|
|
25
|
+
import { columnKind, declaredOrder, primaryKey } from './schema.js';
|
|
26
|
+
/* The types whose value comes back as the engine compares it. */
|
|
27
|
+
const UNFAITHFUL = /json|xml|money|bytea|blob|binary|interval|array|\[\]/i;
|
|
28
|
+
/** Whether this order pages by key on this engine: total, and every column exact. */
|
|
29
|
+
export function keysetOrder(table, order, dialect) {
|
|
30
|
+
if (dialect !== 'postgres' && dialect !== 'sqlite')
|
|
31
|
+
return false;
|
|
32
|
+
const key = primaryKey(table);
|
|
33
|
+
if (!key.length || !key.every((column) => order.some((o) => o.column === column)))
|
|
34
|
+
return false;
|
|
35
|
+
return order.every((o) => {
|
|
36
|
+
const column = table.columns.find((c) => c.name === o.column);
|
|
37
|
+
if (!column || UNFAITHFUL.test(column.type))
|
|
38
|
+
return false;
|
|
39
|
+
const kind = columnKind(column.type);
|
|
40
|
+
if (kind === 'other')
|
|
41
|
+
return false;
|
|
42
|
+
return true;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/** The body fields a step is said in: a route that names the fields its body may carry names these too. */
|
|
46
|
+
export const PAGE_STEP_FIELDS = ['after', 'before', 'end'];
|
|
47
|
+
/** Read a step from a request body: absent, one of the three, or malformed. */
|
|
48
|
+
export function readPageStep(body) {
|
|
49
|
+
const given = PAGE_STEP_FIELDS.filter((key) => body[key] !== undefined);
|
|
50
|
+
if (!given.length)
|
|
51
|
+
return undefined;
|
|
52
|
+
if (given.length > 1)
|
|
53
|
+
return 'invalid';
|
|
54
|
+
if (given[0] === 'end')
|
|
55
|
+
return body.end === true ? { end: true } : 'invalid';
|
|
56
|
+
const raw = body[given[0]];
|
|
57
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw) || Object.keys(raw).length > 64)
|
|
58
|
+
return 'invalid';
|
|
59
|
+
for (const value of Object.values(raw)) {
|
|
60
|
+
if (value !== null && typeof value !== 'string' && typeof value !== 'boolean' && !(typeof value === 'number' && Number.isFinite(value)))
|
|
61
|
+
return 'invalid';
|
|
62
|
+
}
|
|
63
|
+
return given[0] === 'after' ? { after: raw } : { before: raw };
|
|
64
|
+
}
|
|
65
|
+
/** The same order read the other way: the page before a row, or the list's end. */
|
|
66
|
+
export function reversedOrder(order) {
|
|
67
|
+
return order.map((o) => ({ column: o.column, direction: o.direction === 'asc' ? 'desc' : 'asc' }));
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The rows after `boundary` in `order`, as OR-of-AND groups over its
|
|
71
|
+
* columns; undefined when the boundary does not name a value for every one,
|
|
72
|
+
* or names null for a column that cannot hold it. A strict comparison at one
|
|
73
|
+
* position, equality at every earlier one; the first column's bound (`>=`,
|
|
74
|
+
* `<=`) rides in each branch that compares it, which buildWhere says once so
|
|
75
|
+
* an index on it reads a range.
|
|
76
|
+
*/
|
|
77
|
+
export function keysetAfter(table, order, boundary, dialect) {
|
|
78
|
+
const nullsHigh = dialect === 'postgres';
|
|
79
|
+
const columns = order.map((o) => table.columns.find((c) => c.name === o.column));
|
|
80
|
+
if (columns.some((c) => !c))
|
|
81
|
+
return undefined;
|
|
82
|
+
for (const [at, o] of order.entries()) {
|
|
83
|
+
if (!Object.hasOwn(boundary, o.column))
|
|
84
|
+
return undefined;
|
|
85
|
+
if (boundary[o.column] === null && !columns[at].nullable)
|
|
86
|
+
return undefined;
|
|
87
|
+
}
|
|
88
|
+
const equal = (column) => boundary[column] === null ? { column, op: 'isNull' } : { column, op: '=', value: boundary[column] };
|
|
89
|
+
/* A vocabulary sorts as declared (schema.ts declaredOrder), NULL after
|
|
90
|
+
its last value on every engine: the rows past a value are the values
|
|
91
|
+
after it in the list, named, which an index reads as well as a range. */
|
|
92
|
+
const declared = columns.map((column) => declaredOrder(column));
|
|
93
|
+
for (const [at, o] of order.entries()) {
|
|
94
|
+
const value = boundary[o.column];
|
|
95
|
+
if (declared[at] && value !== null && !declared[at].includes(String(value)))
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
const pastDeclared = (o, values, nullable) => {
|
|
99
|
+
const value = boundary[o.column], up = o.direction === 'asc';
|
|
100
|
+
if (value === null)
|
|
101
|
+
return up ? [] : [{ column: o.column, op: 'isNotNull' }];
|
|
102
|
+
const rank = values.indexOf(String(value));
|
|
103
|
+
const after = up ? values.slice(rank + 1) : values.slice(0, rank);
|
|
104
|
+
return [
|
|
105
|
+
...(after.length ? [{ column: o.column, op: 'in', value: [...after] }] : []),
|
|
106
|
+
...(up && nullable ? [{ column: o.column, op: 'isNull' }] : []),
|
|
107
|
+
];
|
|
108
|
+
};
|
|
109
|
+
/* Where the rows past a value lie: above it ascending, below descending,
|
|
110
|
+
and NULL is on whichever side the engine sorts it. */
|
|
111
|
+
const past = (o, nullable, at) => {
|
|
112
|
+
if (declared[at])
|
|
113
|
+
return pastDeclared(o, declared[at], nullable);
|
|
114
|
+
const value = boundary[o.column], up = o.direction === 'asc';
|
|
115
|
+
if (value === null)
|
|
116
|
+
return up === nullsHigh ? [] : [{ column: o.column, op: 'isNotNull' }];
|
|
117
|
+
const strict = { column: o.column, op: up ? '>' : '<', value };
|
|
118
|
+
return nullable && up === nullsHigh ? [strict, { column: o.column, op: 'isNull' }] : [strict];
|
|
119
|
+
};
|
|
120
|
+
const first = order[0], lead = boundary[first.column];
|
|
121
|
+
const bound = lead === null || declared[0] ? undefined : { column: first.column, op: first.direction === 'asc' ? '>=' : '<=', value: lead };
|
|
122
|
+
const groups = [];
|
|
123
|
+
for (const [at, o] of order.entries()) {
|
|
124
|
+
const prefix = order.slice(0, at).map((p) => equal(p.column));
|
|
125
|
+
for (const term of past(o, columns[at].nullable, at)) {
|
|
126
|
+
const branch = [...prefix, term];
|
|
127
|
+
// The bound holds wherever the first column is compared with a value; a NULL branch has none.
|
|
128
|
+
const compared = branch[0].op !== 'isNull' && branch[0].op !== 'isNotNull';
|
|
129
|
+
groups.push(bound && compared ? [bound, ...branch] : branch);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return groups;
|
|
133
|
+
}
|
|
134
|
+
/** A filter's groups, each continued by every branch: the rows it matches past the boundary. */
|
|
135
|
+
export function continueGroups(base, tail) {
|
|
136
|
+
const starting = base?.filter((group) => group.length).length ? base.filter((group) => group.length) : [[]];
|
|
137
|
+
return starting.flatMap((group) => tail.map((branch) => [...group, ...branch]));
|
|
138
|
+
}
|
|
139
|
+
/** The boundaries of a page's first and last rows, where every order column came back with them. */
|
|
140
|
+
export function pageBounds(order, rows, name = (column) => column) {
|
|
141
|
+
if (!rows.length)
|
|
142
|
+
return undefined;
|
|
143
|
+
const read = (row) => {
|
|
144
|
+
const boundary = {};
|
|
145
|
+
for (const o of order) {
|
|
146
|
+
const key = name(o.column);
|
|
147
|
+
if (!Object.hasOwn(row, key))
|
|
148
|
+
return undefined;
|
|
149
|
+
const value = row[key];
|
|
150
|
+
if (value !== null &&
|
|
151
|
+
typeof value !== 'string' &&
|
|
152
|
+
typeof value !== 'boolean' &&
|
|
153
|
+
!(typeof value === 'number' && Number.isFinite(value)))
|
|
154
|
+
return undefined;
|
|
155
|
+
boundary[o.column] = value;
|
|
156
|
+
}
|
|
157
|
+
return boundary;
|
|
158
|
+
};
|
|
159
|
+
const first = read(rows[0]), last = read(rows[rows.length - 1]);
|
|
160
|
+
return first && last ? { first, last } : undefined;
|
|
161
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pattern behind `contains`, `starts with` and `ends with`.
|
|
3
|
+
*
|
|
4
|
+
* A user typing `contains 50%` means a literal percent sign. Interpolated
|
|
5
|
+
* straight into a LIKE pattern it becomes a wildcard, so the search matches
|
|
6
|
+
* every row and the tool reports a hit on data that does not contain the
|
|
7
|
+
* value — the worst shape of wrong answer, because nothing about it looks
|
|
8
|
+
* like a failure. `a_c` matching `abc` is the same bug, quieter.
|
|
9
|
+
*
|
|
10
|
+
* So the value is escaped and the statement declares an escape character.
|
|
11
|
+
* `#` rather than the conventional backslash: engines differ on backslash escapes
|
|
12
|
+
* inside string literals, which would make the `ESCAPE` clause itself
|
|
13
|
+
* dialect-specific text.
|
|
14
|
+
*
|
|
15
|
+
* Lives in shared/ because the SQL the adapters compile and the SQL the query
|
|
16
|
+
* bar *shows* you have to agree — a preview that promises a wildcard the
|
|
17
|
+
* compiler escapes is a lie in the one place the tool is teaching.
|
|
18
|
+
*/
|
|
19
|
+
export declare const LIKE_ESCAPE = "#";
|
|
20
|
+
export declare function likePattern(value: unknown, op: 'contains' | 'startsWith' | 'endsWith'): string;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pattern behind `contains`, `starts with` and `ends with`.
|
|
3
|
+
*
|
|
4
|
+
* A user typing `contains 50%` means a literal percent sign. Interpolated
|
|
5
|
+
* straight into a LIKE pattern it becomes a wildcard, so the search matches
|
|
6
|
+
* every row and the tool reports a hit on data that does not contain the
|
|
7
|
+
* value — the worst shape of wrong answer, because nothing about it looks
|
|
8
|
+
* like a failure. `a_c` matching `abc` is the same bug, quieter.
|
|
9
|
+
*
|
|
10
|
+
* So the value is escaped and the statement declares an escape character.
|
|
11
|
+
* `#` rather than the conventional backslash: engines differ on backslash escapes
|
|
12
|
+
* inside string literals, which would make the `ESCAPE` clause itself
|
|
13
|
+
* dialect-specific text.
|
|
14
|
+
*
|
|
15
|
+
* Lives in shared/ because the SQL the adapters compile and the SQL the query
|
|
16
|
+
* bar *shows* you have to agree — a preview that promises a wildcard the
|
|
17
|
+
* compiler escapes is a lie in the one place the tool is teaching.
|
|
18
|
+
*/
|
|
19
|
+
export const LIKE_ESCAPE = '#';
|
|
20
|
+
/** The wildcards, plus the escape character itself, which must escape too. */
|
|
21
|
+
const SPECIAL = /[#%_]/g;
|
|
22
|
+
export function likePattern(value, op) {
|
|
23
|
+
const literal = String(value ?? '').replace(SPECIAL, (ch) => `${LIKE_ESCAPE}${ch}`);
|
|
24
|
+
if (op === 'startsWith')
|
|
25
|
+
return `${literal}%`;
|
|
26
|
+
if (op === 'endsWith')
|
|
27
|
+
return `%${literal}`;
|
|
28
|
+
return `%${literal}%`;
|
|
29
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AppListEmpty } from './listPresentations.js';
|
|
2
|
+
/** Read the shared empty-list copy used by list views and related sections. */
|
|
3
|
+
export declare function parseListEmpty(raw: unknown, at: string): AppListEmpty;
|
|
4
|
+
/** The authored shape again, for a definition written back out. */
|
|
5
|
+
export declare function listEmptyConfig(empty: AppListEmpty): {
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string | undefined;
|
|
8
|
+
action?: {
|
|
9
|
+
label: string;
|
|
10
|
+
to: string;
|
|
11
|
+
} | undefined;
|
|
12
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared list-empty contract and projection.
|
|
3
|
+
*
|
|
4
|
+
* Ownership: the App DSL owns validation and authored copy; clients consume
|
|
5
|
+
* the resulting AppListEmpty shape for list and related-list rendering.
|
|
6
|
+
*/
|
|
7
|
+
import { allowKeys, isRecord } from './model.js';
|
|
8
|
+
import { parseCaption } from './appMessages.js';
|
|
9
|
+
/** Read the shared empty-list copy used by list views and related sections. */
|
|
10
|
+
export function parseListEmpty(raw, at) {
|
|
11
|
+
const here = `${at}, "empty"`;
|
|
12
|
+
if (!isRecord(raw))
|
|
13
|
+
throw new Error(`${here} must be an object with a "title".`);
|
|
14
|
+
allowKeys(raw, ['title', 'description', 'action'], here, { message: 'is now "description": the sentence under the title' });
|
|
15
|
+
const title = parseCaption(raw.title, `${here} needs a non-empty "title"`);
|
|
16
|
+
const description = raw.description === undefined ? undefined : parseCaption(raw.description, `${here}, "description"`);
|
|
17
|
+
const result = { title, ...(description === undefined ? {} : { description }) };
|
|
18
|
+
if (raw.action === undefined)
|
|
19
|
+
return result;
|
|
20
|
+
if (!isRecord(raw.action))
|
|
21
|
+
throw new Error(`${here}, "action" must be an object with "label" and "to".`);
|
|
22
|
+
const actionAt = `${here}, "action"`;
|
|
23
|
+
allowKeys(raw.action, ['label', 'to'], actionAt);
|
|
24
|
+
const label = parseCaption(raw.action.label, `${actionAt} needs a non-empty "label"`);
|
|
25
|
+
if (typeof raw.action.to !== 'string' || !raw.action.to.trim())
|
|
26
|
+
throw new Error(`${actionAt} needs a non-empty "to": the key of a list, a dashboard or a signed-in form view.`);
|
|
27
|
+
return { ...result, action: { label, view: raw.action.to.trim() } };
|
|
28
|
+
}
|
|
29
|
+
/** The authored shape again, for a definition written back out. */
|
|
30
|
+
export function listEmptyConfig(empty) {
|
|
31
|
+
return {
|
|
32
|
+
title: empty.title,
|
|
33
|
+
...(empty.description === undefined ? {} : { description: empty.description }),
|
|
34
|
+
...(empty.action ? { action: { label: empty.action.label, to: empty.action.view } } : {}),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A list's filter as authored, as the key it is held under: a column or a
|
|
3
|
+
* path as written, a `has` filter as the words of its condition. Throws with
|
|
4
|
+
* the fix for a shape no list reads.
|
|
5
|
+
*/
|
|
6
|
+
export declare function listFilterKey(raw: unknown, at: string): string;
|
|
7
|
+
/** A `has` filter's key read back: the child table as written, the reference where it names one, and what it asks. */
|
|
8
|
+
export interface HasFilterKey {
|
|
9
|
+
child: string;
|
|
10
|
+
via?: string;
|
|
11
|
+
asks: string;
|
|
12
|
+
}
|
|
13
|
+
/** The `has` filter a key is, or undefined for a column or a path. */
|
|
14
|
+
export declare function hasFilterOf(key: string): HasFilterKey | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* The word an address names a filter by: a column or a path as it is
|
|
17
|
+
* (`?account_id.industry_id=3`), the rows that point at the record as
|
|
18
|
+
* `has.` their table, the reference where the filter names one, and what
|
|
19
|
+
* it asks (`?has.opportunity.stage=won`). No column is called `has.…`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function filterAddressWord(key: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* What a filter across a reference is called on its list: the record it
|
|
24
|
+
* reaches says it ("Industry"), unless another of the list's filters or
|
|
25
|
+
* columns is called that too, when the reference it crosses says whose it is
|
|
26
|
+
* ("Account industry"). Any other filter is called by its caption.
|
|
27
|
+
*/
|
|
28
|
+
export declare function filterLabel(name: string, caption: (path: string) => string, near: readonly string[]): string;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A list's filters across its related tables: a path up a reference
|
|
3
|
+
* (`'account_id.industry_id'`) and the rows that point at the record
|
|
4
|
+
* (`{ has: 'opportunity', filter: 'stage' }`).
|
|
5
|
+
*
|
|
6
|
+
* A filter is held as the words its condition starts with, as every filter
|
|
7
|
+
* always was — a column's name, a path, or `any opportunity where stage` — so
|
|
8
|
+
* the rail and the bar fold a tail onto it (`in (won, lost)`) by the rule
|
|
9
|
+
* they fold one onto a column (conditions.js), the question is a chip, a URL
|
|
10
|
+
* and a tab refinement like any other, and the language (`any …`, view.ts)
|
|
11
|
+
* is what reads it. The address names it by a word of its own.
|
|
12
|
+
*/
|
|
13
|
+
import { ANY_CONDITION } from './query.js';
|
|
14
|
+
const WORD = /^[A-Za-z_][\w$]*$/;
|
|
15
|
+
const KEY_WORD = /^[A-Za-z_][\w$]*(?:\+[A-Za-z_][\w$]*)*$/;
|
|
16
|
+
const PATH = /^[A-Za-z_][\w$]*(?:\.[A-Za-z_][\w$]*)*$/;
|
|
17
|
+
const HAS_KEYS = new Set(['has', 'filter', 'segment', 'whose']);
|
|
18
|
+
/**
|
|
19
|
+
* A list's filter as authored, as the key it is held under: a column or a
|
|
20
|
+
* path as written, a `has` filter as the words of its condition. Throws with
|
|
21
|
+
* the fix for a shape no list reads.
|
|
22
|
+
*/
|
|
23
|
+
export function listFilterKey(raw, at) {
|
|
24
|
+
if (typeof raw === 'string' && raw.trim())
|
|
25
|
+
return raw.trim();
|
|
26
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw)) {
|
|
27
|
+
throw new Error(`${at} has "filters" that are not a list of column names, paths, or { has } filters.`);
|
|
28
|
+
}
|
|
29
|
+
const o = raw;
|
|
30
|
+
/* The reference is `whose`, as a rollup's and a related list's is; `via` stays the query language's own word (renamed before 1.0). */
|
|
31
|
+
if (o.via !== undefined)
|
|
32
|
+
throw new Error(`${at} has a filter with "via", which is now "whose": the column of ${String(o.has)} that points at this record.`);
|
|
33
|
+
const stray = Object.keys(o).find((key) => !HAS_KEYS.has(key));
|
|
34
|
+
if (stray !== undefined)
|
|
35
|
+
throw new Error(`${at} has a filter with "${stray}": a { has } filter takes has, filter or segment, and whose.`);
|
|
36
|
+
const word = (key, shape) => typeof o[key] === 'string' && shape.test(o[key].trim()) ? o[key].trim() : undefined;
|
|
37
|
+
const has = word('has', /^[A-Za-z_][\w$]*(?:\.[A-Za-z_][\w$]*)?$/);
|
|
38
|
+
if (!has)
|
|
39
|
+
throw new Error(`${at} has a filter without the table it asks about: { has: 'opportunity', filter: 'stage' }.`);
|
|
40
|
+
if ((o.filter === undefined) === (o.segment === undefined)) {
|
|
41
|
+
throw new Error(`${at}: the filter { has: '${has}' } names a "filter" (a column of ${has}, or a path up from it) or a "segment" of ${has} — one of them.`);
|
|
42
|
+
}
|
|
43
|
+
const asks = o.filter === undefined ? word('segment', WORD) : word('filter', PATH);
|
|
44
|
+
if (!asks) {
|
|
45
|
+
throw new Error(`${at}: the filter { has: '${has}' } has a "${o.filter === undefined ? 'segment' : 'filter'}" that is not ${o.filter === undefined ? "a segment's name" : 'a column or a path'}.`);
|
|
46
|
+
}
|
|
47
|
+
if (o.whose !== undefined && !word('whose', KEY_WORD)) {
|
|
48
|
+
throw new Error(`${at}: the filter { has: '${has}' } has a "whose" that is not a column of ${has}.`);
|
|
49
|
+
}
|
|
50
|
+
const whose = word('whose', KEY_WORD);
|
|
51
|
+
return `any ${has}${whose ? ` via ${whose}` : ''} where ${asks}`;
|
|
52
|
+
}
|
|
53
|
+
/** The `has` filter a key is, or undefined for a column or a path. */
|
|
54
|
+
export function hasFilterOf(key) {
|
|
55
|
+
const m = ANY_CONDITION.exec(key.trim());
|
|
56
|
+
if (!m || m[1].toLowerCase() !== 'any' || m[4] === undefined || !PATH.test(m[4].trim()))
|
|
57
|
+
return undefined;
|
|
58
|
+
return { child: m[2], ...(m[3] ? { via: m[3] } : {}), asks: m[4].trim() };
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The word an address names a filter by: a column or a path as it is
|
|
62
|
+
* (`?account_id.industry_id=3`), the rows that point at the record as
|
|
63
|
+
* `has.` their table, the reference where the filter names one, and what
|
|
64
|
+
* it asks (`?has.opportunity.stage=won`). No column is called `has.…`.
|
|
65
|
+
*/
|
|
66
|
+
export function filterAddressWord(key) {
|
|
67
|
+
const has = hasFilterOf(key);
|
|
68
|
+
return has ? ['has', has.child, ...(has.via ? [has.via] : []), has.asks].join('.') : key;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* What a filter across a reference is called on its list: the record it
|
|
72
|
+
* reaches says it ("Industry"), unless another of the list's filters or
|
|
73
|
+
* columns is called that too, when the reference it crosses says whose it is
|
|
74
|
+
* ("Account industry"). Any other filter is called by its caption.
|
|
75
|
+
*/
|
|
76
|
+
export function filterLabel(name, caption, near) {
|
|
77
|
+
const said = caption(name);
|
|
78
|
+
if (!name.includes('.') || hasFilterOf(name))
|
|
79
|
+
return said;
|
|
80
|
+
if (!near.some((other) => other !== name && caption(other) === said))
|
|
81
|
+
return said;
|
|
82
|
+
const whose = caption(name.split('.')[0]);
|
|
83
|
+
return `${whose} ${/^[A-Z][a-z]/.test(said) ? said.charAt(0).toLowerCase() + said.slice(1) : said}`;
|
|
84
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a list draws its rows, beside the plain grid: the presentations
|
|
3
|
+
* (`presentation: { kind: … }` — a board, a calendar, cards, a split, …), a
|
|
4
|
+
* list's tabs and its empty state. The rules both a page's related list and
|
|
5
|
+
* an App's list view read (listQuestion.ts, dashboardAsks.ts, appListColumns.ts);
|
|
6
|
+
* the list view that holds them is the App's (appModel.ts AppListView).
|
|
7
|
+
*/
|
|
8
|
+
import type { AppCardsList } from './appCards.js';
|
|
9
|
+
import type { AppIconName } from './appIcons.js';
|
|
10
|
+
import type { CustomListPresentation } from './appComponents.js';
|
|
11
|
+
import { DISPLAY_TONES } from './model.js';
|
|
12
|
+
/**
|
|
13
|
+
* One filter tab on a list page. The query is written in the ordinary
|
|
14
|
+
* query-bar language, without the leading table name — the list supplies
|
|
15
|
+
* it. No query means every row.
|
|
16
|
+
*/
|
|
17
|
+
export interface AppListTab {
|
|
18
|
+
label: string;
|
|
19
|
+
query?: string;
|
|
20
|
+
/** Internal: the tab's word in an address, from the App's own language, where a reader's label says
|
|
21
|
+
another (server/app/apps.ts `localizedApp`). Addresses stay one per thing in every locale. A segment's
|
|
22
|
+
tab is its segment's name. */
|
|
23
|
+
slug?: string;
|
|
24
|
+
/** The resource's segment the tab names (appSegments.ts): its `query` is that word, written out where it is read. */
|
|
25
|
+
segment?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Data only: the renderer supplies the list and detail nodes. One of the
|
|
29
|
+
* list presentations, so a view says how its rows are drawn in exactly
|
|
30
|
+
* one place — `presentation: { kind: 'split', … }` beside the checklist, the
|
|
31
|
+
* queue and the board — rather than through a second key that had to be read
|
|
32
|
+
* before the first. The list is the view's own — its show, query, tabs and
|
|
33
|
+
* filter bar — so the split says only what is its: the detail's fields and
|
|
34
|
+
* the list's page size. The detail is headed by the resource's noun.
|
|
35
|
+
*/
|
|
36
|
+
export interface AppSplitListDetail {
|
|
37
|
+
kind: 'split';
|
|
38
|
+
/** The picked record's fields, in order: columns or label paths. Absent, its fields as the schema has them. */
|
|
39
|
+
detail?: string[];
|
|
40
|
+
/** The list's page size, 1 to 200: the view's, written into its question. */
|
|
41
|
+
limit?: number;
|
|
42
|
+
/** How a row reads in the pane beside the record: the queue's vocabulary, with an avatar. Absent, the plain grid. */
|
|
43
|
+
row?: {
|
|
44
|
+
primary: string;
|
|
45
|
+
lines?: string[];
|
|
46
|
+
facts?: string[];
|
|
47
|
+
badge?: string;
|
|
48
|
+
avatar?: string;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/** Local readable columns; presentation never grants permission to toggle. */
|
|
52
|
+
export interface AppChecklist {
|
|
53
|
+
kind: 'checklist';
|
|
54
|
+
primary: string;
|
|
55
|
+
checked: string;
|
|
56
|
+
/** At most one line beneath the primary. */
|
|
57
|
+
lines?: string[];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* A keyboard-first selection queue: the rows as a listbox, and the view's
|
|
61
|
+
* `bulk` actions offered for exactly the selected keys. Its title and lines may
|
|
62
|
+
* be local columns or one-hop reference label paths. Selection is a set of
|
|
63
|
+
* loaded records, never "everything matching". A fixed update writes each
|
|
64
|
+
* record on its own through the ordinary update route, so its result is per
|
|
65
|
+
* record; a `targets: 'many'` command sends one request, all or nothing.
|
|
66
|
+
*/
|
|
67
|
+
export interface AppQueueList {
|
|
68
|
+
kind: 'queue';
|
|
69
|
+
/** A local text column or one-hop reference label path. */
|
|
70
|
+
primary: string;
|
|
71
|
+
/** At most two local columns or one-hop label paths beneath the primary. */
|
|
72
|
+
lines?: string[];
|
|
73
|
+
/** Up to six values with captions, each a local column or one-hop label path. */
|
|
74
|
+
facts?: string[];
|
|
75
|
+
/** An optional status or other compact value shown as a reusable badge above the title. */
|
|
76
|
+
badge?: string;
|
|
77
|
+
/** The row-opening call to action; omitted uses "Open". */
|
|
78
|
+
openLabel?: string;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Lanes of cards by one local column's values. A card moves only through an
|
|
82
|
+
* action of the view whose `set` is exactly that column, judged by its own
|
|
83
|
+
* `when`; the board never writes a lane the app did not spell out. Where `by`
|
|
84
|
+
* references another table (a cycle, a sprint), the lanes are that table's
|
|
85
|
+
* rows, led by one for none, and a card moves by an ordinary update of the
|
|
86
|
+
* reference — unless the resource's transitions give it to its actions.
|
|
87
|
+
*/
|
|
88
|
+
export interface AppBoardList {
|
|
89
|
+
kind: 'board';
|
|
90
|
+
by: string;
|
|
91
|
+
/** Ordered subset of exact lane values (a reference's keys); omit to use the column's vocabulary, the
|
|
92
|
+
referenced rows, or the values seen. */
|
|
93
|
+
lanes?: readonly string[];
|
|
94
|
+
/** A numeric local column holding each card's place in its lane: the lanes read in its order, and a reader
|
|
95
|
+
who may edit it moves a card into place. Never a column the resource's transitions give to its actions. */
|
|
96
|
+
order?: string;
|
|
97
|
+
/** A local column whose values are rows across the lanes, one per value plus one for none; a card changes
|
|
98
|
+
row by an ordinary update of it where the reader may edit it, and keeps its row, told why, where not. */
|
|
99
|
+
swimlanes?: string;
|
|
100
|
+
/** A lane's work-in-progress limit, by lane value: its head says "count / limit" and warns past it. Shown,
|
|
101
|
+
never enforced. */
|
|
102
|
+
limits?: Readonly<Record<string, number>>;
|
|
103
|
+
primary: string;
|
|
104
|
+
/** At most one line beneath the primary. */
|
|
105
|
+
lines?: string[];
|
|
106
|
+
/** A local column whose value is the card's kind: a chip over the title in the color its display rule's `colors`
|
|
107
|
+
gives the value (else one fixed by its text), and the card's stripe where the look draws one. */
|
|
108
|
+
category?: string;
|
|
109
|
+
/** Up to four facts along the card's foot, each a local column with an optional App icon before it; a person
|
|
110
|
+
(an `avatar` or `avatars` column) stands at the right end. */
|
|
111
|
+
footer?: readonly AppBoardFact[];
|
|
112
|
+
/** A local numeric column summed in each lane's head beside its count. Absent, the first money column the card
|
|
113
|
+
shows (a line, a fact) is summed; a card and a lane say money short ($240K), whole in the title. */
|
|
114
|
+
sum?: string;
|
|
115
|
+
/** Lane values drawn folded until a reader opens one — a closed stage, won or lost: a narrow strip with its name,
|
|
116
|
+
count and sum. The reader's choice is remembered in their browser, per board. */
|
|
117
|
+
folded?: readonly string[];
|
|
118
|
+
}
|
|
119
|
+
/** One fact on a board card's foot. */
|
|
120
|
+
export interface AppBoardFact {
|
|
121
|
+
column: string;
|
|
122
|
+
icon?: AppIconName;
|
|
123
|
+
}
|
|
124
|
+
/** A month of records by one date column, each on its day — or, with `end`, across the days from one date
|
|
125
|
+
column to another; a phone reads it as an agenda. */
|
|
126
|
+
export interface AppCalendarList {
|
|
127
|
+
kind: 'calendar';
|
|
128
|
+
/** The date (or timestamp) column a record sits on, or starts on when it has an `end`. */
|
|
129
|
+
date: string;
|
|
130
|
+
/** A local date column holding a record's last day: the record is drawn across every day between. */
|
|
131
|
+
end?: string;
|
|
132
|
+
/** A local text column or one-hop reference label path. */
|
|
133
|
+
primary: string;
|
|
134
|
+
/** At most one local column or one-hop label path beneath the primary. */
|
|
135
|
+
lines?: string[];
|
|
136
|
+
/** A status said as its tone (a dot and its word), from the column's display map. */
|
|
137
|
+
badge?: string;
|
|
138
|
+
/** Shaded spans behind the days, read from other resources (a blackout window), each labeled. */
|
|
139
|
+
backdrop?: AppCalendarBackdrop[];
|
|
140
|
+
}
|
|
141
|
+
/** One kind of shaded span on a calendar: another resource's rows, from one date column to another, each labeled. */
|
|
142
|
+
export interface AppCalendarBackdrop {
|
|
143
|
+
/** The resource the spans are rows of: by the App's name as authored, its table's id once resolved. */
|
|
144
|
+
from: string;
|
|
145
|
+
/** Its date (or timestamp) column where a span starts. */
|
|
146
|
+
start: string;
|
|
147
|
+
/** Its date (or timestamp) column holding a span's last day. */
|
|
148
|
+
end: string;
|
|
149
|
+
/** Its column whose value names a span. */
|
|
150
|
+
labelColumn: string;
|
|
151
|
+
/** The span's shade, in a display tone; absent, the quiet neutral. */
|
|
152
|
+
tone?: (typeof DISPLAY_TONES)[number];
|
|
153
|
+
}
|
|
154
|
+
/** How many kinds of span one calendar shades. */
|
|
155
|
+
export declare const CALENDAR_BACKDROPS_MAX = 4;
|
|
156
|
+
/** Records as the tree their parent column makes: a root per record with no parent, its children folded under it. */
|
|
157
|
+
export interface AppTreeList {
|
|
158
|
+
kind: 'tree';
|
|
159
|
+
/** A local column that references this table: the record above, empty at a root. */
|
|
160
|
+
parent: string;
|
|
161
|
+
/** A local text column or one-hop reference label path. */
|
|
162
|
+
primary: string;
|
|
163
|
+
/** At most one local column or one-hop label path beside the primary. */
|
|
164
|
+
lines?: string[];
|
|
165
|
+
}
|
|
166
|
+
/** Records as bars along time, from one date column to another, in a row per group: a Gantt chart. */
|
|
167
|
+
export interface AppGanttList {
|
|
168
|
+
kind: 'gantt';
|
|
169
|
+
/** The date (or timestamp) column a bar starts on. */
|
|
170
|
+
start: string;
|
|
171
|
+
/** The date column it ends on; a record with none is a mark on its start. */
|
|
172
|
+
end: string;
|
|
173
|
+
/** A local text column or one-hop reference label path. */
|
|
174
|
+
primary: string;
|
|
175
|
+
/** A local column or one-hop label path whose value names a bar's row ("owner_id.name"); absent, a row per record. */
|
|
176
|
+
by?: string;
|
|
177
|
+
/** A percent column (0–100) drawn as the bar's filled share. */
|
|
178
|
+
progress?: string;
|
|
179
|
+
}
|
|
180
|
+
export type AppListPresentation = AppTreeList | AppGanttList | AppChecklist | AppQueueList | AppBoardList | AppCalendarList | AppCardsList | AppSplitListDetail | CustomListPresentation;
|
|
181
|
+
/** An optional empty-list action opens another App list or dashboard, or a signed-in form (the one that makes the first row). */
|
|
182
|
+
export interface AppListEmpty {
|
|
183
|
+
title: string;
|
|
184
|
+
description?: string;
|
|
185
|
+
action?: {
|
|
186
|
+
label: string;
|
|
187
|
+
view: string;
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
/** Whether the Export menu is offered for a table, here and not beside the payload that sets `exportableTables`, since a list's first paint asks it and appPayload.ts imports the manifest parser: `ui.export` is the App's switch, and `exportableTables` (present in an App that grants by role) the person's. */
|
|
191
|
+
export declare const exportOffered: (app: {
|
|
192
|
+
ui: {
|
|
193
|
+
export?: boolean;
|
|
194
|
+
};
|
|
195
|
+
exportableTables?: string[];
|
|
196
|
+
} | null | undefined, table: string | undefined) => boolean;
|
|
197
|
+
/** Where a list's filters sit: a bar above the rows, a rail of facets beside them, or none. */
|
|
198
|
+
export declare const FILTER_BARS: readonly ['bar', 'rail', 'none'];
|
|
199
|
+
export type FilterBar = (typeof FILTER_BARS)[number];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DISPLAY_TONES } from './model.js';
|
|
2
|
+
/** How many kinds of span one calendar shades. */
|
|
3
|
+
export const CALENDAR_BACKDROPS_MAX = 4;
|
|
4
|
+
/** Whether the Export menu is offered for a table, here and not beside the payload that sets `exportableTables`, since a list's first paint asks it and appPayload.ts imports the manifest parser: `ui.export` is the App's switch, and `exportableTables` (present in an App that grants by role) the person's. */
|
|
5
|
+
export const exportOffered = (app, table) => app?.ui.export !== false && (!app?.exportableTables || (table !== undefined && app.exportableTables.includes(table)));
|
|
6
|
+
/** Where a list's filters sit: a bar above the rows, a rail of facets beside them, or none. */
|
|
7
|
+
export const FILTER_BARS = ['bar', 'rail', 'none'];
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type DatabaseSchema } from './schema.js';
|
|
2
|
+
import type { ServedResource } from './servedApp.js';
|
|
3
|
+
import type { AppListPresentation } from './listPresentations.js';
|
|
4
|
+
/** What a list's question is read over: the schema, and the App's resources — their record labels and display rules. */
|
|
5
|
+
export interface ListRules {
|
|
6
|
+
readonly schema: DatabaseSchema;
|
|
7
|
+
readonly resources: Readonly<Record<string, Pick<ServedResource, 'recordLabel' | 'display'>>>;
|
|
8
|
+
}
|
|
9
|
+
/** One of a list's tabs: its label and the condition it adds. */
|
|
10
|
+
export interface ListTab {
|
|
11
|
+
label: string;
|
|
12
|
+
query?: string;
|
|
13
|
+
/** Its word in an address where the label is said in another language (addressParams.ts `tabKey`). */
|
|
14
|
+
slug?: string;
|
|
15
|
+
}
|
|
16
|
+
/** What of a list view its question is made from. */
|
|
17
|
+
export interface ListQuestionSpec {
|
|
18
|
+
table: string;
|
|
19
|
+
query?: string;
|
|
20
|
+
tabs?: ListTab[];
|
|
21
|
+
show?: string[];
|
|
22
|
+
presentation?: AppListPresentation;
|
|
23
|
+
sort?: string;
|
|
24
|
+
order?: string;
|
|
25
|
+
limit?: number;
|
|
26
|
+
editable?: true | string[];
|
|
27
|
+
/** The reference column whose record a row opens (a view's `opens`): fetched, as the row's key is, to open it. */
|
|
28
|
+
opens?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The references among a list's columns, each with the path its record's
|
|
32
|
+
* name is read from: `partner_id` → `partner_id.code` where the partner's
|
|
33
|
+
* resource says `recordLabel: 'code'`, else the name the record page would
|
|
34
|
+
* give it. A target with nothing better than its key keeps the key.
|
|
35
|
+
*/
|
|
36
|
+
export declare function referenceNames(rules: ListRules, tableId: string, names: readonly string[]): Record<string, string>;
|
|
37
|
+
/** The columns a shown column's second line reads: fetched with the row, drawn under it. */
|
|
38
|
+
export declare function subtitleColumns(rules: ListRules, tableId: string, shown: readonly string[]): string[];
|
|
39
|
+
/** The references an editable list shows by name (`owner_id.name`): their keys ride along
|
|
40
|
+
with the row, so a cell edits the reference and says what it replaces. */
|
|
41
|
+
export declare function editedReferences(rules: ListRules, spec: Pick<ListQuestionSpec, 'table' | 'show' | 'editable' | 'presentation'>): string[];
|
|
42
|
+
/** The references a list draws — its `show`, its presentation's columns, or every column — by the path each is named from (referenceNames). */
|
|
43
|
+
export declare function listReferenceNames(rules: ListRules, spec: Pick<ListQuestionSpec, 'table' | 'show' | 'presentation'>): Record<string, string>;
|
|
44
|
+
/** The show clause that fetches the app's columns plus the keys a row needs to open.
|
|
45
|
+
A presentation names the columns it draws, so a view of cards needs no `show`. */
|
|
46
|
+
export declare function showClause(rules: ListRules, spec: ListQuestionSpec): string;
|
|
47
|
+
export declare const limitClause: (spec: Pick<ListQuestionSpec, 'limit'>) => string;
|
|
48
|
+
export declare const orderClause: (spec: Pick<ListQuestionSpec, 'order' | 'sort'>) => string;
|
|
49
|
+
export declare function withOrder(spec: Pick<ListQuestionSpec, 'table' | 'order' | 'sort'>, question: string): string;
|
|
50
|
+
/** The full query text one of the app's tabs stands for. A module's
|
|
51
|
+
standing conditions come first; a tab refines on top of them. */
|
|
52
|
+
export declare function appListQuery(rules: ListRules, spec: ListQuestionSpec, index?: number): string;
|