Skip to content

Typescript migration and fixes#22

Open
jacobsjo wants to merge 4 commits into
mainfrom
typescript-migration-and-fixes
Open

Typescript migration and fixes#22
jacobsjo wants to merge 4 commits into
mainfrom
typescript-migration-and-fixes

Conversation

@jacobsjo

Copy link
Copy Markdown

TypeScript migration + modernization

  • Add a local api.ts for the bundle's domain types.
  • Mark private fields/methods, type selection events from map.apps, convert callbacks
    to async/await, and replace ct/_lang helpers with plain JS.
  • Separate the ChartingDashboardController from ChartingDashboardWidgetModel.
  • Remove dead QueryController methods (getMetadata, getRelatedMetadata,
    findRelatedRecords).

Result-ui bulk action

  • Replace the removed ResultCenterChartingTool with a result-api.BulkTableAction

Per-year charting via related tables (bug fix)

  • Fix QueryController.getRelatedData: it used apprtFetch (which returns a
    Response) with a non-existent handleAs option, so the response body was never
    parsed; switched to apprtFetchJson.
  • Quote string join keys in the where clause (AGS LIKE '05315') - unquoted string keys returned HTTP 400.
  • Fixed the sample app: Add separate Kreisgrenzen_2022 layer joined to the income layer by AGS with timeAttribute: YEAR, rendering a per-year line chart.
image

jacobsjo added 4 commits June 15, 2026 14:33
Convert all bundle sources from JavaScript to TypeScript with strong typing. Add a local api.ts for domain types and an index.d.ts for the vendored dn_charting-c3 library, derive typed i18n Messages, and apply license headers.
Separate the reactive Mutable state model from a behavior controller, mark private fields and methods, type selection events, convert to async/await, and replace ct_lang helpers with plain JS.
Fix the related-data fetch (use apprtFetchJson and quote string join keys) and demonstrate it in the sample app with a Kreisgrenzen relationship.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant