pgkiln 0.86.0 → 0.88.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/db/migrations/156_pwa_prefetch.sql +13 -0
  2. package/docs/apex-feature-parity.md +4 -4
  3. package/docs/guide/04-pages-and-regions.md +23 -4
  4. package/docs/guide/05-items.md +20 -1
  5. package/docs/guide/07-dynamic-actions.md +1 -1
  6. package/docs/guide/08-security.md +6 -2
  7. package/docs/guide/09-reference.md +1 -1
  8. package/docs/guide/11-from-apex.md +3 -0
  9. package/docs/guide/17-mobile.md +35 -4
  10. package/examples/gallery/samples/sample-dynamic-actions.sql +7 -4
  11. package/examples/gallery/samples/sample-grids.sql +9 -29
  12. package/examples/gallery/samples/ux-patterns.sql +3 -3
  13. package/examples/hr/hr_82_pwa_prefetch.sql +11 -0
  14. package/package.json +1 -1
  15. package/public/app.css +2 -0
  16. package/public/app.js +13 -0
  17. package/public/sw.js +51 -1
  18. package/src/builder/components.ts +1 -1
  19. package/src/builder/i18n/de.ts +6 -0
  20. package/src/builder/i18n/en.ts +6 -0
  21. package/src/builder/i18n/es.ts +6 -0
  22. package/src/builder/i18n/fr.ts +6 -0
  23. package/src/builder/i18n/it.ts +6 -0
  24. package/src/builder/i18n/ja.ts +6 -0
  25. package/src/builder/i18n/ko.ts +6 -0
  26. package/src/builder/i18n/nl.ts +6 -0
  27. package/src/builder/i18n/pt.ts +6 -0
  28. package/src/builder/i18n/zh-cn.ts +6 -0
  29. package/src/builder/i18n/zh-tw.ts +6 -0
  30. package/src/builder/pwa.ts +14 -3
  31. package/src/builder/region-help.ts +2 -2
  32. package/src/metadata.ts +3 -1
  33. package/src/runtime/authz.ts +7 -0
  34. package/src/runtime/grid.ts +69 -9
  35. package/src/runtime/items.ts +9 -1
  36. package/src/runtime/pwa.ts +8 -3
  37. package/src/runtime/regions.ts +16 -4
  38. package/src/runtime/routes.ts +25 -6
  39. package/src/runtime/signin.ts +5 -5
@@ -0,0 +1,13 @@
1
+ -- Sprint 168: the whole application offline from the first visit.
2
+ --
3
+ -- pwa_prefetch_hours with "Keep visited pages on the device" on: after a sign-in (or on the first page
4
+ -- opened on a device) the service worker fetches every page of the navigation menu and
5
+ -- navigation bar the user may open, and keeps them for offline use; again when the kept
6
+ -- copies are older than this many hours. Null: only the pages the user opens.
7
+ -- Prefetched pages run read-only on the server (routes.ts: X-Pgkiln-Prefetch).
8
+
9
+ alter table meta.app add column pwa_prefetch_hours integer
10
+ check (pwa_prefetch_hours between 1 and 168);
11
+
12
+ comment on column meta.app.pwa_prefetch_hours is
13
+ 'PWA: fetch every navigation page for offline use after sign-in, and again after this many hours (null: off)';
@@ -7,7 +7,7 @@ open item and open an issue or pull request; see [CONTRIBUTING.md](../CONTRIBUTI
7
7
  Legend: ✅ available · 🟡 partial (see notes) · ❌ not yet · ➖ not planned (a deliberate choice,
8
8
  or better served by the PostgreSQL ecosystem; see the notes and [extensions](guide/15-extensions.md))
9
9
 
10
- Last reviewed: 2026-11-06 against **APEX 26.2** (sprint 164: every App Builder screen in the eleven builder languages (WS-7 leftover); sprint 165: navigation menu badges from SQL, the notification bell and live badges; sprint 162: the SQL Workshop tools and the region and report settings in the eleven builder languages (CD-8); sprint 161: component events of grids, calendars, maps and trees (CD-3); sprint 160: the Workflow Diagram region, an instance's steps with the reached, current and failed ones marked (CD-7); sprint 159: map layers Lines, Polygons and Extruded Polygons with fill and line styles per layer or per row (CD-6); sprint 158: the item types Image Upload, Text Field with autocomplete, Percent Graph and Display Map (CD-5); sprint 157: the process types Close Dialog, Clear Session State, Reset Pagination, User Preferences, Server Side Geocoding, Print Report, Human Task – Create / – Manage and Form – Initialization (CD-4); sprint 156: dynamic action events double click, key down / press, mouse enter / leave, select, resize, scroll, page unload, before refresh and facets change, greater / less and not-in-list conditions, and the actions Cancel Event, Set Style, Collapse / Expand Tree, Show AI Assistant, Trigger Geocoding and Open report dialog (CD-3); sprint 155: APEX's validation types, with an authorization scheme, Always execute and the error's display location (CD-1); sprint 154: one catalogue of server-side condition types for every component, shown in words in the Page Designer (CD-2); sprint 153: Database users in the eleven builder languages (WS-7 leftover); sprint 152: Workspace utilities, the dashboard, Mail queue, Network access, Instance settings and LDAP directories in the eleven builder languages (WS-7 leftover); sprint 151: vector providers with a model in the database, PostgresML (APEX's ONNX models, AP-1 leftover); sprint 150: remote databases, another PostgreSQL database's tables as foreign tables the applications query (REST Enabled SQL, AP-7 leftover); sprint 149: running workflow instances inside parallel branches migrate to a newer version (WS-6 leftover); sprint 148: the AI assistant streams its answers as the model writes them (WS-4 leftover); sprint 147: `pgkiln advise --offline` checks an export's files without a database (AP-10 leftover); sprint 146: the Advisor checks JSON sources' views against their data profile (AP-8 leftover); sprint 145: the texts that offered AI with "Claude or OpenAI" name all four providers: Claude, OpenAI, Gemini and OpenAI-compatible services (AP-11); sprint 144: `pgkiln advise` for CI with text, JSON and SARIF output (APEXlang static analysis / SQLcl CodeScan), security checks in the Advisor, and working copies and locks from the command line and MCP (the Working Copy APIs) (AP-10); sprint 143: the interactive report's 26.2 dialogs: *is one of* / *is not one of* filters with the column's values and counts, *is between* two values (dates with the date picker in the application's format), relative periods on date columns, and the column order by drag and drop or arrow buttons, followed by downloads and the PDF (AP-9); sprint 142: JSON sources with a data profile and updatable views whose arrays are rows, document views of a table with its children (APEX's duality views), JSON path columns in reports (AP-8); sprint 141: static workspace files (`#WORKSPACE_FILES#`), remote servers for REST data sources, catalogs and AI services (an environment variable per environment), and workspace-level web credentials (AP-7); sprint 140: the items Shuttle (ordered), Select One and Select Many, the regions Classic Report (report templates, pagination types), Breadcrumb and Help Text with a page help text, and a [mapping of every APEX item and region type](#item-and-region-types-one-by-one) (AP-4); sprint 139: OpenTelemetry, traces with a span per SQL statement, web call, AI request and tool call, logs, metrics and `/metrics` for Prometheus, browser spans relayed by pgkiln, per workspace off or its own collector (AP-6); sprint 138: an application's Utilities tab with a dashboard, database object dependencies, change history per component, Upgrade application, UI defaults (APEX's Attribute Dictionary), application and page checksums and an icon browser (AP-5); sprint 137: Create page as a grid of page types with previews, the page types interactive report, smart filters, search page, data loading, tree, timeline, media list, content row, comments, dashboard, wizard, unified task list and workflow console, a Feature tab with nine features that install once, and Create page as copy with shared components mapped or copied (AP-3); sprint 136: vector providers (an AI service with an embedding model or a SQL function), `meta.embed`, *Add vector column* in Table Properties with an HNSW index and a queue that keeps embeddings current, search types vector and hybrid (reciprocal rank fusion with full-text) and a Retrieve (RAG) tool for AI agents, all as the app's role through RLS, on pgvector (AP-1); sprint 135: full-text search configurations, APEX's Oracle Text search type on PostgreSQL full-text search with stemming, ranking, highlights, *Did you mean* and *Add full-text search* in Table Properties (AP-2); sprint 134: the builder also in Italiano, 中文 (简体), 中文 (繁體), 日本語 and 한국어, APEX's ten builder languages plus Nederlands (SEC-5); sprints 121, 123–125: the builder in Deutsch, English, Español, Français, Nederlands and Português, step by step: the frame, sign-in, Workspace home, App Builder, Page Designer menus, the SQL Workshop's home, SQL Worksheet, Object Browser and Table Properties, Shared Components, application settings, users, identity providers, developers and workspaces (WS-7); sprint 122: *Ask in your own words* sets faceted search and smart filter facets, smart filters read a typed phrase (WS-5), and Sample Maps, Sample Approvals, Sample Data Loading and Sample Files in the App Gallery (WS-8); sprint 120: the App Gallery's single-topic sample apps (charts, cards, calendar, interactive grids, dynamic actions, reporting), the UX Pattern Catalog and a Utility Apps tab with Lookup Lists, Release Notes and Announcements (WS-8); sprint 119: data security per table, a roles × columns matrix and masked values per application role in a masking view, the same identity for pages, AI tools, REST, AutoREST and MCP (WS-13); sprint 118: Administration → Mail queue with delivery per hour and per workspace, the slowest provider calls and failures with Retry and Purge, a workspace's own mail service, and workspace network access lists that narrow the installation's allow-list (WS-9); sprint 117: Pillar Light and Pillar Dark navigation appearances with a header strip, clearer navigation tree states, subtle colour utilities, RTL; sprint 116: the comparison moved from 26.1 to 26.2, with a section for the 26.2 workspace items WS-1 … WS-13 and OCI managed identities; the App Builder list with Updated by, working copies and the lock; `pgkiln import --only`, a file-level import; stale rows on facet menus and blueprints fixed; sprint 115: popup LOVs that load on scroll, Wait Popup dynamic actions and dynamic actions on menu entries; sprint 114: Workflow 26.2 with custom task outcomes, task events and notifications, Send E-Mail and draft steps, migrating running instances and the diagram as SVG / PNG; sprint 113: Team Development with issues, labels, milestones, templates, a board and a set-up wizard; sprint 112: AI interactive reports with chips, Undo, computed columns and a phrase parser that needs no AI service; sprint 111: AI Agents with tools as a shared component, a Navigate tool with checksummed URLs, Gemini and OpenAI-compatible services; sprint 110: Data Reporter as a workspace tool with datasets, reporting applications, editors and viewers, published reports with stable URLs and pins; sprint 109: the Workspace home above the App Builder and SQL Workshop, with a summary, top applications, users and developers, and an optional release check; sprint 108: the code editor's syntax colours in the builder's light and dark themes, read-only SQL highlighted, the Data Modeler in dark mode; sprint 107: a transaction mode in the SQL Worksheet with Commit and Rollback; DA-18: JavaScript (MLE) not planned, plv8 where installed; sprint 106: the change log of DDL change sets with Flyway, Liquibase and SQL downloads; sprint 104: RESTful Services modules, templates and handlers with PL/pgSQL and media handlers, privileges, OpenAPI and Try it; sprint 103: Schema Export / Import with pg_dump and pg_restore; sprint 102: the SQL Monitor with live sessions, Top SQL and a statement's plan; sprint 101: Scheduling of pg_cron jobs with a schedule builder, run now and run history; sprint 100: RESTful Services, tables and views published as REST endpoints with paging, filters, keys and OpenAPI; sprint 99: Administration → Database Users for PostgreSQL roles; sprint 98: the Data Modeler with relational diagrams, DDL and a data dictionary; sprint 97: charts of a query in the worksheet, saved charts and their dashboard; sprint 96: the SQL Workshop's Launchpad with pins and tool groups, the builder's search with Ctrl+K; sprint 95: Table Properties: create, edit or copy a table in a form with a DDL preview and Apply in one transaction; sprint 94: an object's menu with Open in a panel, Quick DDL, Add index / trigger / policy and Drop with dependents; sprint 93: worksheets saved as SQL Scripts with tabs and a Files list, Format, Convert case, find and replace, bind and substitution variables; sprint 92: the worksheet's Query Result with sort, value dialog, copy and downloads, plans as a tree with the slowest step and misestimates, SQL History with status, search and run again; sprint 91: the SQL Worksheet like Database Actions' SQL: navigator, Run Statement at the cursor and Run Script with a log per statement, Explain Plan, Autotrace, notices, history, Run as an application role; sprint 90: Comment Out in the page designer, gallery labels in title case; sprint 89: the Object Browser's schema, one row of tabs, blank NULLs, Modify column; sprint 88: home cards with colour bands and round icons, the hero on the page background, a page footer with the version and Back to top; sprint 87: the Create Application wizard reloads the page list for a schema, RLS badges, the alias from the name; sprint 86: the page designer by page number, HTML error pages in the builder; sprint 85: the Form Designer, beyond APEX; sprint 84: the date picker, facet menus; sprint 83: Component Settings and Component Groups; sprint 82: Report Queries; sprint 81: Application Computations and Shortcuts in Shared Components; sprint 80: the master grid's first row selected when the page opens and after a search; grid cells as text with their format mask until edited, with cell navigation by arrow keys, Enter, F2 and Escape; sprint 79: generated dashboards with sums, donuts and lines, leaving out charts that say nothing; applications open in their own light or dark mode until the user chooses, per application; a user menu with Appearance and Sign in when signed out; the developer toolbar's App and Page texts and debug state; the report search's column scope in the magnifier; sprint 78: generated faceted search reports with one column per foreign key, the faceted search's total row count, Show all and Yes/No values, one search field, friendly headings and number formats in generated grids and master-detail pages, friendly names in the Create Application wizard's page list; sprint 77: the Page Designer's layout and tree by display position, button positions, the tree's context menu with Duplicate and Copy to other page, Show Common / Show All, Go to group and the Template Options dialog; display positions, button positions and side-column page templates at runtime; sprint 76: the interactive report's menus and pagination, date items in the date format; sprint 75: the SQL Workshop's Object Browser and tabs; sprint 74: the builder's information architecture: Shared Components grid, Settings tabs, application home search and tasks; sprint 73: the Create Application wizard on one page with page types and features; sprint 72: the runtime chrome compared with APEX 26.2's: the developer toolbar, the Iris look, the navigation bar's Help menu and Install button; sprint 71: generated applications compared with APEX 26.2's: labels, foreign key names in reports, file columns, format masks, the Home page and the dashboard; sprint 70: treemap, sunburst and timeline charts; sprint 69: dragging tasks on a Gantt chart; sprint 68: the Data Reporter's welcome page, Find my workspace; sprint 67: REST source catalogs from OpenAPI documents, a workspace's export and import (two rows added); sprint 66: a blueprint from an existing application; sprint 65: facet charts; sprint 64: approval vacation rules and expiration policies; sprint 63: range, box plot and stock charts; sprint 62: workspace preferences (SQL Workshop and RESTful services per workspace), extension links, Manage backups across applications, SQL Workshop utilities with object reports, About Database and a database monitor; sprint 61: the builder's screens compared with APEX 26.1: the workspace sign-in page, the Administration menu with workspace message, environment banner and utilization, the SQL Workshop home, the App Gallery, application groups and cross application reports (four rows added); sprint 60: isolated workspaces with their own database logins, row-level security on pgkiln's tables and workspace database roles, workspace administrators; sprint 59: the Page Designer's help pane, Quick edit from the developer toolbar; sprint 58: page groups; sprint 57: region templates hero, title bar, buttons container, inline dialog and drawer, wizard with wizard progress, the carousel; sprint 56: Generate DDL and Schema Comparison in the SQL Workshop, `pgkiln ddl` and `pgkiln compare`; sprint 55: an editable login page with a Login region and the Minimal page template, Forgot password through the application's mail service; sprint 54: interactive grid views, the single row view, group by and chart; sprint 53: application settings, user preferences and items kept per user, dynamic translations, `meta.data_export` and data export downloads, display image and geocoded address items; sprint 52: every dynamic action event and action, Ajax callbacks, an error handling function, the session timeout warning; sprint 51: checked imports, application backups, availability and Run only, feedback, type-specific attribute help; sprint 50: lost update detection, warn on unsaved changes, the URL and search regions with search configurations, the developer toolbar with a session state viewer, and e-mail through SMTP with OAuth2, Microsoft Graph, Amazon SES and HTTP APIs; import checks, application availability, property help and e-mail compared again; 2026-10-06: pgkiln 0.31.0, in progress: static application files and the Execute JavaScript dynamic action; region, item, dynamic action and process plug-ins; conditional and dynamic theme styles; XML and Excel in `meta.parse_data`, zips in SQL, `meta.v_boolean`; file items in S3-compatible object storage; map layers by the visible area and as vector tiles; a graphical query builder; tenants for workflows and tasks; application files as YAML and region static IDs; Lucide icons and icon modifiers; PWA push notifications; 0.30.0: 136 icons and an icon picker; an axe-core accessibility audit; cropping pictures; session sharing between applications; twenty-two built-in languages; 0.29.0: workspaces; the Iris base style; drawers; built-in template components including the metric card; Theme Roller dark-mode colours, live preview and template options on items and report columns; report selection across pages; instance settings; fourteen built-in languages; 0.28.0: AI with Claude and OpenAI; 0.27.0: Data Reporter; sample data generator; create application from several sheets, pasted data or existing tables; 0.26.0: working copies with a three-way merge; theme, library and boilerplate applications with subscriptions; 0.25.0: Gantt, pyramid and polar charts; map layers, clustering and server-side spatial filters; REST data sources that write back from forms and grids and synchronise into tables, OAuth2 password and refresh-token grants; debug messages per request and an install/upgrade log; `meta.web_request()` and `meta.parse_data()`; Theme Roller style variants and template options; 0.24.0: automations with several actions, error handling per row and runs from SQL; invoke-API workflow steps; Unload Data in the Data Workshop; create page wizards for cards, calendar, chart, map, faceted search, form and master-detail; create an application from a file; 0.23.0: interactive grid aggregates, frozen/moved/resized columns, layouts and saved grid reports, master-detail, row actions and copy/paste; download processes, execution chains in the background, workflow processes, branches to a function's URL or another app, the Dialog Closed event; number format masks, automatic time zone, runtime messages in German, French and Spanish; SQL scripts, Quick SQL, a query builder, XML loading and data load definitions; custom authentication, lists, page and application locks with developer comments, supporting objects; 0.22.0: keyset paging, report PDFs and REST collections streamed from a cursor, database-account authentication; 0.21.0: HTTP-header authentication behind a reverse proxy; 0.20.0: a popup list of values with server-side search; 0.19.0: row-range pagination, maximum row counts and row limits, lazy loading and caching of regions, streamed CSV/Excel downloads; 0.18.0: calendar week/day/list views with drag and drop, bubble/gauge/funnel/radar charts and drill-down, smart filters, a region display selector and more facet types, computations, conditional branches, build options, menu buttons, REST data sources and web credentials, rich text/Markdown, rating, combobox, date range and QR code items; 0.17.0: an App Builder home, workspace dashboard and utilities like APEX's; 0.16.0: a Page Designer with drag-and-drop layout, a code editor with autocomplete, template components and plug-ins, parallel branches and versions of workflows, the `pgkiln` command line with one file per component; 0.15.0: drop and paste files, heat maps, filtering a report by the map area; 0.14.0: stacked, combo, scatter and pie charts, several files per upload item; 0.13.0: map and tree regions; 0.12.0: REST modules in the builder; 0.11.0: workflows and Progressive Web Apps; 0.10.0: LDAP, SAML, "Keep me signed in", document templates, JSON loading, approvals and the task list; pgkiln installs no application, HR is an example).
10
+ Last reviewed: 2026-11-06 against **APEX 26.2** (sprint 168: every page of the navigation offline from the first visit; sprint 167: hidden items with Value Protected off, default values for an interactive grid's new rows, page items in any region type; sprint 164: every App Builder screen in the eleven builder languages (WS-7 leftover); sprint 165: navigation menu badges from SQL, the notification bell and live badges; sprint 162: the SQL Workshop tools and the region and report settings in the eleven builder languages (CD-8); sprint 161: component events of grids, calendars, maps and trees (CD-3); sprint 160: the Workflow Diagram region, an instance's steps with the reached, current and failed ones marked (CD-7); sprint 159: map layers Lines, Polygons and Extruded Polygons with fill and line styles per layer or per row (CD-6); sprint 158: the item types Image Upload, Text Field with autocomplete, Percent Graph and Display Map (CD-5); sprint 157: the process types Close Dialog, Clear Session State, Reset Pagination, User Preferences, Server Side Geocoding, Print Report, Human Task – Create / – Manage and Form – Initialization (CD-4); sprint 156: dynamic action events double click, key down / press, mouse enter / leave, select, resize, scroll, page unload, before refresh and facets change, greater / less and not-in-list conditions, and the actions Cancel Event, Set Style, Collapse / Expand Tree, Show AI Assistant, Trigger Geocoding and Open report dialog (CD-3); sprint 155: APEX's validation types, with an authorization scheme, Always execute and the error's display location (CD-1); sprint 154: one catalogue of server-side condition types for every component, shown in words in the Page Designer (CD-2); sprint 153: Database users in the eleven builder languages (WS-7 leftover); sprint 152: Workspace utilities, the dashboard, Mail queue, Network access, Instance settings and LDAP directories in the eleven builder languages (WS-7 leftover); sprint 151: vector providers with a model in the database, PostgresML (APEX's ONNX models, AP-1 leftover); sprint 150: remote databases, another PostgreSQL database's tables as foreign tables the applications query (REST Enabled SQL, AP-7 leftover); sprint 149: running workflow instances inside parallel branches migrate to a newer version (WS-6 leftover); sprint 148: the AI assistant streams its answers as the model writes them (WS-4 leftover); sprint 147: `pgkiln advise --offline` checks an export's files without a database (AP-10 leftover); sprint 146: the Advisor checks JSON sources' views against their data profile (AP-8 leftover); sprint 145: the texts that offered AI with "Claude or OpenAI" name all four providers: Claude, OpenAI, Gemini and OpenAI-compatible services (AP-11); sprint 144: `pgkiln advise` for CI with text, JSON and SARIF output (APEXlang static analysis / SQLcl CodeScan), security checks in the Advisor, and working copies and locks from the command line and MCP (the Working Copy APIs) (AP-10); sprint 143: the interactive report's 26.2 dialogs: *is one of* / *is not one of* filters with the column's values and counts, *is between* two values (dates with the date picker in the application's format), relative periods on date columns, and the column order by drag and drop or arrow buttons, followed by downloads and the PDF (AP-9); sprint 142: JSON sources with a data profile and updatable views whose arrays are rows, document views of a table with its children (APEX's duality views), JSON path columns in reports (AP-8); sprint 141: static workspace files (`#WORKSPACE_FILES#`), remote servers for REST data sources, catalogs and AI services (an environment variable per environment), and workspace-level web credentials (AP-7); sprint 140: the items Shuttle (ordered), Select One and Select Many, the regions Classic Report (report templates, pagination types), Breadcrumb and Help Text with a page help text, and a [mapping of every APEX item and region type](#item-and-region-types-one-by-one) (AP-4); sprint 139: OpenTelemetry, traces with a span per SQL statement, web call, AI request and tool call, logs, metrics and `/metrics` for Prometheus, browser spans relayed by pgkiln, per workspace off or its own collector (AP-6); sprint 138: an application's Utilities tab with a dashboard, database object dependencies, change history per component, Upgrade application, UI defaults (APEX's Attribute Dictionary), application and page checksums and an icon browser (AP-5); sprint 137: Create page as a grid of page types with previews, the page types interactive report, smart filters, search page, data loading, tree, timeline, media list, content row, comments, dashboard, wizard, unified task list and workflow console, a Feature tab with nine features that install once, and Create page as copy with shared components mapped or copied (AP-3); sprint 136: vector providers (an AI service with an embedding model or a SQL function), `meta.embed`, *Add vector column* in Table Properties with an HNSW index and a queue that keeps embeddings current, search types vector and hybrid (reciprocal rank fusion with full-text) and a Retrieve (RAG) tool for AI agents, all as the app's role through RLS, on pgvector (AP-1); sprint 135: full-text search configurations, APEX's Oracle Text search type on PostgreSQL full-text search with stemming, ranking, highlights, *Did you mean* and *Add full-text search* in Table Properties (AP-2); sprint 134: the builder also in Italiano, 中文 (简体), 中文 (繁體), 日本語 and 한국어, APEX's ten builder languages plus Nederlands (SEC-5); sprints 121, 123–125: the builder in Deutsch, English, Español, Français, Nederlands and Português, step by step: the frame, sign-in, Workspace home, App Builder, Page Designer menus, the SQL Workshop's home, SQL Worksheet, Object Browser and Table Properties, Shared Components, application settings, users, identity providers, developers and workspaces (WS-7); sprint 122: *Ask in your own words* sets faceted search and smart filter facets, smart filters read a typed phrase (WS-5), and Sample Maps, Sample Approvals, Sample Data Loading and Sample Files in the App Gallery (WS-8); sprint 120: the App Gallery's single-topic sample apps (charts, cards, calendar, interactive grids, dynamic actions, reporting), the UX Pattern Catalog and a Utility Apps tab with Lookup Lists, Release Notes and Announcements (WS-8); sprint 119: data security per table, a roles × columns matrix and masked values per application role in a masking view, the same identity for pages, AI tools, REST, AutoREST and MCP (WS-13); sprint 118: Administration → Mail queue with delivery per hour and per workspace, the slowest provider calls and failures with Retry and Purge, a workspace's own mail service, and workspace network access lists that narrow the installation's allow-list (WS-9); sprint 117: Pillar Light and Pillar Dark navigation appearances with a header strip, clearer navigation tree states, subtle colour utilities, RTL; sprint 116: the comparison moved from 26.1 to 26.2, with a section for the 26.2 workspace items WS-1 … WS-13 and OCI managed identities; the App Builder list with Updated by, working copies and the lock; `pgkiln import --only`, a file-level import; stale rows on facet menus and blueprints fixed; sprint 115: popup LOVs that load on scroll, Wait Popup dynamic actions and dynamic actions on menu entries; sprint 114: Workflow 26.2 with custom task outcomes, task events and notifications, Send E-Mail and draft steps, migrating running instances and the diagram as SVG / PNG; sprint 113: Team Development with issues, labels, milestones, templates, a board and a set-up wizard; sprint 112: AI interactive reports with chips, Undo, computed columns and a phrase parser that needs no AI service; sprint 111: AI Agents with tools as a shared component, a Navigate tool with checksummed URLs, Gemini and OpenAI-compatible services; sprint 110: Data Reporter as a workspace tool with datasets, reporting applications, editors and viewers, published reports with stable URLs and pins; sprint 109: the Workspace home above the App Builder and SQL Workshop, with a summary, top applications, users and developers, and an optional release check; sprint 108: the code editor's syntax colours in the builder's light and dark themes, read-only SQL highlighted, the Data Modeler in dark mode; sprint 107: a transaction mode in the SQL Worksheet with Commit and Rollback; DA-18: JavaScript (MLE) not planned, plv8 where installed; sprint 106: the change log of DDL change sets with Flyway, Liquibase and SQL downloads; sprint 104: RESTful Services modules, templates and handlers with PL/pgSQL and media handlers, privileges, OpenAPI and Try it; sprint 103: Schema Export / Import with pg_dump and pg_restore; sprint 102: the SQL Monitor with live sessions, Top SQL and a statement's plan; sprint 101: Scheduling of pg_cron jobs with a schedule builder, run now and run history; sprint 100: RESTful Services, tables and views published as REST endpoints with paging, filters, keys and OpenAPI; sprint 99: Administration → Database Users for PostgreSQL roles; sprint 98: the Data Modeler with relational diagrams, DDL and a data dictionary; sprint 97: charts of a query in the worksheet, saved charts and their dashboard; sprint 96: the SQL Workshop's Launchpad with pins and tool groups, the builder's search with Ctrl+K; sprint 95: Table Properties: create, edit or copy a table in a form with a DDL preview and Apply in one transaction; sprint 94: an object's menu with Open in a panel, Quick DDL, Add index / trigger / policy and Drop with dependents; sprint 93: worksheets saved as SQL Scripts with tabs and a Files list, Format, Convert case, find and replace, bind and substitution variables; sprint 92: the worksheet's Query Result with sort, value dialog, copy and downloads, plans as a tree with the slowest step and misestimates, SQL History with status, search and run again; sprint 91: the SQL Worksheet like Database Actions' SQL: navigator, Run Statement at the cursor and Run Script with a log per statement, Explain Plan, Autotrace, notices, history, Run as an application role; sprint 90: Comment Out in the page designer, gallery labels in title case; sprint 89: the Object Browser's schema, one row of tabs, blank NULLs, Modify column; sprint 88: home cards with colour bands and round icons, the hero on the page background, a page footer with the version and Back to top; sprint 87: the Create Application wizard reloads the page list for a schema, RLS badges, the alias from the name; sprint 86: the page designer by page number, HTML error pages in the builder; sprint 85: the Form Designer, beyond APEX; sprint 84: the date picker, facet menus; sprint 83: Component Settings and Component Groups; sprint 82: Report Queries; sprint 81: Application Computations and Shortcuts in Shared Components; sprint 80: the master grid's first row selected when the page opens and after a search; grid cells as text with their format mask until edited, with cell navigation by arrow keys, Enter, F2 and Escape; sprint 79: generated dashboards with sums, donuts and lines, leaving out charts that say nothing; applications open in their own light or dark mode until the user chooses, per application; a user menu with Appearance and Sign in when signed out; the developer toolbar's App and Page texts and debug state; the report search's column scope in the magnifier; sprint 78: generated faceted search reports with one column per foreign key, the faceted search's total row count, Show all and Yes/No values, one search field, friendly headings and number formats in generated grids and master-detail pages, friendly names in the Create Application wizard's page list; sprint 77: the Page Designer's layout and tree by display position, button positions, the tree's context menu with Duplicate and Copy to other page, Show Common / Show All, Go to group and the Template Options dialog; display positions, button positions and side-column page templates at runtime; sprint 76: the interactive report's menus and pagination, date items in the date format; sprint 75: the SQL Workshop's Object Browser and tabs; sprint 74: the builder's information architecture: Shared Components grid, Settings tabs, application home search and tasks; sprint 73: the Create Application wizard on one page with page types and features; sprint 72: the runtime chrome compared with APEX 26.2's: the developer toolbar, the Iris look, the navigation bar's Help menu and Install button; sprint 71: generated applications compared with APEX 26.2's: labels, foreign key names in reports, file columns, format masks, the Home page and the dashboard; sprint 70: treemap, sunburst and timeline charts; sprint 69: dragging tasks on a Gantt chart; sprint 68: the Data Reporter's welcome page, Find my workspace; sprint 67: REST source catalogs from OpenAPI documents, a workspace's export and import (two rows added); sprint 66: a blueprint from an existing application; sprint 65: facet charts; sprint 64: approval vacation rules and expiration policies; sprint 63: range, box plot and stock charts; sprint 62: workspace preferences (SQL Workshop and RESTful services per workspace), extension links, Manage backups across applications, SQL Workshop utilities with object reports, About Database and a database monitor; sprint 61: the builder's screens compared with APEX 26.1: the workspace sign-in page, the Administration menu with workspace message, environment banner and utilization, the SQL Workshop home, the App Gallery, application groups and cross application reports (four rows added); sprint 60: isolated workspaces with their own database logins, row-level security on pgkiln's tables and workspace database roles, workspace administrators; sprint 59: the Page Designer's help pane, Quick edit from the developer toolbar; sprint 58: page groups; sprint 57: region templates hero, title bar, buttons container, inline dialog and drawer, wizard with wizard progress, the carousel; sprint 56: Generate DDL and Schema Comparison in the SQL Workshop, `pgkiln ddl` and `pgkiln compare`; sprint 55: an editable login page with a Login region and the Minimal page template, Forgot password through the application's mail service; sprint 54: interactive grid views, the single row view, group by and chart; sprint 53: application settings, user preferences and items kept per user, dynamic translations, `meta.data_export` and data export downloads, display image and geocoded address items; sprint 52: every dynamic action event and action, Ajax callbacks, an error handling function, the session timeout warning; sprint 51: checked imports, application backups, availability and Run only, feedback, type-specific attribute help; sprint 50: lost update detection, warn on unsaved changes, the URL and search regions with search configurations, the developer toolbar with a session state viewer, and e-mail through SMTP with OAuth2, Microsoft Graph, Amazon SES and HTTP APIs; import checks, application availability, property help and e-mail compared again; 2026-10-06: pgkiln 0.31.0, in progress: static application files and the Execute JavaScript dynamic action; region, item, dynamic action and process plug-ins; conditional and dynamic theme styles; XML and Excel in `meta.parse_data`, zips in SQL, `meta.v_boolean`; file items in S3-compatible object storage; map layers by the visible area and as vector tiles; a graphical query builder; tenants for workflows and tasks; application files as YAML and region static IDs; Lucide icons and icon modifiers; PWA push notifications; 0.30.0: 136 icons and an icon picker; an axe-core accessibility audit; cropping pictures; session sharing between applications; twenty-two built-in languages; 0.29.0: workspaces; the Iris base style; drawers; built-in template components including the metric card; Theme Roller dark-mode colours, live preview and template options on items and report columns; report selection across pages; instance settings; fourteen built-in languages; 0.28.0: AI with Claude and OpenAI; 0.27.0: Data Reporter; sample data generator; create application from several sheets, pasted data or existing tables; 0.26.0: working copies with a three-way merge; theme, library and boilerplate applications with subscriptions; 0.25.0: Gantt, pyramid and polar charts; map layers, clustering and server-side spatial filters; REST data sources that write back from forms and grids and synchronise into tables, OAuth2 password and refresh-token grants; debug messages per request and an install/upgrade log; `meta.web_request()` and `meta.parse_data()`; Theme Roller style variants and template options; 0.24.0: automations with several actions, error handling per row and runs from SQL; invoke-API workflow steps; Unload Data in the Data Workshop; create page wizards for cards, calendar, chart, map, faceted search, form and master-detail; create an application from a file; 0.23.0: interactive grid aggregates, frozen/moved/resized columns, layouts and saved grid reports, master-detail, row actions and copy/paste; download processes, execution chains in the background, workflow processes, branches to a function's URL or another app, the Dialog Closed event; number format masks, automatic time zone, runtime messages in German, French and Spanish; SQL scripts, Quick SQL, a query builder, XML loading and data load definitions; custom authentication, lists, page and application locks with developer comments, supporting objects; 0.22.0: keyset paging, report PDFs and REST collections streamed from a cursor, database-account authentication; 0.21.0: HTTP-header authentication behind a reverse proxy; 0.20.0: a popup list of values with server-side search; 0.19.0: row-range pagination, maximum row counts and row limits, lazy loading and caching of regions, streamed CSV/Excel downloads; 0.18.0: calendar week/day/list views with drag and drop, bubble/gauge/funnel/radar charts and drill-down, smart filters, a region display selector and more facet types, computations, conditional branches, build options, menu buttons, REST data sources and web credentials, rich text/Markdown, rating, combobox, date range and QR code items; 0.17.0: an App Builder home, workspace dashboard and utilities like APEX's; 0.16.0: a Page Designer with drag-and-drop layout, a code editor with autocomplete, template components and plug-ins, parallel branches and versions of workflows, the `pgkiln` command line with one file per component; 0.15.0: drop and paste files, heat maps, filtering a report by the map area; 0.14.0: stacked, combo, scatter and pie charts, several files per upload item; 0.13.0: map and tree regions; 0.12.0: REST modules in the builder; 0.11.0: workflows and Progressive Web Apps; 0.10.0: LDAP, SAML, "Keep me signed in", document templates, JSON loading, approvals and the task list; pgkiln installs no application, HR is an example).
11
11
 
12
12
  ## At a glance
13
13
 
@@ -72,7 +72,7 @@ database links row and added static workspace files with workspace web credentia
72
72
  | Classic report (report templates, pagination types) | ✅ | (sprint 140) Region type `classic_report`: the report renderer without the Actions menu, column menus, saved reports or downloads, and none of an interactive report's settings from the URL; sorting by headings, an optional search; `report_template` `standard` (a table), `value_pairs` (Value Attribute Pairs), `badges` (Badge List) or `media_list` (Media List); `pagination` `total` (X–Y of Z), `range` (X–Y) or `none` ([chapter 4](guide/04-pages-and-regions.md#classic_report-classic-report)) |
73
73
  | Interactive report | ✅ | (sprint 76) An Actions menu of nine entries with dialogs, a column heading menu (sort, hide, control break, the column's values to filter by), a search in one column, hidden columns, pagination with the range, first/last and rows per page. Search, column filters, sort, rows per page, control break, aggregates (with subtotals), highlight, saved private and public reports, computed columns, group by, pivot, chart view, row selection into a page item, CSV, Excel (typed cells) and PDF download, print, reset, reflow on phones. a maximum row count (`max_rows`), natural-language control (*Ask in your own words*, 26.1) and row selection that stays across pages. Not possible: flashback queries (PostgreSQL has none; use an audit or temporal table) |
74
74
  | Interactive report dialogs of 26.2: multi-select and date-range filters, drag-and-drop columns | ✅ | (sprint 143, AP-9) *Actions → Filter*: **is one of** / **is not one of** (several values at once: ticked in a list of the column's values with counts and a search, or typed with commas; *is not one of* keeps the rows without a value), **is between** two values (both included; either may stay empty; on a date column the date picker in the application's date format, and the whole last day of a timestamp), and **is in** a period on a date column (today, yesterday, the last 7 or 30 days, the next 7 days, this or last month, this or last year; rolling, so a saved report stays current). Each is a chip in words (*Job is one of CLERK, ANALYST*). *Actions → Columns*: the columns in their order, **dragged** into another or moved with **arrow buttons** (announced to screen readers; without JavaScript the arrows submit the form); the order is a chip that puts it back, is kept in saved reports and followed by the CSV, Excel and PDF downloads, which also leave out hidden columns ([chapter 4](guide/04-pages-and-regions.md#report-interactive-report)). *Ask in your own words* and AI answers use the same operators. Text templates for AI computed columns: computed columns stay expressions over the report's columns |
75
- | Interactive grid | ✅ | Inline edit, add and delete rows, lists of values, required columns, per-row errors, all-or-nothing save, signed row keys, search and paging; **aggregates** over the whole result (developer and user defined), **frozen columns**, column **reorder/resize/hide** (Actions → Columns, or drag and drop), per-user layouts and **saved grid reports** (private and public), **master-detail** (signed row selection, the first row selected on load and after a search, details refreshed in place), **navigation and edit mode** (cells as text with their format mask until clicked, Enter or F2; arrow keys between cells), a **row actions menu** (edit, duplicate, delete, links) and **copy/paste** of cell ranges (tab-separated, spreadsheet compatible) ([chapter 4](guide/04-pages-and-regions.md)) |
75
+ | Interactive grid | ✅ | Inline edit, add and delete rows, lists of values, required columns, per-row errors, all-or-nothing save, signed row keys, search and paging; **aggregates** over the whole result (developer and user defined), **frozen columns**, column **reorder/resize/hide** (Actions → Columns, or drag and drop), per-user layouts and **saved grid reports** (private and public), **master-detail** (signed row selection, the first row selected on load and after a search, details refreshed in place), **navigation and edit mode** (cells as text with their format mask until clicked, Enter or F2; arrow keys between cells), a **row actions menu** (edit, duplicate, delete, links) and **copy/paste** of cell ranges (tab-separated, spreadsheet compatible) ([chapter 4](guide/04-pages-and-regions.md)); (167) a column's **default** for new rows (`default` with `&ITEM.`, or `default_sql`), as APEX's column Default |
76
76
  | Interactive grid views: single row view, chart view, group by | ✅ | (sprint 54) **Single row view**: one row of the search as a form with first/previous/next/last and *Add row*, from the Actions or row actions menu, saved by the grid's own process with the same checks; **group by** and **chart** set up in the Actions menu over every row of the search, as for the interactive report; `views` limits them; Save comes back to the same search, page and view ([chapter 4](guide/04-pages-and-regions.md#grid-interactive-grid)). No pivot view on grids (the interactive report has one), no editing in the single row view of columns the grid doesn't show |
77
77
  | Form (automatic row processing) | ✅ | Fetch, insert, update, delete, in a page or a modal dialog. Detects rows deleted meanwhile. (sprint 50) **Lost update detection** (APEX: *Prevent Lost Updates* and *Lock Row*): the page carries a checksum of the row's form columns (`meta.row_version`, independent of time zone and date format, as the app's role); *Save* and *Delete* lock the row and refuse when it changed meanwhile; off per form with `{"lost_update": false}` ([chapter 4](guide/04-pages-and-regions.md#form)) |
78
78
  | Charts | ✅ | Bar, column, stacked, line, area, combination (columns + lines), scatter, bubble, donut, pie, gauge, funnel, radar, **Gantt** (start/end, progress, milestones, dependencies, a today line, a time axis from hours to years), **pyramid** (area-proportional segments, or two series back to back) and **polar** (polar area); (sprint 63) **range** (floating columns from low to high), **box plot** (from one value per row or five statistics) and **stock** (candlesticks from open, high, low and close); multi-series, tooltips, data table, (sprint 71) a value axis with gridlines on horizontal bars and top-N with an *Other* bar (`"top": 10`), palette checked for colour-vision deficiency; drill-down links on chart marks (checksummed, only to pages the user may open). Drawn on the server as SVG without inline styles. (sprint 69) **Gantt editing**: drag a task or its end, or the arrow keys, runs the region's SQL as the app's role. (sprint 70) **treemap** (squarified, two levels shown), **sunburst** (up to four rings) from `node_id` / `parent_id` columns, and **timeline** (lanes by a `series` column, points and periods, overlaps in rows). **Missing:** other Oracle JET types (e.g. picto, NBox, Sankey) |
@@ -135,7 +135,7 @@ review is a diff. Not counted in [At a glance](#at-a-glance): the rows above com
135
135
  | Display Only | `display` | display values of a list of values |
136
136
  | File Upload (File Browse) | `file` | several files per item |
137
137
  | Geocoded Address | `address` | `GEOCODER_URL` |
138
- | Hidden | `hidden` | |
138
+ | Hidden | `hidden` | *Value Protected* (the default) keeps the value on the server, never rendered; (167) `{"value_protected": false}` is a hidden input the browser may set, as APEX's *Value Protected = No* |
139
139
  | Image Upload (24.2) | `file` | with `{"accept": "image/*", "crop": "1:1", "max_px": 1600}` |
140
140
  | Markdown Editor | `markdown` | |
141
141
  | Number Field | `number` | format masks |
@@ -256,7 +256,7 @@ review is a diff. Not counted in [At a glance](#at-a-glance): the rows above com
256
256
  | Accessibility | ✅ | Labels, keyboard, focus rings, reduced motion, table alternatives for charts, scrolling tables reachable from the keyboard; an automated WCAG 2.1 A/AA audit (axe-core) of every example page in light, dark and Iris and of the builder's main pages runs in CI with no violations allowed. Not a manual expert audit |
257
257
  | Drawers, top/bottom dialogs (26.1) | ✅ | Modal pages open as a centred dialog or as a drawer from the left, right, top or bottom edge, in three sizes, sliding in (without animation for reduced motion); on phones full screen ([chapter 4](guide/04-pages-and-regions.md#dialogs-and-drawers)). Not yet: a footer slot for inline drawers |
258
258
  | New "Iris" default style (26.1) | ✅ | Base style **Iris**, the default for new applications, light by default with the user's choice of dark: (sprint 72) like APEX 26's: a white body, a dark warm-grey header with an accent strip and a dark menu, 4 px corners, region headers with a rule, a dark primary button, a large page title; light and dark palettes checked for WCAG AA contrast. The earlier look stays as **Lavender** ([chapter 14](guide/14-globalization.md#base-styles-iris-lavender-and-standard)) |
259
- | Progressive Web App (push notifications: 23.1) | ✅ | Per app: installable (manifest, icon, standalone), service worker, offline pages (opt-in, wiped at sign-in/out), **forms sent offline queued on the device and sent later** (files included, once only, under the same user), location, camera and barcode items. (0.31) **Push notifications**: users turn them on per device (My account, or the dynamic action `push_subscribe`); `meta.send_push(user, title, body, page, items)` and a `send_push` process queue them, sent after the commit, encrypted for the device (RFC 8291) and signed with the application's own VAPID key (RFC 8292, stored encrypted, never exported); links signed for the recipient; devices end at sign-out, a new password, deactivation or removed access ([chapter 17](guide/17-mobile.md#push-notifications)). No images or action buttons in notifications |
259
+ | Progressive Web App (push notifications: 23.1) | ✅ | Per app: installable (manifest, icon, standalone), service worker, offline pages (opt-in, wiped at sign-in/out), **forms sent offline queued on the device and sent later** (files included, once only, under the same user), location, camera and barcode items. (0.31) **Push notifications**: users turn them on per device (My account, or the dynamic action `push_subscribe`); `meta.send_push(user, title, body, page, items)` and a `send_push` process queue them, sent after the commit, encrypted for the device (RFC 8291) and signed with the application's own VAPID key (RFC 8292, stored encrypted, never exported); links signed for the recipient; devices end at sign-out, a new password, deactivation or removed access ([chapter 17](guide/17-mobile.md#push-notifications)). No images or action buttons in notifications; (168) **every page of the navigation offline** from the first visit (fetched read-only in the background after sign-in, again every N hours), beyond APEX |
260
260
 
261
261
  ## Globalization
262
262
 
@@ -70,8 +70,8 @@ Button Position):
70
70
  |---|---|
71
71
  | `create`, `edit`, `change`, `copy`, `help`, `up` | In the region's header, after the title |
72
72
  | `previous`, `close`, `delete` | At the left end of the region's bottom bar |
73
- | `next` | At the right end of the bottom bar |
74
- | `region` (or empty) | With the region's other buttons, as before: the header of reports and charts, the bottom of forms and static content |
73
+ | `next` | At the right end of the bottom bar, after every other button there |
74
+ | `region` (or empty) | With the region's other buttons, as before: the header of reports and charts, the bottom of forms and static content (in the bottom bar, before `next`) |
75
75
 
76
76
  Positions apply to the `standard`, `collapsible` and `plain` templates; the other templates place every
77
77
  button where they always do. Page-level buttons have no position.
@@ -229,12 +229,16 @@ on an interval, use a dynamic action with the [`timer`](07-dynamic-actions.md) e
229
229
  | [`workflows`](06-processing.md#workflows) | Workflow console: the workflows the user started or administers |
230
230
  | [`search`](#search-search-region) | One search field over several sources (search configurations), results grouped per source |
231
231
  | [`url`](#url-url-region) | Another site's page (or a page of this server) in a sandboxed frame |
232
- | `login` | The sign-in form of the application's own login page (no attributes): identity providers, user name and password, *Keep me signed in*, *Forgot password?*; see [chapter 8](08-security.md#the-login-page) |
232
+ | `login` | The sign-in form of the application's own login page: identity providers, user name and password, *Keep me signed in*, *Forgot password?*; see [chapter 8](08-security.md#the-login-page). The cursor starts in the user name field; (167) `{"autofocus": false}` leaves it where the page puts it (a login region lower on a page that has other content) |
233
233
  | [`breadcrumb`](#breadcrumb-and-help_text) | (140) The page's breadcrumb trail, for the Breadcrumb bar position |
234
234
  | [`help_text`](#breadcrumb-and-help_text) | (140) The page's help text |
235
235
  | [`static`](#static-and-dynamic-content) | Fixed HTML with `&ITEM.` substitutions |
236
236
  | [`dynamic`](#static-and-dynamic-content) | HTML produced by a SELECT |
237
237
 
238
+ (167) Items can be placed in any region. Reports, forms and static content place them themselves; in the other
239
+ types (a tree, chart, map, cards, calendar …) they show under the region's content, as in APEX. A `login`
240
+ region's fields post to a form of their own, so items placed in it are not shown: put them in a region next to it.
241
+
238
242
  Region-specific options go in the region's **attributes** (`config`, a JSON object).
239
243
 
240
244
  **Static ID** (APEX: Static ID, optional): lower case letters, digits, `_` and `-`, starting with a
@@ -556,7 +560,7 @@ Attributes:
556
560
  | `pagination`, `max_rows` | | As for reports |
557
561
  | `allow` | all `true` | `{"insert": false, "update": true, "delete": false}` |
558
562
  | `readonly` | `[]` | Columns that may not be edited |
559
- | `columns` | `{}` | Per column: `{"deptno": {"lov": "LOV:DEPARTMENTS", "required": true}}`. `lov` makes it a select list (any [list of values](05-items.md#lists-of-values)) |
563
+ | `columns` | `{}` | Per column: `{"deptno": {"lov": "LOV:DEPARTMENTS", "required": true}}`. `lov` makes it a select list (any [list of values](05-items.md#lists-of-values)). (167) `default` and `default_sql` give a new row's starting value: see [New rows' default values](#new-rows-default-values) |
560
564
  | `headings`, `hidden`, `formats` | | As for reports |
561
565
  | `aggregates` | | Totals in the footer: `{"sal": ["sum", "avg"], "empno": "count"}` (`sum`, `avg`, `count`, `min`, `max`) |
562
566
  | `layout` | | The default column layout: `{"order": ["ename", "sal"], "hidden": ["comm"], "widths": {"ename": 180}, "frozen": 1}` |
@@ -571,6 +575,21 @@ Attributes:
571
575
  Cell editors follow the column type: number, date, date-time, checkbox (boolean), select list
572
576
  (with `lov`) or text.
573
577
 
578
+ **New rows' default values.** (167; APEX: a column's *Default*) A column's `default` is text with `&ITEM.`
579
+ substitutions; `default_sql` is a SELECT whose first column of the first row is the value (with `:BINDS`). Both
580
+ are worked out when the grid is shown, and *Add row* (and the single row view's new row) starts with them:
581
+
582
+ ```json
583
+ {"columns": {"deptno": {"lov": "LOV:DEPARTMENTS", "default": "&P27_DEPTNO."},
584
+ "status": {"default": "NEW"},
585
+ "hiredate": {"default_sql": "select current_date"}}}
586
+ ```
587
+
588
+ A new row the user left at its default values counts as blank and isn't inserted, like an empty one; change
589
+ any value and the whole row, defaults included, is inserted. A duplicated row is always inserted. Only columns
590
+ a new row may set take a default (a detail grid's master column is filled from the master as before). For
591
+ anything that needs a decision per row, the `grid_row_init` dynamic action event still runs on each new row.
592
+
574
593
  **Aggregates** are computed in the database over **every row of the search**, not only the rows
575
594
  on the page, and shown in a footer row under their columns. Besides the developer's
576
595
  (`aggregates`), users add their own with **Actions → Aggregate** (kept in the URL as
@@ -27,7 +27,7 @@ page, optionally inside a region. Name them `P<page>_<NAME>` (uppercase letters,
27
27
  | `select_one` | (140) a search field over the list of values: typing filters a list under it ([Select One](#shuttle-select-one-and-select-many)); a select list without JavaScript | the chosen return value |
28
28
  | `select_many` | (140) as `select_one`, for several values shown as chips with a remove button; a multi-select list without JavaScript | **colon-separated** return values |
29
29
  | `display` | read-only text (shows the display value for list items) | whatever was set |
30
- | `hidden` | not rendered | set by URL (with checksum), fetch or processes |
30
+ | `hidden` | not rendered: the value stays on the server; (167) `{"value_protected": false}` renders a hidden input the browser may set ([Hidden items](#hidden-items)) | set by URL (with checksum), fetch, processes or server-side dynamic actions; unprotected also by browser-side dynamic actions, JavaScript and a submit |
31
31
  | `file` | file upload ([chapter 16](16-files.md)); on phones the camera with `{"capture": "environment"}`, photos made smaller with `{"max_px": 1600}` ([chapter 17](17-mobile.md)) | the id of the uploaded temporary file (a uuid) |
32
32
  | `location` | a text field with *Use my location* ([chapter 17](17-mobile.md)) | `latitude,longitude`, e.g. `52.01160,4.35710` |
33
33
  | `richtext` | rich text editor (toolbar; a plain HTML textarea without JavaScript), full width | **sanitised HTML**, see [below](#rich-text-and-markdown) |
@@ -330,3 +330,22 @@ Items get their values from:
330
330
  - **application processes** (application items).
331
331
 
332
332
  Values persist in session state until changed. `?clear=1` in a URL clears the page's items.
333
+
334
+ ### Hidden items
335
+
336
+ A `hidden` item is **value protected** by default: it isn't rendered, its value never leaves the server, and a
337
+ submit can't change it, so it is safe for keys and other values the user must not tamper with. The server sets
338
+ it: the URL (with checksum), a form's fetch, processes, computations and the server-side dynamic actions
339
+ (`set_value` and `execute_sql` set its session value, though the browser never sees it).
340
+
341
+ (167; APEX: *Value Protected* = No) `{"value_protected": false}` makes it a field of the page instead: a hidden
342
+ input that browser-side dynamic actions (`clear`, `set_value` from a component event's value, `current_position`),
343
+ `execute_javascript` functions and client-side conditions read and set, and whose value a submit (or a dynamic
344
+ action's *items to submit*) sends back. A change event on it runs its `change` dynamic actions. Its posted value
345
+ is **user input**, exactly like a text field's: check it in a validation before you trust it.
346
+
347
+ ```yaml
348
+ name: P5_SELECTED_NODE
349
+ type: hidden
350
+ config: {value_protected: false}
351
+ ```
@@ -91,7 +91,7 @@ items, in the browser. A tree of departments that filters an employee report, wi
91
91
  |---|---|---|
92
92
  | `show` / `hide` | browser | Show or hide the affected items/region. **With a condition, the opposite happens when the condition is false**, so one dynamic action gives "show commission only for salesmen". Also applied when the page loads (and already on the server, so there's no flicker) |
93
93
  | `enable` / `disable` | browser | Enable or disable the controls, reversed when the condition is false |
94
- | `set_value` | server | Runs `code` (a SELECT); its first row's columns set the affected items, in order. The affected items must be on the page: a `hidden` item isn't rendered (its value stays on the server, safe from tampering), so set a text or display item, or use a computation |
94
+ | `set_value` | server | Runs `code` (a SELECT); its first row's columns set the affected items, in order. A protected `hidden` item (the default) gets the value in its session state only (the browser never sees it); (167) a hidden item with `{"value_protected": false}` is a hidden input that browser-side actions set too ([Hidden items](05-items.md#hidden-items)) |
95
95
  | `execute_sql` | server | Runs `code`; returned columns named like items set those items |
96
96
  | `refresh_region` | server | Re-renders `affected_region_id` with the current session state (e.g. a report filtered by the changed item) |
97
97
  | `refresh_item` | server | Re-renders the affected items (e.g. a list whose LOV depends on another item) |
@@ -720,10 +720,14 @@ prefer policies on `meta.app_user()` / `meta.has_role()` on tables with a maskin
720
720
  page and **user**, so a link can't be edited (`?P3_EMPNO=7839` → `7902`) and one user's links
721
721
  don't work for another. Build links in SQL with `meta.page_url(3, '{"P3_EMPNO": 7839}')`.
722
722
  - **Submitted values**: only editable, visible items are taken from a submit. Hidden, display-only,
723
- read-only and unauthorized items keep their server-side values.
723
+ read-only and unauthorized items keep their server-side values. (167) A hidden item with
724
+ `{"value_protected": false}` is the exception the developer chooses: a hidden input whose posted value is
725
+ user input, like a text field's.
726
+ - **Grid defaults**: a new grid row posts the default values it started with (`_def`), only to tell an
727
+ untouched row from a filled-in one; it never sets a column.
724
728
  - **Grid rows**: every row's primary key is signed the same way.
725
729
  - **Master-detail selection**: a master grid's select links carry a signature bound to the
726
- application, page, user, region and value; only then does the value go into the item (hidden
730
+ application, page, user, region and value; only then does the value go into the item (protected hidden
727
731
  items are never taken from a submit, and URL items need the page checksum). The detail
728
732
  endpoint `GET …/region/:id` serves only lazy regions and details of a visible master, after
729
733
  the page's and region's authorization and conditions. A detail grid's master column is filled
@@ -525,7 +525,7 @@ navigation entries and application processes have the same `build_option` column
525
525
  | Table | Contents | Readable by the runtime role |
526
526
  |---|---|---|
527
527
  | `session` | Sessions: `token_hash` (SHA-256 of the cookie), `app_id` (NULL = builder), `username`, `roles` (resolved at sign-in), `csrf_token`, `state` (jsonb session state), `created_at`, `last_seen` | yes |
528
- | `activity_log` | `at`, `app_id`, `page_no`, `username`, `event` (`page_view`, `login`, `login_failed`, `login_locked`, `login_unlocked`, `logout`, `error`, `forbidden`, `api_token`, `password_expired`, `password_changed`; builder: `lock_broken`, `supporting_objects`, `sample_data`, …), `ip`, `elapsed_ms`, `detail` | yes (insert/select) |
528
+ | `activity_log` | `at`, `app_id`, `page_no`, `username`, `event` (`page_view`, `page_prefetch` (168: a page fetched for offline use), `login`, `login_failed`, `login_locked`, `login_unlocked`, `logout`, `error`, `forbidden`, `api_token`, `password_expired`, `password_changed`; builder: `lock_broken`, `supporting_objects`, `sample_data`, …), `ip`, `elapsed_ms`, `detail` | yes (insert/select) |
529
529
  | `debug_view` | [Debug messages](06-processing.md#debug-messages): one row per recorded request: `app_id`, `page_no`, `username`, `session_id`, `method`, `path` (without the query string), `status`, `level`, `started_at`, `elapsed_ms`, `entries`. Written through `meta.debug_save()` (runtime role only), not exported | no |
530
530
  | `debug_message` | The entries of a recorded request: `view_id`, `seq`, `elapsed_ms` (since the start), `duration_ms` (timed steps), `level`, `component`, `message` | no |
531
531
  | `web_request_log` | [Web requests from SQL](#web-requests-from-sql): `app_id`, `status`, the request (`url` or `source` + `params`, `method`, `headers`, `body`, `credential` name, `timeout_s`), `requested_by`, times, the response (`status_code`, `response_url`, `response_headers`, `response_body`), `message`. Kept 24 hours, not exported | no (through `meta.web_response`) |
@@ -184,6 +184,9 @@ Tips:
184
184
  together.
185
185
  - **Errors are hidden by default**: unexpected errors show a reference number unless the app is in
186
186
  debug mode.
187
+ - **Hidden items aren't in the page**: a `hidden` item is value protected and its value stays on the server (APEX
188
+ renders it with a checksum). For APEX's *Value Protected* = No, give it `{"value_protected": false}`: a hidden
189
+ input that dynamic actions and JavaScript set ([Hidden items](05-items.md#hidden-items)).
187
190
  - **Dates**: date items, date ranges, grid date cells and facet ranges are text in the application's date format
188
191
  (else ISO, `2026-10-01`) with pgkiln's date picker; format masks
189
192
  apply to report, grid and cards columns and to number and display items
@@ -13,6 +13,7 @@ the home screen with its own icon, full screen, and working on when the network
13
13
  | Installable | Adds a web app manifest and a service worker to the application. Phones offer "Add to home screen" / "Install"; the app then opens full screen, without the browser bar. (0.42) Where the browser offers the installation (Chrome, Edge), the header shows an **Install app** button (APEX: the navigation bar's Install App entry) |
14
14
  | Name under the icon | The short name on the home screen (the application's name when empty) |
15
15
  | Keep visited pages on the device | Pages a user opened are shown again when there is no connection (with a notice that they may be out of date) |
16
+ | Make every page of the navigation available offline | (168) With *Keep visited pages* on: after signing in, the device also fetches every page of the navigation menu and navigation bar the user may open, so the whole app works offline from the first visit; fetched again after *Fetch them again after* hours (1–168, default 12). [Below](#every-page-offline) |
16
17
  | Keep forms sent without a connection | Forms submitted offline are kept on the device and sent when the connection is back |
17
18
  | Push notifications | Users may turn on notifications per device; application code sends them ([below](#push-notifications)) |
18
19
  | Icon | A square PNG of at least 512 × 512 pixels. Without one, the app gets a tile with its initial in the theme's accent colour |
@@ -35,9 +36,38 @@ Everything is per application, under its own address: `/a/<alias>/manifest.webma
35
36
  listing the pages that are on the device.
36
37
  - Kept pages contain the user's data. They stay on the device only while the user is signed in:
37
38
  signing in or out removes them, so the next person on a shared device doesn't see them.
38
- - Live data (reports, charts) is as fresh as the last visit. Actions that need the server (searching,
39
+ - Live data (reports, charts) is as fresh as the last visit (or the last fetch, below). Actions that need the server (searching,
39
40
  downloads, dynamic actions) wait for the connection.
40
41
 
42
+ ## Every page offline
43
+
44
+ (168) With *Make every page of the navigation available offline*, a user doesn't have to open every page
45
+ once before going out of range:
46
+
47
+ 1. On the first page after signing in (and on the first page opened on a device), the page hands the
48
+ links of its **navigation menu and navigation bar** to the service worker. Those are exactly the pages
49
+ the server showed this user: authorization schemes, conditions and page access already applied. Dialog
50
+ pages, other sites and the sign-in and sign-out pages are left out; at most 60 pages are fetched.
51
+ 2. The service worker fetches them **one at a time** in the background, with a short pause between
52
+ them, and keeps each page that comes back. It skips the whole thing when the browser asks to save
53
+ data (*Data Saver*), and stops at the first network error, to try again on the next page.
54
+ 3. When it is done it notes the time; after *Fetch them again after* hours (default 12) the next page
55
+ opened online starts a new round. Signing in or out empties the kept pages, so the next person
56
+ starts over.
57
+
58
+ The server shows a fetched page **read-only** (the request carries `X-Pgkiln-Prefetch: 1`):
59
+
60
+ - the page's transaction is read-only: an application process or a region query that writes fails
61
+ (the region shows its error in the kept copy) and nothing is changed;
62
+ - the session's state is not kept, and a message waiting for the next page stays there;
63
+ - a page with a process that runs when it opens (point *On load*) is not fetched at all: it is kept
64
+ only when the user opens it, as before. So are dialogs, documents and downloads;
65
+ - each fetch is logged as `page_prefetch`, apart from `page_view`, so activity reports count real visits.
66
+
67
+ Only the pages of the menus are fetched, with their first page of rows: a form for one record
68
+ (`?P3_ID=…`) or a report's other pages are kept only once the user opens them. The kept copies hold
69
+ the user's data, like visited pages: turn it on for apps used on devices that belong to one person.
70
+
41
71
  ## Forms sent offline
42
72
 
43
73
  With *Keep forms sent without a connection* on, a form submitted while the network is down (or
@@ -127,9 +157,10 @@ results, and a *Send test* button.
127
157
 
128
158
  ## Example
129
159
 
130
- The HR example application is a PWA: install it from the browser menu on a phone, open a few pages,
131
- switch on airplane mode, and file a leave request; it is sent when the connection is back. Its
132
- employee form records a work location and takes the photo with the camera (`examples/hr/hr_12_pwa.sql`).
160
+ The HR example application is a PWA: install it from the browser menu on a phone, sign in, wait a few
161
+ seconds, switch on airplane mode, and every page of the menu still opens (`examples/hr/hr_82_pwa_prefetch.sql`);
162
+ file a leave request, and it is sent when the connection is back. Its employee form records a work location
163
+ and takes the photo with the camera (`examples/hr/hr_12_pwa.sql`).
133
164
 
134
165
  ## Not included
135
166
 
@@ -15,7 +15,9 @@
15
15
  -- (page 10) closed or cancelled by a dynamic action;
16
16
  -- page 7 regions and the window: before / after refresh, resize, scroll,
17
17
  -- Close Region, Print, Share, Download, Push Subscribe;
18
- -- page 8 a tree: Selection Change, Expand Tree, Collapse Tree;
18
+ -- page 8 a tree: Selection Change, Expand Tree, Collapse Tree; an item in the
19
+ -- tree region and a hidden item a dynamic action sets in the browser
20
+ -- (value_protected false);
19
21
  -- page 9 faceted search: Facets Change and the report's dialogs;
20
22
  -- page 11 Show AI Assistant (asking needs an AI service set up by an
21
23
  -- administrator; the page works without one).
@@ -189,7 +191,7 @@ select pg_temp.page_id('sample-dynamic-actions', r.page), r.seq, r.title, r.type
189
191
 
190
192
  -- 8 A tree
191
193
  (8, 5, 'About this page', 'static', 12, 'plain',
192
- '<p class="lead">Clicking a node of the tree runs <strong>Selection change [Tree]</strong>: a <em>Set value</em> without SQL puts the node''s id into an item, and <em>Refresh region</em> draws the report with it. <strong>Expand tree</strong> and <strong>Collapse tree</strong> open or close every node.</p>',
194
+ '<p class="lead">Clicking a node of the tree runs <strong>Selection change [Tree]</strong>: a <em>Set value</em> without SQL puts the node''s id into a hidden item (<code>{"value_protected": false}</code>: a hidden input the browser may set) and into the display item under the tree (items show in any region type), and <em>Refresh region</em> draws the report with it. <strong>Expand tree</strong> and <strong>Collapse tree</strong> open or close every node.</p>',
193
195
  '{}', null),
194
196
  (8, 10, 'Categories and products', 'tree', 5, 'standard',
195
197
  E'select ''c-'' || lower(category) as id, null::text as parent_id, category as label from sample_da.product group by category\nunion all\nselect id::text, ''c-'' || lower(category), name from sample_da.product',
@@ -261,7 +263,8 @@ select pg_temp.page_id('sample-dynamic-actions', i.page), pg_temp.region_id('sam
261
263
  (6, 'delivery', 40, 'P6_CUSTOMS', 'Customs number', 'text', null, null, 'Only outside the EU (shown with in list).', '{}'),
262
264
  (7, 'tools', 10, 'P7_REFRESHED', 'Last shuffled', 'display', null, 'not yet', null, '{}'),
263
265
  (7, 'tools', 20, 'P7_PICKED', 'Picked', 'text', null, null, 'Selection change: the rows checked in Pick products, colon separated.', '{"warn_unsaved": false}'),
264
- (8, 'chosen', 10, 'P8_NODE', 'Chosen node', 'text', null, null, 'Set by the tree: a category (c-…) or a product id.', '{"warn_unsaved": false}')
266
+ (8, 'catalogue-tree', 10, 'P8_SHOWN', 'Chosen node', 'display', null, 'none yet', 'Set by the tree: a category (c-…) or a product id.', '{}'),
267
+ (8, 'chosen', 10, 'P8_NODE', null, 'hidden', null, null, null, '{"value_protected": false}')
265
268
  ) as i (page, region, seq, name, label, type, lov, def, help, config);
266
269
 
267
270
  insert into meta.button (page_id, region_id, seq, name, label, action, hot)
@@ -387,7 +390,7 @@ select pg_temp.page_id('sample-dynamic-actions', d.page), d.seq, d.name, d.event
387
390
  (7, 90, 'Turn on notifications', 'click', 'NOTIFY', null, null, 'push_subscribe', null, null, null, null,
388
391
  'Notifications are on for this device.', null, null),
389
392
  -- page 8 A tree
390
- (8, 10, 'Remember the node', 'tree_selection_change', 'catalogue-tree', null, null, 'set_value', 'P8_NODE', null, null, null, null, null, null),
393
+ (8, 10, 'Remember the node', 'tree_selection_change', 'catalogue-tree', null, null, 'set_value', 'P8_NODE,P8_SHOWN', null, null, null, null, null, null),
391
394
  (8, 20, 'Show its products', 'tree_selection_change', 'catalogue-tree', null, null, 'refresh_region', null, 'chosen', null, 'P8_NODE', null, null, null),
392
395
  (8, 30, 'Open every node', 'click', 'EXPAND', null, null, 'expand_tree', null, 'catalogue-tree', null, null, null, null, null),
393
396
  (8, 40, 'Close every node', 'click', 'COLLAPSE', null, null, 'collapse_tree', null, 'catalogue-tree', null, null, null, null, null),
@@ -3,8 +3,8 @@
3
3
  --
4
4
  -- The interactive grid: an editable grid made by the wizard; a grid with
5
5
  -- select lists, required columns, totals, a frozen column, a row menu and a
6
- -- default column layout, and dynamic actions on a new row and after a
7
- -- save; a master grid with its detail grid; and a read-only grid with its single row, group by and chart views.
6
+ -- default column layout, new rows' default values, and dynamic actions on a
7
+ -- new row and after a save; a master grid with its detail grid; and a read-only grid with its single row, group by and chart views.
8
8
  --
9
9
  -- Installed by an administrator from the App Gallery, or with
10
10
  -- psql "$DATABASE_URL" -1 -f examples/gallery/samples/sample-grids.sql
@@ -109,7 +109,7 @@ select pg_temp.page_id('sample-grids', r.page), r.seq, r.title, r.type, 12, r.te
109
109
 
110
110
  -- 3 Grid features
111
111
  (3, 5, 'About this page', 'static', 'plain',
112
- '<p class="lead">The grid''s attributes: <code>columns</code> gives the team column a list of values and makes the name required; <code>aggregates</code> adds totals over every row of the search; <code>frozen</code> keeps the name in view while the grid scrolls sideways; <code>row_actions</code> adds a menu per row (duplicate, delete); <code>layout</code> sets the default order and widths, and every user can rearrange it (Actions → Columns).</p><p>Two dynamic actions listen to the grid itself (the trigger is its static id <code>members</code>): <strong>Row initialization</strong> (<code>grid_row_init</code>) runs when <strong>Add row</strong> or Duplicate adds a row, and an <em>Execute JavaScript</em> action fills its empty role, start date and hours with defaults (the function <code>grids.memberDefaults</code> in the static file <code>sample-grids.js</code>); <strong>Save</strong> (<code>grid_save</code>) shows a message on the page that comes back after the grid was saved.</p>',
112
+ '<p class="lead">The grid''s attributes: <code>columns</code> gives the team column a list of values and makes the name required; <code>aggregates</code> adds totals over every row of the search; <code>frozen</code> keeps the name in view while the grid scrolls sideways; <code>row_actions</code> adds a menu per row (duplicate, delete); <code>layout</code> sets the default order and widths, and every user can rearrange it (Actions → Columns).</p><p>Two dynamic actions listen to the grid itself (the trigger is its static id <code>members</code>): <strong>Row initialization</strong> (<code>grid_row_init</code>) runs when <strong>Add row</strong> or Duplicate adds a row, and shows a message; the row''s role, start date and hours already have values, from the columns'' <code>default</code> (text, may use <code>&amp;ITEM.</code>) and <code>default_sql</code> (a SELECT) in <code>columns</code>. A new row left at its defaults isn''t saved; <strong>Save</strong> (<code>grid_save</code>) shows a message on the page that comes back after the grid was saved.</p>',
113
113
  null, null, '{}', null),
114
114
  (3, 10, 'Members', 'grid', 'standard',
115
115
  E'select id, name, team_id, role, starts, hours, rate, remote\n from sample_grids.member order by team_id, name',
@@ -118,7 +118,9 @@ select pg_temp.page_id('sample-grids', r.page), r.seq, r.title, r.type, 12, r.te
118
118
  "headings": {"team_id": "Team", "starts": "Started", "hours": "Hours a week", "rate": "Hourly rate"},
119
119
  "columns": {"name": {"required": true},
120
120
  "team_id": {"lov": "select name, id from sample_grids.team order by name", "required": true},
121
- "role": {"lov": "STATIC:Lead,Developer,Designer,Tester,Analyst", "required": true}},
121
+ "role": {"lov": "STATIC:Lead,Developer,Designer,Tester,Analyst", "required": true, "default": "Developer"},
122
+ "starts": {"default_sql": "select current_date"},
123
+ "hours": {"default": "40"}},
122
124
  "formats": {"rate": "999G990D00"},
123
125
  "aggregates": {"hours": ["sum", "avg"], "rate": "avg", "id": "count"},
124
126
  "frozen": 1,
@@ -151,33 +153,11 @@ update meta.region set config = jsonb_set(config, '{columns,role}', '{"lov": "ST
151
153
  where page_id = pg_temp.page_id('sample-grids', 4) and seq = 20;
152
154
 
153
155
  -- page 3: dynamic actions on the grid's own events (trigger: the grid's static id).
154
- -- grid_row_init: a new row (Add row, Duplicate) gets defaults from a JavaScript function of a static file;
156
+ -- grid_row_init: a new row (Add row, Duplicate); its defaults come from the grid's columns (default, default_sql);
155
157
  -- grid_save: a message on the page that comes back after a save.
156
- insert into meta.static_file (app_id, name, mime, content)
157
- select a.id, 'sample-grids.js', 'text/javascript', convert_to($js$// Sample Interactive Grids: functions for "Execute JavaScript" dynamic actions.
158
- // A new member row: its empty role, start date and hours get defaults (a duplicated row keeps its copied values).
159
- pgkiln.actions.register('grids.memberDefaults', (da) => {
160
- const row = da.element;
161
- if (!row) return;
162
- const now = new Date();
163
- const today = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')}`;
164
- const defaults = { role: 'Developer', starts: today, hours: '40' };
165
- for (const th of row.closest('table').querySelectorAll('thead th[data-col-name]')) {
166
- const value = defaults[th.dataset.colName];
167
- const control = value && row.querySelector(`td[data-col="${th.dataset.col}"] :is(input:not([type=hidden]), select)`);
168
- if (!control || control.value) continue;
169
- control.value = value;
170
- control.dispatchEvent(new Event('input', { bubbles: true }));
171
- control.dispatchEvent(new Event('change', { bubbles: true }));
172
- }
173
- });
174
- $js$, 'utf8')
175
- from meta.app a where a.alias = 'sample-grids';
176
-
177
- update meta.app set static_includes = '{sample-grids.js}' where alias = 'sample-grids';
178
-
179
158
  insert into meta.dynamic_action (page_id, seq, name, event, trigger_element, action, code, message)
180
159
  values
181
- (pg_temp.page_id('sample-grids', 3), 10, 'Defaults for a new member', 'grid_row_init', 'members', 'execute_javascript', 'grids.memberDefaults', null),
160
+ (pg_temp.page_id('sample-grids', 3), 10, 'A new member', 'grid_row_init', 'members', 'show_success', null,
161
+ 'A grid_row_init dynamic action: a new row. Its role, start date and hours start with the columns'' defaults; fill in the name and the team.'),
182
162
  (pg_temp.page_id('sample-grids', 3), 20, 'Saved', 'grid_save', 'members', 'show_success', null,
183
163
  'A grid_save dynamic action: the members are saved, and the totals include your changes.');
@@ -287,7 +287,7 @@ select pg_temp.page_id('ux-patterns', r.page), r.seq, r.title, r.type, r.cols, r
287
287
 
288
288
  -- 15 Button positions
289
289
  (15, 5, 'About this page', 'static', 12, 'plain', '{}',
290
- '<p class="lead">A region''s button has a <strong>Button position</strong> (Page Designer → button → Layout; <code>slot</code> in the files), as APEX''s button positions. <em>Create, Edit, Change, Copy, Help</em> and <em>Up</em> go into the region''s header after the title; <em>Previous, Close</em> and <em>Delete</em> to the left end of the bottom bar and <em>Next</em> to the right end; <em>Region</em> (or none) with the region''s other buttons. Each button is labelled with its position. Previous and Next go to the neighbouring pages, Up and Close to the home page, Help opens an inline dialog; the others do nothing.</p>',
290
+ '<p class="lead">A region''s button has a <strong>Button position</strong> (Page Designer → button → Layout; <code>slot</code> in the files), as APEX''s button positions. <em>Create, Edit, Change, Copy, Help</em> and <em>Up</em> go into the region''s header after the title; <em>Previous, Close</em> and <em>Delete</em> to the left end of the bottom bar and <em>Next</em> to the right end; <em>Region</em> (or none) with the region''s other buttons (in the bottom bar of a static or form region, before Next). Each button is labelled with its position. Previous and Next go to the neighbouring pages, Up and Close to the home page, Help opens an inline dialog; the others do nothing.</p>',
291
291
  '{}', null, null),
292
292
  (15, 10, 'Every button position', 'static', 12, 'standard', '{}',
293
293
  '<p>The buttons of this region use every position. They apply to the <code>standard</code>, <code>collapsible</code> and <code>plain</code> templates; the other templates place every button where they always do.</p>',
@@ -301,9 +301,9 @@ select pg_temp.page_id('ux-patterns', r.page), r.seq, r.title, r.type, r.cols, r
301
301
 
302
302
  -- 16 Sign-in region (page template minimal)
303
303
  (16, 5, 'About this page', 'static', 12, 'plain', '{}',
304
- '<p class="lead">This page has the page template <em>Minimal (no navigation)</em> (<code>minimal</code>): no header, navigation menu or navigation bar, the title and the regions only, centred. The region below is a <strong>Login</strong> region: the application''s sign-in form, as on an own login page (Application settings → Sign-in methods → Create a login page). It posts to the application''s sign-in, so throttling and every sign-in method work as on the built-in page. You are signed in already: signing in again as demo / demo starts a new session and opens the home page. A wrong password shows the built-in sign-in page with its message, because this page is not the application''s login page.</p>',
304
+ '<p class="lead">This page has the page template <em>Minimal (no navigation)</em> (<code>minimal</code>): no header, navigation menu or navigation bar, the title and the regions only, centred. The region below is a <strong>Login</strong> region: the application''s sign-in form, as on an own login page (Application settings → Sign-in methods → Create a login page). It posts to the application''s sign-in, so throttling and every sign-in method work as on the built-in page. You are signed in already: signing in again as demo / demo starts a new session and opens the home page. A wrong password shows the built-in sign-in page with its message, because this page is not the application''s login page. The region has <code>{"autofocus": false}</code>: you are signed in already, so the cursor isn''t put in the user name field (on a real login page leave it out).</p>',
305
305
  '{}', 'about-login', null),
306
- (16, 10, 'Sign in', 'login', 12, 'standard', '{}', null, '{}', null, null)
306
+ (16, 10, 'Sign in', 'login', 12, 'standard', '{}', null, '{"autofocus": false}', null, null)
307
307
  ) as r (page, seq, title, type, cols, template, topts, source, config, sid, pos);
308
308
 
309
309
  -- buttons
@@ -0,0 +1,11 @@
1
+ -- =====================================================================
2
+ -- HR example, part 82: the whole app offline from the first visit
3
+ -- (docs/guide/17-mobile.md, sprint 168)
4
+ --
5
+ -- After signing in on a phone, every page of the navigation menu the
6
+ -- user may open is fetched in the background and kept on the device, so
7
+ -- the app works on the train even for pages never opened before; the
8
+ -- copies are fetched again after 12 hours. Pages that run processes when
9
+ -- they open (20, 35, 43) are kept only when the user opens them.
10
+ -- =====================================================================
11
+ update meta.app set pwa_prefetch_hours = 12 where alias = 'hr';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pgkiln",
3
- "version": "0.86.0",
3
+ "version": "0.88.0",
4
4
  "description": "Open source low-code, SQL-driven application builder for PostgreSQL, inspired by Oracle APEX",
5
5
  "keywords": [
6
6
  "postgresql",
package/public/app.css CHANGED
@@ -454,6 +454,8 @@ dialog.region-inline_drawer:target { inset: 0 0 0 auto; }
454
454
 
455
455
  /* ---------- forms ---------- */
456
456
  .form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 1rem 1.25rem; }
457
+ /* (167) the items of a region type that shows content of its own (a tree, chart, map …): under that content */
458
+ .form-grid.region-items { margin-top: 1rem; }
457
459
  .page-items { margin-bottom: 1rem; }
458
460
  .field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; margin: 0; padding: 0; border: 0; }
459
461
  .field[data-wide] { grid-column: 1 / -1; }
package/public/app.js CHANGED
@@ -1596,6 +1596,8 @@ const pgkilnUnsaved = (() => {
1596
1596
  if (!row) return;
1597
1597
  e.preventDefault();
1598
1598
  closeMenus(dup);
1599
+ // (167) a copy is not the template's default values: it is saved even when it matches them
1600
+ row.querySelector('input[name$="_def"]')?.remove();
1599
1601
  for (const td of row.querySelectorAll('td[data-col]')) {
1600
1602
  const from = src.querySelector(`td[data-col="${td.dataset.col}"]`);
1601
1603
  if (from && control(td) && control(from)) setCell(td, control(from).tagName === 'SELECT' ? control(from).value : cellText(from));
@@ -2970,6 +2972,17 @@ const liveBadges = (() => {
2970
2972
  if (e.data && e.data.type === 'pgkiln:pushed') liveBadges.now();
2971
2973
  });
2972
2974
  if (new URLSearchParams(location.search).get('queued') === '1') note(t('pwa.queued'));
2975
+ // (168) every page of the navigation offline: this page and the menu's and navigation bar's pages of the app
2976
+ // (the server already left out the ones this user may not open; dialogs and other sites are not pages to keep)
2977
+ if (body.dataset.prefetch && navigator.onLine && !(navigator.connection && navigator.connection.saveData)) {
2978
+ const links = [...document.querySelectorAll('#t-nav a[href], .t-navbar a[href]')].filter((a) => !a.hasAttribute('data-dialog'));
2979
+ const urls = [location.href, ...links.map((a) => a.href)].filter((h) => {
2980
+ const u = new URL(h, location.href);
2981
+ return u.origin === location.origin && u.pathname.startsWith(`${body.dataset.base}/`) && !/\/(login|logout)$/.test(u.pathname);
2982
+ });
2983
+ // a page without the navigation (the sign-in page, a dialog) has nothing to hand over
2984
+ if (links.length) post({ type: 'pgkiln:prefetch', urls: [...new Set(urls)] });
2985
+ }
2973
2986
  }
2974
2987
 
2975
2988
  // (165) live badges: every data-live seconds the page asks for its badges (navigation menu and bar,