@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,785 @@
|
|
|
1
|
+
import type { RelatedCreate } from '../../schema/model.js';
|
|
2
|
+
import type { AppListEmpty } from './listPresentations.js';
|
|
3
|
+
import type { FigureFormat } from './model.js';
|
|
4
|
+
import { type TableSizing } from './tableSizing.js';
|
|
5
|
+
/**
|
|
6
|
+
* How much of a row a section takes.
|
|
7
|
+
*
|
|
8
|
+
* Three widths, not a number of grid columns. A section is a piece of
|
|
9
|
+
* content, and "half" survives a narrow window and a wide one where "columns
|
|
10
|
+
* 4 through 9" needs a breakpoint table to mean anything. It is also the
|
|
11
|
+
* whole of the layout language, which keeps a page reviewable as text.
|
|
12
|
+
*/
|
|
13
|
+
export type SectionWidth = 'full' | 'half' | 'third' | 'two-thirds';
|
|
14
|
+
export declare const WIDTHS: readonly SectionWidth[];
|
|
15
|
+
/**
|
|
16
|
+
* Empty space beside a section, in the same fractions widths come in.
|
|
17
|
+
*
|
|
18
|
+
* An offset is how a page says *where* a section sits, not just how wide it
|
|
19
|
+
* is: a half-width list pushed to the right half, a metric centred by a
|
|
20
|
+
* quarter on each side, a third-width card in the middle column. `quarter`
|
|
21
|
+
* exists only here — it is not a useful width, but it is exactly half of
|
|
22
|
+
* what centres a half. */
|
|
23
|
+
export type SectionOffset = 'quarter' | 'third' | 'half' | 'two-thirds';
|
|
24
|
+
export declare const OFFSETS: readonly SectionOffset[];
|
|
25
|
+
/**
|
|
26
|
+
* How many columns a group of fields is laid out in.
|
|
27
|
+
*
|
|
28
|
+
* Absent means fit: as many columns as the section is wide enough for, which
|
|
29
|
+
* is the right answer for a page nobody has arranged. A number is somebody
|
|
30
|
+
* saying otherwise — and once they have, the layout must not reflow behind
|
|
31
|
+
* them, because the point of arranging fields is that they stay arranged.
|
|
32
|
+
*/
|
|
33
|
+
export type FieldColumns = 1 | 2 | 3;
|
|
34
|
+
export type SectionRegion = 'main' | 'aside';
|
|
35
|
+
export declare const SECTION_REGIONS: readonly SectionRegion[];
|
|
36
|
+
export declare const FIELD_COLUMNS: readonly FieldColumns[];
|
|
37
|
+
/**
|
|
38
|
+
* The base record's own fields, or a to-one reference's, pulled inline.
|
|
39
|
+
*
|
|
40
|
+
* More than one of these is a page with its fields *grouped*: a record with
|
|
41
|
+
* forty columns is not one list, it is "the identity", "the money" and "the
|
|
42
|
+
* dates", and a form that says so is readable where a forty-row grid is not.
|
|
43
|
+
* `paths` is ordered, and the order is the layout — fields fill the columns
|
|
44
|
+
* left to right, so moving a field between columns is moving it in the list.
|
|
45
|
+
*/
|
|
46
|
+
export interface ResolvedWorkflowStatus {
|
|
47
|
+
field: string;
|
|
48
|
+
steps: Array<{
|
|
49
|
+
value: string;
|
|
50
|
+
label: string;
|
|
51
|
+
}>;
|
|
52
|
+
/** The steps are an order: those before the current one draw as passed. The author's statement, not a history. */
|
|
53
|
+
ordered?: true;
|
|
54
|
+
}
|
|
55
|
+
export interface PageFields {
|
|
56
|
+
kind: 'fields';
|
|
57
|
+
region?: SectionRegion;
|
|
58
|
+
/** The tab of the record's section strip this section is drawn in; sections sharing a name share a panel. */
|
|
59
|
+
tab?: string;
|
|
60
|
+
title?: string;
|
|
61
|
+
/** Paths relative to the root. Empty means "whatever the schema suggests". */
|
|
62
|
+
paths?: string[];
|
|
63
|
+
width?: SectionWidth;
|
|
64
|
+
/** Empty space to the left / right of this section. */
|
|
65
|
+
offsetLeft?: SectionOffset;
|
|
66
|
+
offsetRight?: SectionOffset;
|
|
67
|
+
hidden?: boolean;
|
|
68
|
+
/** Shown only when the root record matches this condition, in the query
|
|
69
|
+
language: "status = converted". Judged against the base table. */
|
|
70
|
+
when?: string;
|
|
71
|
+
/** Fixed number of columns. Absent fits the section's width. */
|
|
72
|
+
columns?: FieldColumns;
|
|
73
|
+
/**
|
|
74
|
+
* Show each reference as the record it names — "Waikato Freight", not
|
|
75
|
+
* `110` — fetched as one more joined column per reference. Honoured only
|
|
76
|
+
* in app mode: the workbench reads ids, because ids are the truth and
|
|
77
|
+
* this is a reading of them. On by default in app mode; false opts out.
|
|
78
|
+
*/
|
|
79
|
+
names?: boolean;
|
|
80
|
+
/** `summary`: compact properties.
|
|
81
|
+
`headline`: the first field as a large figure, the rest a row of facts, with `actions` beside.
|
|
82
|
+
`facts`: the values alone in one line, each after a dot — "2019 · 85,780 mi · Electric" — their
|
|
83
|
+
captions kept for assistive technology. `table`: a sheet of caption and value rows, empty values left out.
|
|
84
|
+
`properties`: the record form's property rail — caption beside value, a hairline between rows, every
|
|
85
|
+
field kept (an empty one is where a value is set) and editable in place where the record may change. */
|
|
86
|
+
presentation?: 'summary' | 'headline' | 'facts' | 'table' | 'properties' | 'card' | 'header';
|
|
87
|
+
/** `fields`: each property is picked or typed in place; where the reader may not write the column, an action of theirs that sets it is offered as the picker. */
|
|
88
|
+
edit?: true;
|
|
89
|
+
/** `header`: the record's head as the author says it (a `header` section, DSL `header({ … })`), drawn in the head wherever it is
|
|
90
|
+
written — `paths` are its facts line, `status` the column whose tone is the chip beside the name. */
|
|
91
|
+
status?: string;
|
|
92
|
+
/** `header`: the fact path → the word said after its value ("3 beds") or before it ("Born …"), a card fact's `{ column, after }` or `{ column, before }`.
|
|
93
|
+
The page's reading of the header's facts, not authored: an App writes the word in `facts` itself,
|
|
94
|
+
`header({ facts: [{ column: 'steps', after: 'step' }] })`, and `header` refuses `factLabels`. */
|
|
95
|
+
factLabels?: Record<string, import('./appCards.js').FactLabel>;
|
|
96
|
+
/** `header`: the id of the one action drawn filled; else the first that is not destructive. */
|
|
97
|
+
primary?: string;
|
|
98
|
+
/** `header`: action ids drawn last and quiet, never as the filled button. Update actions that ask for a
|
|
99
|
+
confirmation, or set a value the display tones call bad, are destructive without being named. */
|
|
100
|
+
destructive?: string[];
|
|
101
|
+
/** `header`: the action ids the head draws, in order; the rest of the record's verbs are in More. */
|
|
102
|
+
headerActions?: string[];
|
|
103
|
+
workflow?: ResolvedWorkflowStatus;
|
|
104
|
+
/** A headline's calls to action, each opening one of the App's views. */
|
|
105
|
+
actions?: PageHeadlineAction[];
|
|
106
|
+
/** A headline's second figure, under the first and smaller: an estimate, a unit price. */
|
|
107
|
+
subfigure?: string;
|
|
108
|
+
/** A headline's earlier value of its figure — a was-price — struck through beside it when it has one above the figure. */
|
|
109
|
+
was?: string;
|
|
110
|
+
/** A headline's line of small print under its actions: what the figures assume. */
|
|
111
|
+
note?: string;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* A call to action on a headline: the landing's shape, a label and the key of
|
|
115
|
+
* one of the App's views. A form's inputs may start filled: `prefill` from
|
|
116
|
+
* this record's fields (input → field path), `defaults` with the author's text.
|
|
117
|
+
* They are where the form starts, never what it sends: the reader sees and may
|
|
118
|
+
* change them, and the command checks them as it checks anything typed.
|
|
119
|
+
*/
|
|
120
|
+
export type PageHeadlineAction = {
|
|
121
|
+
label: string;
|
|
122
|
+
to: import('./appLinks.js').AppTarget;
|
|
123
|
+
intent?: 'primary' | 'secondary';
|
|
124
|
+
open?: never;
|
|
125
|
+
prefill?: never;
|
|
126
|
+
defaults?: never;
|
|
127
|
+
} | {
|
|
128
|
+
label: string;
|
|
129
|
+
view: string;
|
|
130
|
+
intent?: 'primary' | 'secondary';
|
|
131
|
+
prefill?: Record<string, string>;
|
|
132
|
+
defaults?: Record<string, string>;
|
|
133
|
+
/** `'modal'` opens a form (public, or a signed-in form view) over the record instead of navigating to
|
|
134
|
+
it. The record is the reason the form is being filled in — a price, a
|
|
135
|
+
photograph, a mileage — and sending someone to a page of their own to
|
|
136
|
+
ask about it takes the thing they were looking at away. The address
|
|
137
|
+
still works: the link is a link, and a new tab or a middle click opens
|
|
138
|
+
the form's own page. Absent means the page. */
|
|
139
|
+
open?: 'modal';
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* One number about a relationship.
|
|
143
|
+
*
|
|
144
|
+
* `count` needs no column; everything else does — "sum of work_order" is not
|
|
145
|
+
* a question, and the failure to say which column is the mistake worth
|
|
146
|
+
* catching at parse time rather than at query time.
|
|
147
|
+
*/
|
|
148
|
+
export interface PageMetric {
|
|
149
|
+
kind: 'metric';
|
|
150
|
+
region?: SectionRegion;
|
|
151
|
+
/** The tab of the record's section strip this section is drawn in; sections sharing a name share a panel. */
|
|
152
|
+
tab?: string;
|
|
153
|
+
title?: string;
|
|
154
|
+
fn: 'count' | 'sum' | 'min' | 'max' | 'avg';
|
|
155
|
+
/**
|
|
156
|
+
* The table being summarised and how it reaches the root, exactly as a list
|
|
157
|
+
* says it. A metric is a list you did not want the rows of.
|
|
158
|
+
*
|
|
159
|
+
* Config spells these `from`/`whose`/`about`; the compiled PageDef keeps
|
|
160
|
+
* the field names the planner and the builder always used. parseSection is
|
|
161
|
+
* the one place the two meet.
|
|
162
|
+
*/
|
|
163
|
+
from: string;
|
|
164
|
+
path: string;
|
|
165
|
+
/**
|
|
166
|
+
* A section about a record the root points at, rather than about the root.
|
|
167
|
+
*
|
|
168
|
+
* One forward reference from the base — `site_id` on a work order — and
|
|
169
|
+
* `whose` then leads back to *that* table: "tickets at this order's site"
|
|
170
|
+
* is `{ "from": "ticket", "whose": "site_id", "about": "site_id" }`.
|
|
171
|
+
* Absent means the root itself.
|
|
172
|
+
*/
|
|
173
|
+
of?: string;
|
|
174
|
+
column?: string;
|
|
175
|
+
/** Narrows what is counted: "open orders", not "orders". */
|
|
176
|
+
filter?: string;
|
|
177
|
+
/** How the figure is said, as a dashboard metric's: `percent` (the figure is 0–100, said with %), `number`, or
|
|
178
|
+
`money` in the App's currency. Absent, a measure of one column takes that column's display rule. */
|
|
179
|
+
format?: FigureFormat;
|
|
180
|
+
/** A word said after the figure: `'of 5'`, `'days'`. */
|
|
181
|
+
unit?: string;
|
|
182
|
+
width?: SectionWidth;
|
|
183
|
+
offsetLeft?: SectionOffset;
|
|
184
|
+
offsetRight?: SectionOffset;
|
|
185
|
+
hidden?: boolean;
|
|
186
|
+
/** Shown only when the root record matches this condition, in the query
|
|
187
|
+
language: "status = converted". Judged against the base table. */
|
|
188
|
+
when?: string;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Rows related to the root.
|
|
192
|
+
*
|
|
193
|
+
* `from` is the table listed and `path` (config: `whose`) is how a row of
|
|
194
|
+
* it names the root — `customer_id` for the customer's own orders,
|
|
195
|
+
* `invoice_id.customer_id` for the lines of those orders. One hop or four,
|
|
196
|
+
* it is the same field: the walk this tool is built on, written down.
|
|
197
|
+
*/
|
|
198
|
+
/** A matched list's match: `related('Similar vehicles', 'vehicle', { same: ['body_type'], near: { price: 0.25 } })`. */
|
|
199
|
+
export interface PageSimilar {
|
|
200
|
+
/** One to four columns, each on `from` and on the page's own table, whose value a listed row shares with the record. */
|
|
201
|
+
same: string[];
|
|
202
|
+
/** Up to two numeric columns, each within ± this fraction of the record's value: 0.25 is ±25%.
|
|
203
|
+
The first is also the order: closest first. */
|
|
204
|
+
near?: Record<string, number>;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* A related list read as groups: one header for each record (or value) its rows point at through `by`, and that group's
|
|
208
|
+
* rows under it, a page of groups at a time. One level only — the second level of a chain is a fact on the header.
|
|
209
|
+
*/
|
|
210
|
+
export declare const GROUP_ROWS_MOST = 50;
|
|
211
|
+
export declare const GROUP_ROWS_DEFAULT = 5;
|
|
212
|
+
export declare const GROUPS_MOST = 10;
|
|
213
|
+
export declare const GROUPS_DEFAULT = 5;
|
|
214
|
+
export interface PageGroup {
|
|
215
|
+
/** A path from the listed rows to the record (or column) they are grouped under: `estimate_id`. */
|
|
216
|
+
by: string;
|
|
217
|
+
/** Columns of the grouped record, said in the header as facts. Only where `by` ends at a reference. */
|
|
218
|
+
show?: string[];
|
|
219
|
+
/** The groups' order, on the grouped record's own columns: `created_on desc`. Absent, the largest group first. */
|
|
220
|
+
sort?: {
|
|
221
|
+
column: string;
|
|
222
|
+
direction: 'asc' | 'desc';
|
|
223
|
+
};
|
|
224
|
+
/** Groups to a page; `PageList.limit` is the rows to a group. */
|
|
225
|
+
limit?: number;
|
|
226
|
+
/** What the group of rows with no value is called, where "No <the column>" would not do ('Backlog'). */
|
|
227
|
+
empty?: string;
|
|
228
|
+
/** One or two numeric columns, rollups or computed numbers of the listed rows, summed over every row of each group
|
|
229
|
+
and said in its header after the count. Unlike `PageList.totals` it works beside a `query`. */
|
|
230
|
+
sum?: string[];
|
|
231
|
+
}
|
|
232
|
+
export interface PageList {
|
|
233
|
+
kind: 'list';
|
|
234
|
+
sizing?: TableSizing;
|
|
235
|
+
/** `gallery`: a related list of image files drawn as a lead photo and thumbnails.
|
|
236
|
+
`card`: the one current row (limit 1, chosen by the filter and sort) as a card.
|
|
237
|
+
A cards object: the rows as cards, in the list view's own cards grammar. */
|
|
238
|
+
presentation?: 'gallery' | 'card' | import('./appCards.js').AppCardsList | import('./appComponents.js').CustomListPresentation;
|
|
239
|
+
/** An embedded list view's board or calendar (`embed(view)`, appPages.ts): the page draws it as the view does,
|
|
240
|
+
narrowed to the record. Never authored on a related list, so it is no `presentation` (which the parser governs). */
|
|
241
|
+
lanes?: import('./listPresentations.js').AppBoardList | import('./listPresentations.js').AppCalendarList;
|
|
242
|
+
/** Rows matched on the record's own values rather than through a reference: `related(title, from, { same, near })`.
|
|
243
|
+
The record itself is left out when `from` is the page's own table. Such a list has no `path` (it is ''):
|
|
244
|
+
its rows are not the record's children. */
|
|
245
|
+
similar?: PageSimilar;
|
|
246
|
+
/**
|
|
247
|
+
* Written as `embed(view, { whose })`: the key of the App list view this
|
|
248
|
+
* section draws, its rows narrowed to those pointing at the record. The
|
|
249
|
+
* App's loader copies the view's table, show, query, sort and cards into
|
|
250
|
+
* this list (appPages.ts, resolvePageEmbeds) — the related list is the one
|
|
251
|
+
* drawing, so an embed and a related list cannot come to disagree — and
|
|
252
|
+
* keeps the key, so the section says where it came from and its heading
|
|
253
|
+
* opens the view's room. `from` stays empty until then.
|
|
254
|
+
*/
|
|
255
|
+
view?: string;
|
|
256
|
+
region?: SectionRegion;
|
|
257
|
+
/** The tab of the record's section strip this section is drawn in; sections sharing a name share a panel. */
|
|
258
|
+
tab?: string;
|
|
259
|
+
title?: string;
|
|
260
|
+
from: string;
|
|
261
|
+
path: string;
|
|
262
|
+
create?: RelatedCreate<string>;
|
|
263
|
+
empty?: AppListEmpty;
|
|
264
|
+
/** Authored `empty: 'hide' | 'collapse'` (or the page's): the section is left out while it has no rows, or said in one
|
|
265
|
+
line with the other empty lists, rather than drawn empty. Where the reader may add a row, 'hide' collapses. */
|
|
266
|
+
emptyMode?: 'hide' | 'collapse';
|
|
267
|
+
/** Authored `group`: the rows under a header for each record they share, `limit` becoming the rows to a group. */
|
|
268
|
+
group?: PageGroup;
|
|
269
|
+
/** Numeric columns, rollups or computed numbers of `from` summed in one ruled footer row, over every row that points at the record. */
|
|
270
|
+
totals?: string[];
|
|
271
|
+
/** A ⋯ menu at the end of each row with the row's own actions and verbs, as its page offers them. */
|
|
272
|
+
rowActions?: true;
|
|
273
|
+
/** Authored `create: false`: no Add, where the reader could otherwise add a row from the list. */
|
|
274
|
+
noCreate?: true;
|
|
275
|
+
/** Authored `actions`: the page record's own verbs, by id, drawn in this list's head and not in the record's. */
|
|
276
|
+
listActions?: string[];
|
|
277
|
+
/** As on a metric: this list is about the record `of` reaches, not the root. */
|
|
278
|
+
of?: string;
|
|
279
|
+
/** Columns of `from` to show. Empty means a sensible default. */
|
|
280
|
+
columns?: string[];
|
|
281
|
+
/** Column path → the app's word for it, for the show entries that
|
|
282
|
+
carried a label ({ column, label }); `columns` stays the bare paths
|
|
283
|
+
the planner reads. */
|
|
284
|
+
labels?: Record<string, string>;
|
|
285
|
+
/** Extra narrowing, in the query language, resolved against `from`. */
|
|
286
|
+
filter?: string;
|
|
287
|
+
limit?: number;
|
|
288
|
+
orderBy?: Array<{
|
|
289
|
+
column: string;
|
|
290
|
+
direction: 'asc' | 'desc';
|
|
291
|
+
}>;
|
|
292
|
+
width?: SectionWidth;
|
|
293
|
+
offsetLeft?: SectionOffset;
|
|
294
|
+
offsetRight?: SectionOffset;
|
|
295
|
+
/**
|
|
296
|
+
* Kept in the page and not drawn.
|
|
297
|
+
*
|
|
298
|
+
* Removing a section throws away the columns, the order and the filter that
|
|
299
|
+
* were chosen for it; hiding it keeps all of that and stops showing it,
|
|
300
|
+
* which is what someone means by "not on this page for now". It is also how
|
|
301
|
+
* a page arrives at a short form without anyone having to rebuild the long
|
|
302
|
+
* one to get it back.
|
|
303
|
+
*/
|
|
304
|
+
hidden?: boolean;
|
|
305
|
+
/** Shown only when the root record matches this condition, in the query
|
|
306
|
+
language: "status = converted". Judged against the base table. */
|
|
307
|
+
when?: string;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Grouped counts from a related table: the page's "N by status" answer.
|
|
311
|
+
*
|
|
312
|
+
* The question is the same one a list section asks — these rows, about this
|
|
313
|
+
* record — grouped instead of listed. It compiles through the breakdown
|
|
314
|
+
* machinery, which is why the page adds no query machinery of its own here
|
|
315
|
+
* either.
|
|
316
|
+
*/
|
|
317
|
+
export interface PageBreakdown {
|
|
318
|
+
kind: 'breakdown';
|
|
319
|
+
region?: SectionRegion;
|
|
320
|
+
/** The tab of the record's section strip this section is drawn in; sections sharing a name share a panel. */
|
|
321
|
+
tab?: string;
|
|
322
|
+
title?: string;
|
|
323
|
+
from: string;
|
|
324
|
+
path: string;
|
|
325
|
+
/** As on a metric: this breakdown is about the record `of` reaches. */
|
|
326
|
+
of?: string;
|
|
327
|
+
/** What to group by: a column of `from`, or a dotted path ending in one. */
|
|
328
|
+
by: string;
|
|
329
|
+
/** What each bar measures, the dashboard's words read into fn and column: absent is a count.
|
|
330
|
+
A sum may read a rollup of `from` (rollups.ts): a supplier's open value by warehouse. */
|
|
331
|
+
fn?: 'count' | 'sum' | 'min' | 'max' | 'avg';
|
|
332
|
+
column?: string;
|
|
333
|
+
/** Extra narrowing, in the query language, resolved against `from`. */
|
|
334
|
+
filter?: string;
|
|
335
|
+
/** Groups shown, biggest first. */
|
|
336
|
+
limit?: number;
|
|
337
|
+
/** How each figure is said, as a metric's: `percent` (0–100), `number` or `money`; and a word after it. */
|
|
338
|
+
format?: FigureFormat;
|
|
339
|
+
unit?: string;
|
|
340
|
+
width?: SectionWidth;
|
|
341
|
+
offsetLeft?: SectionOffset;
|
|
342
|
+
offsetRight?: SectionOffset;
|
|
343
|
+
hidden?: boolean;
|
|
344
|
+
/** Shown only when the root record matches this condition, in the query
|
|
345
|
+
language: "status = converted". Judged against the base table. */
|
|
346
|
+
when?: string;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* The same related rows, measured and drawn: a line over a bucketed key
|
|
350
|
+
* ("month issued_on"), a donut over categories, or stacked bars over two
|
|
351
|
+
* keys. It is the dashboard's chart about one record — the question a
|
|
352
|
+
* breakdown section asks, with a measure and a shape — and it compiles
|
|
353
|
+
* through the same breakdown plan, so it adds no query machinery.
|
|
354
|
+
*/
|
|
355
|
+
export interface PageChart {
|
|
356
|
+
kind: 'chart';
|
|
357
|
+
region?: SectionRegion;
|
|
358
|
+
/** The tab of the record's section strip this section is drawn in; sections sharing a name share a panel. */
|
|
359
|
+
tab?: string;
|
|
360
|
+
title?: string;
|
|
361
|
+
from: string;
|
|
362
|
+
path: string;
|
|
363
|
+
/** As on a metric: this chart is about the record `of` reaches. */
|
|
364
|
+
of?: string;
|
|
365
|
+
/** What to group by, in the breakdown grammar: "status", "month issued_on", or two keys for stacked bars. */
|
|
366
|
+
by: string;
|
|
367
|
+
/** The dashboard's words, read into fn and column: absent is a count. */
|
|
368
|
+
fn: 'count' | 'sum' | 'min' | 'max' | 'avg';
|
|
369
|
+
column?: string;
|
|
370
|
+
/** "line" (the default), "bar", "donut" or "stacked", as on a dashboard chart. */
|
|
371
|
+
shape?: 'line' | 'bar' | 'donut' | 'stacked';
|
|
372
|
+
/** The order of a bar chart's or donut's categories: 'value' (largest first), 'category' (the key's own order), or a
|
|
373
|
+
column of `from` with a direction, as a list's sort ("starts_on", "ended_on desc"). Absent, a category with an
|
|
374
|
+
order of its own keeps it (see chartOrder, page.ts) and any other goes by value. */
|
|
375
|
+
sort?: string;
|
|
376
|
+
/** Extra narrowing, in the query language, resolved against `from`. */
|
|
377
|
+
filter?: string;
|
|
378
|
+
/** Groups drawn: a donut's slices, a stacked chart's bars. */
|
|
379
|
+
limit?: number;
|
|
380
|
+
/** The drawing's height in CSS pixels (120 or more). */
|
|
381
|
+
height?: number;
|
|
382
|
+
/** A goal ruled across a line or stacked bars. */
|
|
383
|
+
target?: number;
|
|
384
|
+
/** How each figure is said, as a metric's: `percent` (0–100), `number` or `money`; and a word after it. */
|
|
385
|
+
format?: FigureFormat;
|
|
386
|
+
unit?: string;
|
|
387
|
+
width?: SectionWidth;
|
|
388
|
+
offsetLeft?: SectionOffset;
|
|
389
|
+
offsetRight?: SectionOffset;
|
|
390
|
+
hidden?: boolean;
|
|
391
|
+
/** Shown only when the root record matches this condition, in the query
|
|
392
|
+
language: "status = converted". Judged against the base table. */
|
|
393
|
+
when?: string;
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* The author speaking on a record's page: guidance, a policy, what to do
|
|
397
|
+
* next. It reads nothing, so it is the one section with no table — the
|
|
398
|
+
* dashboard's note, drawn by the same component.
|
|
399
|
+
*/
|
|
400
|
+
interface PageNote {
|
|
401
|
+
kind: 'note';
|
|
402
|
+
region?: SectionRegion;
|
|
403
|
+
/** The tab of the record's section strip this section is drawn in; sections sharing a name share a panel. */
|
|
404
|
+
tab?: string;
|
|
405
|
+
title?: string;
|
|
406
|
+
/** Plain text; blank lines separate paragraphs. */
|
|
407
|
+
text: string;
|
|
408
|
+
/** `quiet`: small print, no mark. `callout`: a ground of its own. Absent: the plain note. */
|
|
409
|
+
variant?: 'quiet' | 'callout';
|
|
410
|
+
icon?: import('./appIcons.js').AppIconName;
|
|
411
|
+
/** One of the App's list or dashboard views to open. An App page only. */
|
|
412
|
+
action?: import('./appLinks.js').AppLinkAction;
|
|
413
|
+
width?: SectionWidth;
|
|
414
|
+
offsetLeft?: SectionOffset;
|
|
415
|
+
offsetRight?: SectionOffset;
|
|
416
|
+
hidden?: boolean;
|
|
417
|
+
/** Shown only when the root record matches this condition, in the query
|
|
418
|
+
language: "status = converted". Judged against the base table. */
|
|
419
|
+
when?: string;
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* One stream of a timeline: dated child rows of the root, one line each.
|
|
423
|
+
* The activity-feed shape — notes, calls, status changes — merged with
|
|
424
|
+
* its sibling streams by date.
|
|
425
|
+
*/
|
|
426
|
+
export interface TimelineStream {
|
|
427
|
+
from: string;
|
|
428
|
+
/** As on a list: the path from `from` back to the record. Config: `whose`. */
|
|
429
|
+
path: string;
|
|
430
|
+
/** The date column the stream is ordered and merged by. */
|
|
431
|
+
at: string;
|
|
432
|
+
/** The line itself: a column of `from`, or a dotted path. */
|
|
433
|
+
show: string;
|
|
434
|
+
/** A quieter second word — a kind, an author. */
|
|
435
|
+
detail?: string;
|
|
436
|
+
/** Who wrote it: a column of `from`, or a dotted path — said beside its date. */
|
|
437
|
+
by?: string;
|
|
438
|
+
/** Extra narrowing, in the query language, resolved against `from`. */
|
|
439
|
+
filter?: string;
|
|
440
|
+
/** The record's reference this stream is about, as a list's `about`: `path` then leads to the row it names (a
|
|
441
|
+
deal's company), so a timeline reaches that row's other children (the company's tickets). Config: `about`. */
|
|
442
|
+
of?: string;
|
|
443
|
+
/** This stream's own far side, in place of the section's: a condition over its rows (timelineSides, page.ts). */
|
|
444
|
+
side?: string;
|
|
445
|
+
/** Every row of this stream in this tone, in place of the section's `tone` rules. */
|
|
446
|
+
tone?: TimelineTone;
|
|
447
|
+
/** Every row of this stream drawn as one line, in place of the section's `compact` rules. */
|
|
448
|
+
compact?: true;
|
|
449
|
+
}
|
|
450
|
+
/** Every `about` a page's sections and streams name, once each: the referenced rows the planner reads first. */
|
|
451
|
+
export declare function pageAbouts(page: {
|
|
452
|
+
sections: readonly PageSection[];
|
|
453
|
+
}): string[];
|
|
454
|
+
/** Dated child rows from several tables, merged into one stream. */
|
|
455
|
+
export interface PageTimeline {
|
|
456
|
+
kind: 'timeline';
|
|
457
|
+
region?: SectionRegion;
|
|
458
|
+
/** The tab of the record's section strip this section is drawn in; sections sharing a name share a panel. */
|
|
459
|
+
tab?: string;
|
|
460
|
+
title?: string;
|
|
461
|
+
streams: TimelineStream[];
|
|
462
|
+
/** Per stream, before the merge. */
|
|
463
|
+
limit?: number;
|
|
464
|
+
/** A composer: adds a row of the first stream, bound to this record. */
|
|
465
|
+
create?: RelatedCreate<string>;
|
|
466
|
+
/** `'last'`: oldest first, the newest at the foot, the section scrolled to it. Absent: newest first. */
|
|
467
|
+
newest?: 'last';
|
|
468
|
+
/** A conversation's pinned composer at the foot: the commands a Reply and an Internal note run, by name. */
|
|
469
|
+
composer?: TimelineComposer;
|
|
470
|
+
/** A row's tone by one of its columns' values: `{ kind: { internal: 'warn' } }`, a display tone. Read on each stream
|
|
471
|
+
whose table has the column and that says no `tone` of its own (timelineMarkColumns). */
|
|
472
|
+
tone?: Record<string, Record<string, TimelineTone>>;
|
|
473
|
+
/** Rows drawn as one line, by one of their columns' values: `{ kind: ['system'] }`. Read as `tone` is. */
|
|
474
|
+
compact?: Record<string, string[]>;
|
|
475
|
+
/** The other party's rows, drawn at the far edge: a condition over each stream's rows in the query language, where
|
|
476
|
+
`record.<column>` is the page's record — `author_id = record.caller_id`. A stream whose table lacks a column it
|
|
477
|
+
names is never on the far side; a stream's own `side` replaces it (timelineSides, page.ts). */
|
|
478
|
+
side?: string;
|
|
479
|
+
width?: SectionWidth;
|
|
480
|
+
offsetLeft?: SectionOffset;
|
|
481
|
+
offsetRight?: SectionOffset;
|
|
482
|
+
hidden?: boolean;
|
|
483
|
+
/** Shown only when the root record matches this condition, in the query
|
|
484
|
+
language: "status = converted". Judged against the base table. */
|
|
485
|
+
when?: string;
|
|
486
|
+
}
|
|
487
|
+
/** The tones a timeline row may be tinted: the display tones' words. */
|
|
488
|
+
export type TimelineTone = 'good' | 'warn' | 'bad' | 'info' | 'neutral';
|
|
489
|
+
/** The commands a conversation's composer runs: a Reply and, beside it, an Internal note. Each is offered to the reader by an action of the page's resource. */
|
|
490
|
+
export interface TimelineComposer {
|
|
491
|
+
reply: string;
|
|
492
|
+
note?: string;
|
|
493
|
+
/** Canned replies: a resource's rows, picked by one column, the other filling the box. */
|
|
494
|
+
/** `query` narrows the rows offered (a retired response is readable, and not offered). */
|
|
495
|
+
templates?: {
|
|
496
|
+
from: string;
|
|
497
|
+
labelColumn: string;
|
|
498
|
+
text: string;
|
|
499
|
+
query?: string;
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* The columns a timeline's tone and compact rules read. Given a stream and its table, those its rows carry: a rule is
|
|
504
|
+
* read on each stream whose table has its column, as `side` is, and not on one that says its own `tone` or `compact`
|
|
505
|
+
*, so time logged need not carry a `kind` only so a rule can name it. Without a stream, every rule's column.
|
|
506
|
+
*/
|
|
507
|
+
export declare function timelineMarkColumns(section: {
|
|
508
|
+
tone?: Record<string, unknown>;
|
|
509
|
+
compact?: Record<string, unknown>;
|
|
510
|
+
}, stream?: {
|
|
511
|
+
tone?: unknown;
|
|
512
|
+
compact?: unknown;
|
|
513
|
+
}, table?: {
|
|
514
|
+
columns: ReadonlyArray<{
|
|
515
|
+
name: string;
|
|
516
|
+
}>;
|
|
517
|
+
}): string[];
|
|
518
|
+
/**
|
|
519
|
+
* A timeline's `side` as one stream asks it: `record.<column>` is the page's record, reached by the stream's own way
|
|
520
|
+
* back to it, so `author_id = record.caller_id` over a stream `whose: 'ticket_id'` is `author_id =
|
|
521
|
+
* ticket_id.caller_id` — one condition the query language already reads, run where the stream's rows are read.
|
|
522
|
+
* Undefined where the stream's rows lead to another row (`about`), which has no way back to the record.
|
|
523
|
+
*/
|
|
524
|
+
export declare function timelineSide(side: string, stream: {
|
|
525
|
+
path: string;
|
|
526
|
+
of?: string;
|
|
527
|
+
}): string | undefined;
|
|
528
|
+
/** How many streams one timeline is allowed to merge. */
|
|
529
|
+
export declare const MAX_STREAMS = 4;
|
|
530
|
+
/**
|
|
531
|
+
* The record's own change history: each write that changed it, newest first,
|
|
532
|
+
* with who made it, when, the action or command it came from, and each field
|
|
533
|
+
* from what to what. Declaring one is what makes its resource keep a history
|
|
534
|
+
* (server/recordHistory.ts); nothing is read from `from` because the record's
|
|
535
|
+
* history is its own.
|
|
536
|
+
*/
|
|
537
|
+
interface PageHistory {
|
|
538
|
+
kind: 'history';
|
|
539
|
+
region?: SectionRegion;
|
|
540
|
+
/** The tab of the record's section strip this section is drawn in; sections sharing a name share a panel. */
|
|
541
|
+
tab?: string;
|
|
542
|
+
title?: string;
|
|
543
|
+
/** Writes shown before "Show earlier changes", 1 to 100. Default 8. */
|
|
544
|
+
limit?: number;
|
|
545
|
+
width?: SectionWidth;
|
|
546
|
+
offsetLeft?: SectionOffset;
|
|
547
|
+
offsetRight?: SectionOffset;
|
|
548
|
+
hidden?: boolean;
|
|
549
|
+
/** Shown only when the root record matches this condition, in the query
|
|
550
|
+
language: "status = converted". Judged against the base table. */
|
|
551
|
+
when?: string;
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* The record's row-driven flow runs: each run's state, its steps and
|
|
555
|
+
* what it waits for. Read through its own route (server/recordFlows.ts); the
|
|
556
|
+
* base resource must declare `flows`, and nothing here makes it keep a history.
|
|
557
|
+
*/
|
|
558
|
+
interface PageFlows {
|
|
559
|
+
kind: 'flows';
|
|
560
|
+
region?: SectionRegion;
|
|
561
|
+
/** The tab of the record's section strip this section is drawn in; sections sharing a name share a panel. */
|
|
562
|
+
tab?: string;
|
|
563
|
+
title?: string;
|
|
564
|
+
width?: SectionWidth;
|
|
565
|
+
offsetLeft?: SectionOffset;
|
|
566
|
+
offsetRight?: SectionOffset;
|
|
567
|
+
hidden?: boolean;
|
|
568
|
+
/** Shown only when the root record matches this condition, in the query
|
|
569
|
+
language: "status = converted". Judged against the base table. */
|
|
570
|
+
when?: string;
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* A flow drawn from its step rows: each position a column, the steps that
|
|
574
|
+
* share one its lanes, a branch's other way to its `goto`. On a flow's own
|
|
575
|
+
* page (its base the `from` table of a resource's `flows`) it draws the flow;
|
|
576
|
+
* on the page of a resource with `flows`, the record's run over its flow's
|
|
577
|
+
* steps. The steps are read like any of the reader's rows, when it is drawn.
|
|
578
|
+
*/
|
|
579
|
+
interface PageDiagram {
|
|
580
|
+
kind: 'diagram';
|
|
581
|
+
region?: SectionRegion;
|
|
582
|
+
/** The tab of the record's section strip this section is drawn in; sections sharing a name share a panel. */
|
|
583
|
+
tab?: string;
|
|
584
|
+
title?: string;
|
|
585
|
+
width?: SectionWidth;
|
|
586
|
+
offsetLeft?: SectionOffset;
|
|
587
|
+
offsetRight?: SectionOffset;
|
|
588
|
+
hidden?: boolean;
|
|
589
|
+
/** Shown only when the root record matches this condition, in the query
|
|
590
|
+
language: "status = converted". Judged against the base table. */
|
|
591
|
+
when?: string;
|
|
592
|
+
}
|
|
593
|
+
/** The most writes one history section shows before asking for more. */
|
|
594
|
+
export declare const MAX_HISTORY_LIMIT = 100;
|
|
595
|
+
/** Writes a history section shows before "Show earlier changes" when its `limit` says none. */
|
|
596
|
+
export declare const DEFAULT_HISTORY_LIMIT = 8;
|
|
597
|
+
/**
|
|
598
|
+
* An author's own component, drawn where a section stands: the record's
|
|
599
|
+
* declared fields and its declared reads of rows are planned here like any
|
|
600
|
+
* list, and the module only draws what it is handed (appComponents.ts).
|
|
601
|
+
*/
|
|
602
|
+
export interface PageCustom {
|
|
603
|
+
kind: 'custom';
|
|
604
|
+
region?: SectionRegion;
|
|
605
|
+
tab?: string;
|
|
606
|
+
title?: string;
|
|
607
|
+
component: import('./appComponents.js').ComponentDecl;
|
|
608
|
+
/** The record's own fields the component reads, label paths welcome. */
|
|
609
|
+
record?: string[];
|
|
610
|
+
/** Named reads of rows, each planned as a list (config `rows`). */
|
|
611
|
+
reads?: Record<string, import('./appComponents.js').PageCustomRead>;
|
|
612
|
+
/** Named aggregate reads, each planned as a breakdown (config `totals`, kept apart from a list's `totals` columns): exact figures, not counts of loaded rows. */
|
|
613
|
+
aggregates?: Record<string, import('./appComponents.js').PageCustomTotal>;
|
|
614
|
+
/** The component's props, checked against its declaration, defaults filled. */
|
|
615
|
+
props?: Record<string, unknown>;
|
|
616
|
+
width?: SectionWidth;
|
|
617
|
+
offsetLeft?: SectionOffset;
|
|
618
|
+
offsetRight?: SectionOffset;
|
|
619
|
+
hidden?: boolean;
|
|
620
|
+
when?: string;
|
|
621
|
+
}
|
|
622
|
+
export type PageSection = PageFields | PageMetric | PageList | PageBreakdown | PageChart | PageNote | PageTimeline | PageHistory | PageFlows | PageDiagram | PageCustom;
|
|
623
|
+
/** What a section kind is, wherever a rule differs by kind: one row per kind, so a new kind is a compile error here and nowhere else forgets it. */
|
|
624
|
+
export interface SectionTraits {
|
|
625
|
+
/** What a page's plan reads for it: `none`, nothing (a note, or what its own route answers — a history, flow runs, a
|
|
626
|
+
diagram's steps); `record`, the root record's own fields, read with the root; `rows`, related rows, planned as
|
|
627
|
+
views or breakdowns (pagePlans.ts). */
|
|
628
|
+
reads: 'none' | 'record' | 'rows';
|
|
629
|
+
/** Whether it walks a path from the root to a related table — its own `from` and `path`, or each stream's — so the
|
|
630
|
+
root row carries the keys the path starts from. A custom section's reads are declared, not walked. */
|
|
631
|
+
relation: boolean;
|
|
632
|
+
}
|
|
633
|
+
/** Every section kind's traits (SectionTraits). The union is closed: a kind is added here, with its row. */
|
|
634
|
+
export declare const SECTION_TRAITS: {
|
|
635
|
+
readonly fields: {
|
|
636
|
+
readonly reads: 'record';
|
|
637
|
+
readonly relation: false;
|
|
638
|
+
};
|
|
639
|
+
readonly metric: {
|
|
640
|
+
readonly reads: 'rows';
|
|
641
|
+
readonly relation: true;
|
|
642
|
+
};
|
|
643
|
+
readonly list: {
|
|
644
|
+
readonly reads: 'rows';
|
|
645
|
+
readonly relation: true;
|
|
646
|
+
};
|
|
647
|
+
readonly breakdown: {
|
|
648
|
+
readonly reads: 'rows';
|
|
649
|
+
readonly relation: true;
|
|
650
|
+
};
|
|
651
|
+
readonly chart: {
|
|
652
|
+
readonly reads: 'rows';
|
|
653
|
+
readonly relation: true;
|
|
654
|
+
};
|
|
655
|
+
readonly note: {
|
|
656
|
+
readonly reads: 'none';
|
|
657
|
+
readonly relation: false;
|
|
658
|
+
};
|
|
659
|
+
readonly timeline: {
|
|
660
|
+
readonly reads: 'rows';
|
|
661
|
+
readonly relation: true;
|
|
662
|
+
};
|
|
663
|
+
readonly history: {
|
|
664
|
+
readonly reads: 'none';
|
|
665
|
+
readonly relation: false;
|
|
666
|
+
};
|
|
667
|
+
readonly flows: {
|
|
668
|
+
readonly reads: 'none';
|
|
669
|
+
readonly relation: false;
|
|
670
|
+
};
|
|
671
|
+
readonly diagram: {
|
|
672
|
+
readonly reads: 'none';
|
|
673
|
+
readonly relation: false;
|
|
674
|
+
};
|
|
675
|
+
readonly custom: {
|
|
676
|
+
readonly reads: 'rows';
|
|
677
|
+
readonly relation: false;
|
|
678
|
+
};
|
|
679
|
+
};
|
|
680
|
+
type Traits = typeof SECTION_TRAITS;
|
|
681
|
+
type KindsWhose<Trait> = {
|
|
682
|
+
[Kind in PageSection['kind']]: Traits[Kind] extends Trait ? Kind : never;
|
|
683
|
+
}[PageSection['kind']];
|
|
684
|
+
/** The section kinds that read one of these ways (SectionTraits.reads). */
|
|
685
|
+
export type KindsReading<Reads extends SectionTraits['reads']> = KindsWhose<{
|
|
686
|
+
reads: Reads;
|
|
687
|
+
}>;
|
|
688
|
+
/** Whether a section reads one of these ways (SectionTraits.reads), narrowed to the kinds that do. */
|
|
689
|
+
export declare function sectionReading<Reads extends SectionTraits['reads']>(section: PageSection, ...reads: Reads[]): section is Extract<PageSection, {
|
|
690
|
+
kind: KindsReading<Reads>;
|
|
691
|
+
}>;
|
|
692
|
+
/** Whether a section kind reads one of these ways, for a shape that is not the section union (recordReads.ts ReadSection). */
|
|
693
|
+
export declare function kindReading<Reads extends SectionTraits['reads']>(kind: PageSection['kind'], ...reads: Reads[]): kind is KindsReading<Reads>;
|
|
694
|
+
/** Whether a section walks a path from the root (SectionTraits.relation), narrowed to the kinds that do. */
|
|
695
|
+
export declare const walksRelation: (section: PageSection) => section is Extract<PageSection, {
|
|
696
|
+
kind: KindsWhose<{
|
|
697
|
+
relation: true;
|
|
698
|
+
}>;
|
|
699
|
+
}>;
|
|
700
|
+
export interface PageDef {
|
|
701
|
+
id: string;
|
|
702
|
+
name: string;
|
|
703
|
+
/** The table a root is chosen from. Every path starts here. */
|
|
704
|
+
base: string;
|
|
705
|
+
/** An App page's address after the App's, when not its id (appAddress.ts). */
|
|
706
|
+
path?: string;
|
|
707
|
+
sections: PageSection[];
|
|
708
|
+
/** The one connection this page is for, by id or name. Absent means every connection. */
|
|
709
|
+
connection?: string;
|
|
710
|
+
/** With the platform realm, whose context the page serves. Required when
|
|
711
|
+
its base is platform-owned; absent is the App's own realm, `tenant`. */
|
|
712
|
+
realm?: 'tenant' | 'platform';
|
|
713
|
+
/** An App page's: the roles that may open it, beside its table grant (appViewRoles.ts). Absent is everyone's. */
|
|
714
|
+
roles?: string[];
|
|
715
|
+
/** An App page's: the record on paper — an invoice, a packing slip — reached from its record, never opened as its page (appDocuments.ts). */
|
|
716
|
+
document?: import('./appDocuments.js').PageDocument;
|
|
717
|
+
/**
|
|
718
|
+
* Draw consecutive runs of list sections as one tab strip. On an App's
|
|
719
|
+
* page it is off unless the page says `true`: a page written in the DSL is
|
|
720
|
+
* laid out as written, and a strip made on its own swallowed the widths
|
|
721
|
+
* its author gave (`width: 'half'`). A list with a width never joins a
|
|
722
|
+
* strip. The Workbench's pages keep it on unless they say `false`,
|
|
723
|
+
* because the stack is worse at the size records actually
|
|
724
|
+
* are: six things pointing at a record is six tables down a page, the
|
|
725
|
+
* sixth a scroll away from the record it is about, and all six fetched
|
|
726
|
+
* whether or not anyone looks. As tabs it is one table deep with five
|
|
727
|
+
* names above it, and only the tab you open costs a query. This is the
|
|
728
|
+
* arrangement every record-based system converges on, and they are not
|
|
729
|
+
* wrong about it.
|
|
730
|
+
*
|
|
731
|
+
* A page-level switch rather than a flag per section: "these are tabs of
|
|
732
|
+
* each other" is a statement about a group, and a per-section flag would
|
|
733
|
+
* let someone build a page with three tab strips of one tab each. The
|
|
734
|
+
* grouping is the section order — a run of lists is a strip, and anything
|
|
735
|
+
* else between two lists splits them — which makes the builder's drag the
|
|
736
|
+
* way to decide what is a tab of what.
|
|
737
|
+
*/
|
|
738
|
+
listTabs?: boolean;
|
|
739
|
+
/** What a related list that says nothing of its own does while it has no rows (pageConfig.ts bakes it into each list's `emptyMode`). */
|
|
740
|
+
empty?: 'hide' | 'collapse';
|
|
741
|
+
/** An App's page: `false` opts out of the default aside (`defaultAside`). */
|
|
742
|
+
aside?: false;
|
|
743
|
+
/** An App's page: its archetype, the arrangement of its regions (pageLayouts.ts), as written or as its sections
|
|
744
|
+
make it (chooseLayout). Absent, or `'record'`, is the record's own. */
|
|
745
|
+
layout?: import('./pageLayouts.js').PageLayoutWord;
|
|
746
|
+
/** Why the App's page parser chose `layout` for a page that names none; absent where the author wrote it. */
|
|
747
|
+
layoutWhy?: string;
|
|
748
|
+
/** An App's record page that declares no aside: validatePage draws the record's remaining fields there
|
|
749
|
+
(pageAnatomy.ts, withDefaultAside). Set by the App's page parser, never by the Workbench's. */
|
|
750
|
+
defaultAside?: true;
|
|
751
|
+
/**
|
|
752
|
+
* Where the page came from, which is the same question as who may change
|
|
753
|
+
* it. `config` belongs to the file, `suggested` to the schema, and only
|
|
754
|
+
* `saved` is the browser's own — so only `saved` can be edited in place or
|
|
755
|
+
* deleted. The three were two for a while, with a suggested page calling
|
|
756
|
+
* itself `saved`: the builder still refused to delete it (it checked the
|
|
757
|
+
* id prefix instead), but the button that opens the builder said "Edit"
|
|
758
|
+
* when what it would do is start a copy.
|
|
759
|
+
*/
|
|
760
|
+
source?: 'config' | 'saved' | 'suggested';
|
|
761
|
+
/**
|
|
762
|
+
* Why this page cannot be used, if it cannot.
|
|
763
|
+
*
|
|
764
|
+
* Carried rather than thrown, for the same reason a view carries its error:
|
|
765
|
+
* a page naming a table this connection does not have should appear in the
|
|
766
|
+
* list *with its reason*, not vanish and leave someone hunting through a
|
|
767
|
+
* config file for the entry they are sure they wrote.
|
|
768
|
+
*/
|
|
769
|
+
error?: string;
|
|
770
|
+
}
|
|
771
|
+
/** Rows a list section shows before it needs a page of its own. */
|
|
772
|
+
export declare const DEFAULT_PAGE_LIST_LIMIT = 10;
|
|
773
|
+
/** Sections one screen of a page may draw: in each region, those in no tab and the largest tab's. A page is a
|
|
774
|
+
screen, not a report; a record's tabs are more screens of it, so they are counted one at a time. */
|
|
775
|
+
export declare const MAX_SECTIONS = 24;
|
|
776
|
+
/** Sections a page may hold in all, every tab's included. */
|
|
777
|
+
export declare const MAX_PAGE_SECTIONS = 96;
|
|
778
|
+
/** How many sections a page draws on its fullest screen: per region, those in no tab and its largest tab's. */
|
|
779
|
+
export declare function screenSections(sections: readonly {
|
|
780
|
+
region?: SectionRegion;
|
|
781
|
+
tab?: string;
|
|
782
|
+
}[]): number;
|
|
783
|
+
/** A workflow step's label when it names none: `in_review` reads "In review". */
|
|
784
|
+
export declare function workflowLabel(value: string): string;
|
|
785
|
+
export {};
|