pi-apexlang 0.2.2 → 0.4.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 (239) hide show
  1. package/README.md +22 -5
  2. package/THIRD_PARTY_NOTICES.md +2 -2
  3. package/UPSTREAM.json +2 -2
  4. package/docs/assets/overview.en.png +0 -0
  5. package/docs/assets/overview.en.svg +89 -0
  6. package/docs/assets/overview.uk.png +0 -0
  7. package/docs/assets/overview.uk.svg +89 -0
  8. package/docs/en/README.md +41 -0
  9. package/docs/en/architecture.md +73 -0
  10. package/docs/en/getting-started.md +77 -0
  11. package/docs/en/maintenance.md +83 -0
  12. package/docs/en/tool-reference.md +85 -0
  13. package/docs/uk/README.md +41 -0
  14. package/docs/uk/architecture.md +73 -0
  15. package/docs/uk/getting-started.md +77 -0
  16. package/docs/uk/maintenance.md +83 -0
  17. package/docs/uk/tool-reference.md +85 -0
  18. package/extensions/apexlang/index.ts +19 -10
  19. package/extensions/lib/apexlang-cli.d.mts +1 -2
  20. package/extensions/lib/apexlang-cli.mjs +18 -13
  21. package/extensions/lib/apexlang-local-validate.mjs +83 -0
  22. package/extensions/lib/apexlang-local-validator.py +116 -0
  23. package/extensions/lib/apexlang-runtime-validate.mjs +76 -0
  24. package/package.json +2 -1
  25. package/skills/apexlang/APEXlang Skills and Workflows.md +325 -0
  26. package/skills/apexlang/README.md +6 -6
  27. package/skills/apexlang/RELEASE-NOTES.md +2 -2
  28. package/skills/apexlang/SKILL.md +24 -19
  29. package/skills/apexlang/agents/openai.yaml +4 -3
  30. package/skills/apexlang/assets/apex-generation/components.registry.json +1001 -16
  31. package/skills/apexlang/assets/apexlang/domains-catalog.json +6 -1
  32. package/skills/apexlang/assets/component-attributes.json +1924 -180
  33. package/skills/apexlang/assets/component-policies.json +19 -10
  34. package/skills/apexlang/assets/contracts/grammar-semantic-rules.json +134 -0
  35. package/skills/apexlang/assets/contracts/package-layers.json +56 -0
  36. package/skills/apexlang/assets/contracts/page-construction-packs.json +154 -0
  37. package/skills/apexlang/assets/contracts/page-patterns.json +119 -0
  38. package/skills/apexlang/assets/grammar/apexlang.ebnf +11743 -0
  39. package/skills/apexlang/assets/indexes/font-apex-icon-index.json +1699 -0
  40. package/skills/apexlang/assets/routing-catalog-main.json +11 -10
  41. package/skills/apexlang/assets/routing-load-policy.json +35 -9
  42. package/skills/apexlang/assets/rules-mapping.json +110 -2
  43. package/skills/apexlang/assets/rules.catalog.json +1298 -0
  44. package/skills/apexlang/assets/validator-fix-recipes.json +372 -17
  45. package/skills/apexlang/assets/workspace-intelligence.json +7 -10
  46. package/skills/apexlang/manifest.json +268 -12
  47. package/skills/apexlang/references/domains/README.md +1 -1
  48. package/skills/apexlang/references/domains/page-components/buttons.md +2 -2
  49. package/skills/apexlang/references/domains/page-components/page-items.md +3 -3
  50. package/skills/apexlang/references/domains/page-components/regions/region-display-selector/workflow-region-display-selector.md +69 -0
  51. package/skills/apexlang/references/domains/page-components/regions.md +1 -0
  52. package/skills/apexlang/references/domains/template-components/comments.md +61 -0
  53. package/skills/apexlang/references/domains/template-components/registry.md +2 -0
  54. package/skills/apexlang/references/domains/template-components/templates.md +47 -0
  55. package/skills/apexlang/references/domains/template-components/timeline.md +51 -0
  56. package/skills/apexlang/references/ops/one-message-router-contract.md +2 -2
  57. package/skills/apexlang/references/ops/runtime-gates/01-direct-sqlcl-import.md +1 -1
  58. package/skills/apexlang/references/ops/runtime-gates/02-direct-sqlcl-validate-gate.md +1 -1
  59. package/skills/apexlang/references/ops/runtime-gates.md +17 -16
  60. package/skills/apexlang/references/ops/sqlcl-agents/00-connection-gate.md +7 -7
  61. package/skills/apexlang/references/ops/sqlcl.md +7 -8
  62. package/skills/apexlang/references/policies/compiler-prop-map.md +6 -4
  63. package/skills/apexlang/references/policies/governance/00-governance.md +2 -2
  64. package/skills/apexlang/references/policies/memory-bank/00-guard/ai.guard.md +126 -922
  65. package/skills/apexlang/references/policies/memory-bank/20-data/apex.logic.md +3 -3
  66. package/skills/apexlang/references/policies/memory-bank/20-data/db.connection.md +9 -11
  67. package/skills/apexlang/references/policies/memory-bank/30-pages/apex.cards-page.md +95 -0
  68. package/skills/apexlang/references/policies/memory-bank/30-pages/apex.page.md +2 -2
  69. package/skills/apexlang/references/policies/memory-bank/30-pages/apex.smart-filter-search.md +145 -74
  70. package/skills/apexlang/references/policies/memory-bank/40-components/apex.region-interactions.md +9 -2
  71. package/skills/apexlang/references/policies/memory-bank/40-components/apex.region-media.md +6 -5
  72. package/skills/apexlang/references/policies/memory-bank/systemPatterns.md +9 -1
  73. package/skills/apexlang/references/workflows/apex-generation/agents/20-agent-draft.md +51 -232
  74. package/skills/apexlang/references/workflows/apex-generation/agents/30-agent-critique.md +49 -449
  75. package/skills/apexlang/references/workflows/apex-generation/agents/40-agent-revision.md +38 -238
  76. package/skills/apexlang/references/workflows/apex-generation/nlu/nlu-routing-test-matrix.md +8 -2
  77. package/skills/apexlang/references/workflows/apex-generation/nlu/nlu-routing-validation-notes.md +19 -3
  78. package/skills/apexlang/references/workflows/apex-generation/registry.md +15 -1
  79. package/skills/apexlang/references/workflows/apex-generation/templates.md +1 -1
  80. package/skills/apexlang/references/workflows/apex-generation.md +1 -1
  81. package/skills/apexlang/references/workflows/apexlang/apexlang-execution-model.md +5 -5
  82. package/skills/apexlang/references/workflows/apexlang/prompt-contracts.md +81 -10
  83. package/skills/apexlang/references/workflows/apexlang/workflow-create-app-from-fr-and-model.md +18 -7
  84. package/skills/apexlang/release-notes.json +156 -0
  85. package/skills/apexlang/runtime/grammar_contract.mjs +1166 -0
  86. package/skills/apexlang/runtime/internal/python/format_apexlang.py +210 -0
  87. package/skills/apexlang/runtime/internal/python/validate_apexlang.py +14142 -5843
  88. package/skills/apexlang/runtime/internal/python/validator_common.py +2 -0
  89. package/skills/apexlang/runtime/lib/catalogs.mjs +1026 -0
  90. package/skills/apexlang/runtime/lib/common.mjs +35 -0
  91. package/skills/apexlang/runtime/runtime.bundle.mjs +457 -57
  92. package/skills/apexlang/templates/items/combobox/combobox.explicit-defaults.md +1 -1
  93. package/skills/apexlang/templates/items/date-picker/date-picker._common.md +1 -1
  94. package/skills/apexlang/templates/items/date-picker/date-picker.explicit-defaults.md +1 -1
  95. package/skills/apexlang/templates/items/file-upload/file-upload._common.md +30 -24
  96. package/skills/apexlang/templates/items/file-upload/file-upload.compact-template.md +6 -0
  97. package/skills/apexlang/templates/items/file-upload/file-upload.explicit-defaults.md +23 -8
  98. package/skills/apexlang/templates/items/file-upload/file-upload.minimal.md +6 -0
  99. package/skills/apexlang/templates/items/hidden-item/hidden-item._common.md +1 -1
  100. package/skills/apexlang/templates/items/hidden-item/hidden-item.explicit-defaults.md +1 -1
  101. package/skills/apexlang/templates/items/items._common.md +3 -2
  102. package/skills/apexlang/templates/items/list-manager/list-manager.explicit-defaults.md +1 -1
  103. package/skills/apexlang/templates/items/markdown-editor/markdown-editor._common.md +1 -1
  104. package/skills/apexlang/templates/items/markdown-editor/markdown-editor.explicit-defaults.md +1 -1
  105. package/skills/apexlang/templates/items/number-field/number-field._common.md +8 -6
  106. package/skills/apexlang/templates/items/number-field/number-field.explicit-defaults.md +12 -2
  107. package/skills/apexlang/templates/items/popup-lov/popup-lov.explicit-defaults.md +1 -1
  108. package/skills/apexlang/templates/items/rich-text-editor/rich-text-editor._common.md +1 -1
  109. package/skills/apexlang/templates/items/rich-text-editor/rich-text-editor.explicit-defaults.md +1 -1
  110. package/skills/apexlang/templates/items/select-many/standard.md +1 -1
  111. package/skills/apexlang/templates/items/shuttle/shuttle.explicit-defaults.md +1 -1
  112. package/skills/apexlang/templates/items/switch/switch._common.md +8 -8
  113. package/skills/apexlang/templates/items/switch/switch.explicit-defaults.md +1 -1
  114. package/skills/apexlang/templates/items/text-area/text-area._common.md +2 -3
  115. package/skills/apexlang/templates/items/text-area/text-area.explicit-defaults.md +1 -1
  116. package/skills/apexlang/templates/items/text-area/text-area.required-length.md +1 -3
  117. package/skills/apexlang/templates/items/text-autocomplete/text-autocomplete.explicit-defaults.md +1 -1
  118. package/skills/apexlang/templates/items/text-autocomplete/text-autocomplete.required-length.md +1 -3
  119. package/skills/apexlang/templates/items/text-field/text-field._common.md +2 -3
  120. package/skills/apexlang/templates/items/text-field/text-field.explicit-defaults.md +1 -1
  121. package/skills/apexlang/templates/items/text-field/text-field.required-length.md +1 -3
  122. package/skills/apexlang/templates/page-examples/faceted-search/faceted-search.example.md +0 -5
  123. package/skills/apexlang/templates/page-examples/form-page/form-page.example.md +0 -9
  124. package/skills/apexlang/templates/page-examples/interactive-report-page/interactive-report-page.example.md +2 -2
  125. package/skills/apexlang/templates/page-examples/login-page/login-page.example.md +0 -8
  126. package/skills/apexlang/templates/page-examples/task-definition-initiated-tasks-page/task-definition-initiated-tasks-page.example.md +7 -17
  127. package/skills/apexlang/templates/page-examples/task-definition-my-tasks-page/task-definition-my-tasks-page.example.md +7 -65
  128. package/skills/apexlang/templates/page-examples/task-definition-task-details/task-definition-task-details.example.md +38 -201
  129. package/skills/apexlang/templates/region-components/calendar/calendar.custom-styling.md +3 -1
  130. package/skills/apexlang/templates/region-components/calendar/calendar.faceted-search.md +3 -2
  131. package/skills/apexlang/templates/region-components/cards/README.md +12 -4
  132. package/skills/apexlang/templates/region-components/cards/cards._common.md +176 -37
  133. package/skills/apexlang/templates/region-components/cards/cards._index.md +2 -1
  134. package/skills/apexlang/templates/region-components/cards/cards.refresh-after-dialog.md +46 -0
  135. package/skills/apexlang/templates/region-components/cards/cards.refresh-on-change.md +58 -0
  136. package/skills/apexlang/templates/region-components/cards/cards.rest-source.md +54 -18
  137. package/skills/apexlang/templates/region-components/cards/cards.standard.md +37 -21
  138. package/skills/apexlang/templates/region-components/chart/chart._series._common.md +1 -4
  139. package/skills/apexlang/templates/region-components/chart/chart.pie.md +6 -2
  140. package/skills/apexlang/templates/region-components/chart/chart.status-meter-gauge.md +1 -1
  141. package/skills/apexlang/templates/region-components/chart/chart.stock.md +2 -0
  142. package/skills/apexlang/templates/region-components/chart/features/chart.feature-chart-links.md +9 -7
  143. package/skills/apexlang/templates/region-components/faceted-search/faceted-search._common.md +1 -14
  144. package/skills/apexlang/templates/region-components/form/form._items._common.md +1 -5
  145. package/skills/apexlang/templates/region-components/interactive-report/interactive-report._columns._common.md +2 -6
  146. package/skills/apexlang/templates/region-components/interactive-report/interactive-report.page-header-actions.md +1 -7
  147. package/skills/apexlang/templates/region-components/list/README.md +1 -1
  148. package/skills/apexlang/templates/region-components/list/list._common.md +1 -1
  149. package/skills/apexlang/templates/region-components/map/map.backgrounds.md +12 -10
  150. package/skills/apexlang/templates/region-components/map/map.layer.extruded-polygons.md +16 -12
  151. package/skills/apexlang/templates/region-components/map/map.layer.heat-map.md +10 -7
  152. package/skills/apexlang/templates/region-components/map/map.layer.lines.md +10 -8
  153. package/skills/apexlang/templates/region-components/map/map.layer.polygons.md +21 -18
  154. package/skills/apexlang/templates/region-components/map/map.region.background-custom.md +25 -19
  155. package/skills/apexlang/templates/region-components/map/map.region.background-shared.md +19 -13
  156. package/skills/apexlang/templates/region-components/map/map.region.bbox-sql.md +13 -13
  157. package/skills/apexlang/templates/region-components/map/map.region.bbox-static.md +2 -2
  158. package/skills/apexlang/templates/region-components/map/map.region.browser-location.md +3 -7
  159. package/skills/apexlang/templates/region-components/map/map.region.init-position-sql.md +7 -7
  160. package/skills/apexlang/templates/region-components/region-display-selector/README.md +5 -2
  161. package/skills/apexlang/templates/region-components/region-display-selector/region-display-selector._common.md +60 -7
  162. package/skills/apexlang/templates/region-components/region-display-selector/region-display-selector._index.md +4 -1
  163. package/skills/apexlang/templates/region-components/region-display-selector/region-display-selector.permutations.md +55 -0
  164. package/skills/apexlang/templates/region-components/region-display-selector/region-display-selector.standard.md +91 -5
  165. package/skills/apexlang/templates/region-components/smart-filter-search/README.md +6 -2
  166. package/skills/apexlang/templates/region-components/smart-filter-search/smart-filter-search._common.md +107 -46
  167. package/skills/apexlang/templates/region-components/smart-filter-search/smart-filter-search._index.md +4 -3
  168. package/skills/apexlang/templates/region-components/smart-filter-search/smart-filter-search.standard.md +33 -17
  169. package/skills/apexlang/templates/shared-components/component-settings/component-settings._common.md +1 -0
  170. package/skills/apexlang/templates/shared-components/component-settings.example.md +1 -0
  171. package/skills/apexlang/templates/shared-components/email-templates.example.md +1 -1
  172. package/skills/apexlang/templates/shared-components/rest-data-sources/example_rest_data_source.example.md +40 -46
  173. package/skills/apexlang/templates/shared-components/task-definitions/action-task.example.md +2 -30
  174. package/skills/apexlang/templates/shared-components/task-definitions/approve-request.example.md +3 -31
  175. package/skills/apexlang/templates/template-components/README.md +27 -15
  176. package/skills/apexlang/templates/template-components/avatar/README.md +56 -0
  177. package/skills/apexlang/templates/template-components/avatar/avatar._common.md +149 -0
  178. package/skills/apexlang/templates/template-components/avatar/avatar._index.md +42 -0
  179. package/skills/apexlang/templates/template-components/{avatar._template_options.md → avatar/avatar._template_options.md} +1 -1
  180. package/skills/apexlang/templates/template-components/avatar/avatar.report-icon.md +48 -0
  181. package/skills/apexlang/templates/template-components/avatar/avatar.report-image-url-column.md +62 -0
  182. package/skills/apexlang/templates/template-components/avatar/avatar.report-initials.md +54 -0
  183. package/skills/apexlang/templates/template-components/badge/README.md +38 -0
  184. package/skills/apexlang/templates/template-components/badge/badge._common.md +183 -0
  185. package/skills/apexlang/templates/template-components/badge/badge._index.md +20 -0
  186. package/skills/apexlang/templates/template-components/badge/badge.report-link.md +66 -0
  187. package/skills/apexlang/templates/template-components/badge/badge.report-minimal.md +76 -0
  188. package/skills/apexlang/templates/template-components/comments/README.md +20 -0
  189. package/skills/apexlang/templates/template-components/comments/comments._common.md +43 -0
  190. package/skills/apexlang/templates/template-components/comments/comments._index.md +25 -0
  191. package/skills/apexlang/templates/template-components/{comments._template_options.md → comments/comments._template_options.md} +2 -1
  192. package/skills/apexlang/templates/template-components/comments/comments.apex-task-comments.md +77 -0
  193. package/skills/apexlang/templates/template-components/comments/comments.partial-column.md +120 -0
  194. package/skills/apexlang/templates/template-components/comments/comments.permutations.md +425 -0
  195. package/skills/apexlang/templates/template-components/content-row/README.md +1 -1
  196. package/skills/apexlang/templates/template-components/content-row/content-row._common.md +1 -1
  197. package/skills/apexlang/templates/template-components/content-row/content-row._index.md +1 -1
  198. package/skills/apexlang/templates/template-components/content-row/content-row._template_options.md +1 -1
  199. package/skills/apexlang/templates/template-components/flexbox-container/README.md +9 -0
  200. package/skills/apexlang/templates/template-components/flexbox-container/flexbox-container._index.md +13 -0
  201. package/skills/apexlang/templates/template-components/media-list/README.md +100 -0
  202. package/skills/apexlang/templates/template-components/media-list/media-list._common.md +174 -0
  203. package/skills/apexlang/templates/template-components/media-list/media-list._index.md +50 -0
  204. package/skills/apexlang/templates/template-components/{media-list._template_options.md → media-list/media-list._template_options.md} +8 -2
  205. package/skills/apexlang/templates/template-components/media-list/media-list.partial.md +50 -0
  206. package/skills/apexlang/templates/template-components/media-list/media-list.report-avatar-badge.md +76 -0
  207. package/skills/apexlang/templates/template-components/media-list/media-list.report-base.md +71 -0
  208. package/skills/apexlang/templates/template-components/media-list/media-list.report-grouped.md +40 -0
  209. package/skills/apexlang/templates/template-components/media-list/media-list.report-layouts.md +50 -0
  210. package/skills/apexlang/templates/template-components/media-list/media-list.report-link.md +53 -0
  211. package/skills/apexlang/templates/template-components/metric-card/README.md +19 -4
  212. package/skills/apexlang/templates/template-components/metric-card/metric-card._common.md +122 -29
  213. package/skills/apexlang/templates/template-components/metric-card/metric-card._index.md +6 -0
  214. package/skills/apexlang/templates/template-components/metric-card/metric-card._template_options.md +47 -2
  215. package/skills/apexlang/templates/template-components/metric-card/metric-card.partial-minimal.md +51 -0
  216. package/skills/apexlang/templates/template-components/metric-card/metric-card.permutations.md +56 -0
  217. package/skills/apexlang/templates/template-components/metric-card/metric-card.report-avatar-badge.md +98 -0
  218. package/skills/apexlang/templates/template-components/metric-card/metric-card.report-grouping-selection.md +131 -0
  219. package/skills/apexlang/templates/template-components/metric-card/metric-card.report-link.md +66 -0
  220. package/skills/apexlang/templates/template-components/metric-card/metric-card.report-minimal.md +97 -0
  221. package/skills/apexlang/templates/template-components/template-components.registry.json +90 -1
  222. package/skills/apexlang/templates/template-components/timeline/README.md +19 -0
  223. package/skills/apexlang/templates/template-components/timeline/timeline._common.md +43 -0
  224. package/skills/apexlang/templates/template-components/timeline/timeline._index.md +24 -0
  225. package/skills/apexlang/templates/template-components/{timeline._template_options.md → timeline/timeline._template_options.md} +2 -1
  226. package/skills/apexlang/templates/template-components/timeline/timeline.permutations.md +399 -0
  227. package/skills/apexlang/templates/template-components/timeline/timeline.report-sample-data.md +168 -0
  228. package/skills/apexlang/templates/workspace-components/credentials/credentials-for-open-ai.example.md +1 -1
  229. package/skills/apexlang/templates/workspace-components/generative-ai-services/open-ai.example.md +8 -6
  230. package/skills/apexlang/tools/apexctl.mjs +167 -4
  231. package/skills/apexlang/tools/compiler-truth-audit.mjs +95 -63
  232. package/skills/apexlang/tools/query-valid-props-context.mjs +30 -0
  233. package/skills/apexlang/tools/query-valid-props-normalize.mjs +1 -0
  234. package/skills/apexlang/tools/query-valid-props-runtime.mjs +13 -8
  235. package/skills/apexlang/tools/query-valid-props-semantics.mjs +391 -0
  236. package/skills/apexlang/tools/query-valid-props-template-components.mjs +15 -1
  237. package/skills/apexlang/tools/query-valid-props.mjs +198 -216
  238. /package/skills/apexlang/templates/template-components/{badge._template_options.md → badge/badge._template_options.md} +0 -0
  239. /package/skills/apexlang/templates/template-components/{flexbox-container._template_options.md → flexbox-container/flexbox-container._template_options.md} +0 -0
@@ -17,18 +17,23 @@ Document the native metric-card region emitted as `themeTemplateComponent/metric
17
17
  4. For dashboard KPI strips, default `appearance.template` to `@/blank-with-attributes` so the Metric Card renders without visible standard region chrome.
18
18
  5. Use `@/standard` for Metric Card only when the requested design explicitly needs a titled or landmarked visible region wrapper.
19
19
  6. Emit `advanced { htmlDomId: ... }` only when external client code, dynamic actions, or other page logic must target a known region DOM id.
20
- 7. Keep `display: report` in `componentAppearance`.
21
- 8. Use `column-metric-card` for source-column mappings.
22
- 9. Keep plugin attribute names and enumerated values aligned with `metric-card._template_options.md`, `../avatar._template_options.md`, and `../badge._template_options.md`.
23
- 10. In report mode, treat child `column (...)` metadata as part of the emitted Metric Card source contract, not as an optional compiler appeasement detail.
20
+ 7. Set `componentAppearance.display` to `report` for multi-row report output or `partial` for one component without the report wrapper.
21
+ 8. Use the compiler-resolved `column-f` production for source-column mappings.
22
+ 9. Keep all Metric Card settings and nested avatar/badge/grouping values aligned with `metric-card._template_options.md`; the standalone Avatar and Badge inventories do not define Metric Card's nested groups.
23
+ 10. In report mode, treat child `column (...)` metadata as part of the emitted Metric Card source contract, not as an optional compiler appeasement detail. In partial mode, omit report-only settings and blocks.
24
24
  11. Emit explicit child `column (...)` metadata for every delivered source projection before finals. Do not satisfy the compiler by adding only one placeholder column when the source projects multiple columns.
25
25
  12. A single Metric Card region can render multiple cards. When the prompt asks for several independent metrics in one region, prefer a multi-row SQL source that normalizes the projections for each card, commonly by `UNION ALL`-ing one row per metric into a shared column shape.
26
- 13. Metric Card `settings`, `plugin-avatar`, `plugin-badge`, and `rowSelection` expose more value hooks than just `title` and `metric`. Use the accepted property surface from `metric-card._template_options.md`, `../avatar._template_options.md`, and `../badge._template_options.md` when those behaviors are needed.
27
- 14. Do not require settings property names to match child-column names one-for-one. Those properties may bind to literals, `&COLUMN_NAME.` substitutions, or other accepted placeholders; the child `column (...)` blocks still describe the delivered source projection.
28
- 15. Metric Card avatar support is export-backed in this runtime through `plugin-avatar {}`. Use `plugin-avatar.displayAvatar` for visibility and keep avatar configuration in that block.
29
- 16. Metric Card badge support is export-backed in this runtime through `plugin-badge {}`. Use `plugin-badge.displayBadge` for visibility and keep badge configuration in that block.
26
+ 13. Metric Card `settings`, `plugin-avatar`, `plugin-badge`, and `rowSelection` expose more value hooks than just `title` and `metric`. Use the accepted property surface from `metric-card._template_options.md` when those behaviors are needed.
27
+ 14. Do not require settings property names to match child-column names one-for-one. Rendered `settings.title`, `settings.metric`, and `settings.meta` may bind to literals or `&COLUMN_NAME.` substitutions. Source-selector attributes use bare delivered aliases: `plugin-avatar.initials`, `plugin-badge.value`, `plugin-badge.state`, and a source-backed `plugin-badge.label` must not use `&COLUMN_NAME.`.
28
+ 15. Metric Card avatar support is export-backed in this runtime through `plugin-avatar {}`. Use `plugin-avatar.displayAvatar` for visibility, emit exactly one payload matching `plugin-avatar.type`, and keep Metric Card-specific position/alignment/style/shape/size configuration in that block.
29
+ 16. Metric Card badge support is export-backed in this runtime through `plugin-badge {}`. Use `plugin-badge.displayBadge` for visibility and require both `plugin-badge.label` and `plugin-badge.value` when the block is emitted.
30
30
  17. When `rowSelection` is emitted with any non-null mode, at least one child `column (...)` must mark the row identity with `source.primaryKey: true`.
31
31
  18. For every emitted child column, set `source.dataType` to one exact token from the Metric Card Column Data Types inventory below.
32
+ 19. Always emit `settings.metric`; it is required by the APEX 26.1 Metric Card contract.
33
+ 20. Query-column-backed `settings.title`, `settings.metric`, and `settings.meta` values use `&COLUMN_NAME.` substitution syntax. Literal text remains valid.
34
+ 21. Metric Card exposes only `action.position: link`. Emit no action template because the component has no action templates.
35
+ 22. Use declarative action targets. Do not emit arbitrary JavaScript URLs, inline handlers, or unreviewed external URLs.
36
+ 23. Rely on authenticated page security by default. Add a region or action authorization only when requirements identify a stricter existing scheme; never invent an authorization alias.
32
37
 
33
38
  # Variable Contract
34
39
 
@@ -39,43 +44,65 @@ Document the native metric-card region emitted as `themeTemplateComponent/metric
39
44
  | type | yes | enum | Always `themeTemplateComponent/metricCard`. |
40
45
  | appearance.template | yes | alias | Region template alias such as `@/standard` or `@/blank-with-attributes`. |
41
46
  | appearance.templateOptions | optional | array/string | Template modifiers. Default to `#DEFAULT#` unless the chosen region template documents another accepted value. |
47
+ | componentAppearance.display | yes | enum | `partial` or `report`. Use `partial` for one component and `report` for multiple report rows. |
42
48
  | advanced.htmlDomId | optional | string | Use only when external page logic must target a known rendered DOM id for the metric-card region. |
43
49
  | settings.title | optional | string | Title binding or static text. |
44
50
  | settings.titleCssClasses | optional | string | Optional title CSS classes. May be literal or substitution-backed. |
45
- | settings.metric | optional | string | Metric binding or static text. |
51
+ | settings.metric | yes | string | Required metric binding or static text. Query-column mappings use `&COLUMN_NAME.`. |
46
52
  | settings.metricCssClasses | optional | string | Optional metric CSS classes. May be literal or substitution-backed. |
47
53
  | settings.meta | optional | string | Optional meta text/value binding. |
48
54
  | settings.metaCssClasses | optional | string | Optional meta CSS classes. May be literal or substitution-backed. |
49
- | settings.layout | optional | enum | Layout token from `metric-card._template_options.md`, for example `2Columns`, `3Columns`, `stacked`, or `overflow`. |
50
- | settings.itemCssClasses | optional | string | Optional per-card/item CSS classes when report layout needs them. |
55
+ | settings.layout | report-only | enum | Layout token from `metric-card._template_options.md`, for example `2Columns`, `3Columns`, `stacked`, or `overflow`. Omit in partial mode. |
56
+ | settings.itemCssClasses | report-only | string | Optional per-card/item CSS classes. Omit in partial mode. |
51
57
  | source.sqlQuery | conditional | string | When one Metric Card region must render several cards, prefer a multi-row query with one normalized row per card. `UNION ALL` across per-metric SELECTs is the default pattern when the metrics originate from separate aggregates. |
58
+ | orderBy.type | conditional | enum | Grouped output uses `staticValue`. |
59
+ | orderBy.orderByClause | conditional | string | Required for grouped output and starts with every grouped child column in grouping order. |
52
60
  | plugin-avatar.displayAvatar | optional | boolean | Enables avatar rendering for the metric card. Emit inside `plugin-avatar`, not inside `settings`. |
53
61
  | plugin-avatar.type | conditional | enum | Avatar type when avatar rendering is enabled. Supported values include `image`, `initials`, and `icon`. |
54
- | plugin-avatar.icon | conditional | string | Avatar icon mapping/value when `type` is `icon`. |
55
- | plugin-avatar.initials | conditional | string | Avatar initials mapping/value when `type` is `initials`. |
62
+ | plugin-avatar.icon | conditional | string | Static build-pinned Font APEX icon or `&COLUMN.` substitution backed by a proven `varchar2` literal/CASE allowlist when `type` is `icon`. |
63
+ | plugin-avatar.initials | conditional | source-column identifier | Required when `type` is `initials`. Use a bare delivered `varchar2` alias, not `&COLUMN.` substitution syntax. |
56
64
  | plugin-avatar.image.type | conditional | enum | Image source type when `plugin-avatar.type` is `image`. Supported values include `blobColumn`, `url`, and `urlColumn` when the owning source delivers the needed image payload. |
57
65
  | plugin-avatar.image.blobColumn | conditional | string | Image blob column when `plugin-avatar.image.type` is `blobColumn`. |
58
66
  | plugin-avatar.image.filenameColumn | conditional | string | Filename companion column when a blob-column avatar image is used. |
59
67
  | plugin-avatar.image.mimeTypeColumn | conditional | string | MIME-type companion column when a blob-column avatar image is used. |
60
68
  | plugin-avatar.image.lastUpdatedColumn | conditional | string | Last-updated companion column when a blob-column avatar image is used. |
69
+ | plugin-avatar.image.url | conditional | string | Static application-managed image path using `#APP_FILES#` or `#APEX_FILES#` when image type is `url`. |
70
+ | plugin-avatar.image.urlColumn | conditional | string | Projected `varchar2` URL column built in SQL from `:APP_FILES` or `:APEX_FILES` plus one static relative path. |
71
+ | plugin-avatar.position | conditional | enum | Avatar position: `inline` or `top`. |
72
+ | plugin-avatar.alignment | conditional | enum | Inline avatar alignment: `start`, `center`, or `end`; omit for `position: top`. |
73
+ | plugin-avatar.shape | optional | enum | Metric Card avatar shape: `circular`, `noShape`, `rounded`, or `square`. |
74
+ | plugin-avatar.size | optional | enum | Metric Card avatar size: `small`, `medium`, or `large`. |
75
+ | plugin-avatar.style | optional | enum | `subtle`, only when avatar type is `icon` or `initials`; omit for `image`. |
61
76
  | plugin-badge.displayBadge | optional | boolean | Enables badge rendering for the metric card. Emit inside `plugin-badge`, not inside `settings`. |
62
- | plugin-badge.label | conditional | string | Badge label/value hook when badge rendering is enabled. |
63
- | plugin-badge.value | conditional | string | Badge value hook when badge rendering is enabled. |
64
- | plugin-badge.state | optional | string | Badge state/value hook when badge rendering is enabled. |
65
- | plugin-badge.icon | optional | string | Badge icon when the design calls for one. |
66
- | plugin-badge.style | optional | enum | Badge style token from `badge._template_options.md`, for example `subtle` or `outline`. |
67
- | plugin-badge.shape | optional | enum | Badge shape token from `badge._template_options.md`, for example `circular`, `rounded`, or `square`. |
68
- | plugin-badge.size | optional | enum | Badge size token from `badge._template_options.md`, for example `small`, `medium`, or `large`. |
77
+ | plugin-badge.label | conditional | string/source-column identifier | Required when badge rendering is enabled. Use a bare alias when source-backed. |
78
+ | plugin-badge.value | conditional | source-column identifier | Required when badge rendering is enabled. Use a bare delivered alias. |
79
+ | plugin-badge.state | optional | source-column identifier | Optional `varchar2` alias whose values are restricted to `danger`, `warning`, `success`, or `info`. |
80
+ | plugin-badge.icon | optional | string | Static build-pinned Font APEX icon when the design calls for one. |
81
+ | plugin-badge.style | optional | enum | Metric Card Badge style token from `metric-card._template_options.md`, for example `subtle` or `outline`. |
82
+ | plugin-badge.shape | optional | enum | Metric Card Badge shape token from `metric-card._template_options.md`, for example `circular`, `rounded`, or `square`. |
83
+ | plugin-badge.size | optional | enum | Metric Card Badge size token from `metric-card._template_options.md`, for example `small`, `medium`, or `large`. |
69
84
  | plugin-badge.displayLabel | optional | boolean | Optional label visibility toggle when the design needs it. |
85
+ | plugin-grouping.groupTitle | optional | string | Group title for grouped report output. |
86
+ | plugin-grouping.groupIcon | optional | string | Static build-pinned Font APEX icon; emit only when a group title is present. |
70
87
  | rowSelection.type | optional | enum | Optional row-selection mode when the Metric Card region participates in row-selection behavior. Use `focusOnly`, `singleSelection`, or `multipleSelection`. |
71
88
  | rowSelection.currentSelectionPageItem | conditional | string | Current-selection page item for row-selection modes that persist selection state. Omit it for `focusOnly`. |
72
89
  | rowSelection.selectAllPageItem | conditional | string | Select-all page item for `multipleSelection`. Omit it for `focusOnly` and `singleSelection`. |
90
+ | messages.whenNoDataFound | report-only | string | Optional no-data message. Omit in partial mode. |
91
+ | messages.noDataFoundIcon | report-only | icon | Optional static Font APEX no-data icon. Omit in partial mode. |
92
+ | pagination.entitiesPerPage | report-only | number | Optional report page size. This is the only supported Metric Card pagination property. |
73
93
  | column.name | conditional | string | Required for each explicit child column emitted in report mode. |
74
94
  | column.layout.sequence | conditional | number | Required for each emitted child column. |
75
- | column.source.databaseColumn | conditional | string | Required for each emitted child column. |
76
- | column.source.dataType | conditional | enum | Required for each emitted child column. Use one exact value from Metric Card Column Data Types. |
77
- | column.source.primaryKey | optional | boolean | Emit `true` only on the identity column when row identity matters. |
95
+ | column.source.databaseColumn | required | identifier | Required for each emitted child column. |
96
+ | column.source.dataType | required | enum | Use one exact Metric Card value. |
97
+ | column.source.primaryKey | optional | boolean | Emit `true` only for a row-identity column when row identity is needed. |
78
98
  | columns | conditional | list | Required in report mode. Generate one explicit child `column (...)` block for every delivered source projection. |
99
+ | action.position | conditional | enum | Metric Card row link position. The only supported value is `link`. |
100
+ | action.layout.sequence | conditional | number | Required deterministic action sequence. |
101
+ | action.behavior.type | conditional | enum | Row-link behavior: `redirectThisApp`, `redirectOtherApp`, `redirectUrl`, or `triggerAction`. |
102
+ | action.behavior.target | conditional | object | Required for declarative application-page targets. |
103
+ | action.behavior.targetUrl | conditional | string | Required for `redirectUrl`; use a reviewed relative URL or an `http`, `https`, `mailto`, or `tel` URL without an unsafe scheme. Keep any substitutions inside query parameters so the scheme, host, path, and fragment remain static. |
104
+ | action.behavior.linkAttributes | optional | string | Static link attributes without inline event handlers, URL-bearing attributes, scriptable CSS, or unsafe dynamic substitutions. |
105
+ | security.authorizationScheme | optional | alias | Existing stricter region authorization. Omit when page authentication is sufficient. |
79
106
 
80
107
  # Metric Card Column Data Types
81
108
 
@@ -107,7 +134,11 @@ region {{regionStaticId}} (
107
134
  templateOptions: {{appearance.templateOptions}}
108
135
  }
109
136
  componentAppearance {
110
- display: report
137
+ display: {{componentAppearance.display}}
138
+ }
139
+ orderBy {
140
+ type: {{orderBy.type}}
141
+ orderByClause: {{orderBy.orderByClause}}
111
142
  }
112
143
  advanced {
113
144
  htmlDomId: {{advanced.htmlDomId}}
@@ -128,6 +159,15 @@ region {{regionStaticId}} (
128
159
  icon: {{pluginAvatar.icon}}
129
160
  initials: {{pluginAvatar.initials}}
130
161
  image: {{pluginAvatar.image}}
162
+ position: {{pluginAvatar.position}}
163
+ alignment: {{pluginAvatar.alignment}}
164
+ shape: {{pluginAvatar.shape}}
165
+ size: {{pluginAvatar.size}}
166
+ style: {{pluginAvatar.style}}
167
+ }
168
+ plugin-grouping {
169
+ groupTitle: {{pluginGrouping.groupTitle}}
170
+ groupIcon: {{pluginGrouping.groupIcon}}
131
171
  }
132
172
  plugin-badge {
133
173
  displayBadge: {{pluginBadge.displayBadge}}
@@ -140,11 +180,33 @@ region {{regionStaticId}} (
140
180
  size: {{pluginBadge.size}}
141
181
  displayLabel: {{pluginBadge.displayLabel}}
142
182
  }
183
+ action {{action.staticId}} (
184
+ position: link
185
+ layout {
186
+ sequence: {{action.layout.sequence}}
187
+ }
188
+ behavior {
189
+ type: {{action.behavior.type}}
190
+ target: {{action.behavior.target}}
191
+ targetUrl: {{action.behavior.targetUrl}}
192
+ linkAttributes: {{action.behavior.linkAttributes}}
193
+ }
194
+ security {
195
+ authorizationScheme: {{action.security.authorizationScheme}}
196
+ }
197
+ )
143
198
  rowSelection {
144
199
  type: {{rowSelection.type}}
145
200
  currentSelectionPageItem: {{rowSelection.currentSelectionPageItem}}
146
201
  selectAllPageItem: {{rowSelection.selectAllPageItem}}
147
202
  }
203
+ messages {
204
+ whenNoDataFound: {{messages.whenNoDataFound}}
205
+ noDataFoundIcon: {{messages.noDataFoundIcon}}
206
+ }
207
+ pagination {
208
+ entitiesPerPage: {{pagination.entitiesPerPage}}
209
+ }
148
210
  column {{column.name}} (
149
211
  layout {
150
212
  sequence: {{column.layout.sequence}}
@@ -156,6 +218,9 @@ region {{regionStaticId}} (
156
218
  }
157
219
  )
158
220
  {{columns}}
221
+ security {
222
+ authorizationScheme: {{security.authorizationScheme}}
223
+ }
159
224
  )
160
225
  ```
161
226
 
@@ -166,11 +231,18 @@ region {{regionStaticId}} (
166
231
  - Use `appearance.template: @/standard` only when the design explicitly needs a titled or landmarked visible region wrapper.
167
232
  - Keep avatar or meta blocks only when the owning design requires them.
168
233
  - Keep metric-card-specific layout settings in the `settings` block.
234
+ - In partial mode, omit `settings.layout`, `settings.itemCssClasses`, `plugin-grouping`, `rowSelection`, `messages`, and `pagination`; APEX 26.1 rejects those report-scoped properties in partial mode.
169
235
  - Metric Card `settings` may include title/metric/meta bindings plus their CSS-class companions, layout tokens, and item-level CSS classes from `metric-card._template_options.md`.
170
- - Metric Card settings/plugin value hooks do not need to have the same names as child columns. Bind them to literals, `&COLUMN_NAME.` substitutions, or other accepted placeholders as needed.
171
- - For Metric Card avatar rendering, use `plugin-avatar.displayAvatar` for visibility and keep avatar configuration in `plugin-avatar`.
172
- - For `plugin-avatar.type: image`, emit the nested `image: { ... }` object using the accepted source mode. The export-backed blob-column shape is `type: blobColumn` plus `blobColumn`, `filenameColumn`, `mimeTypeColumn`, and `lastUpdatedColumn`.
173
- - For Metric Card badge rendering, use `plugin-badge.displayBadge` for visibility and keep badge configuration in `plugin-badge`.
236
+ - Bind query-backed `settings.title`, `settings.metric`, and `settings.meta` text to `&COLUMN_NAME.` substitutions.
237
+ - Metric Card rendered-text settings do not need to have the same names as child columns. Bind `settings.title`, `settings.metric`, and `settings.meta` to literals or `&COLUMN_NAME.` substitutions as needed; use bare aliases for source-selector plugin attributes.
238
+ - For Metric Card avatar rendering, use `plugin-avatar.displayAvatar` for visibility and keep avatar configuration in `plugin-avatar`. Emit exactly one of `icon`, `initials`, or `image` to match `type`.
239
+ - Avatar icons may be static Font APEX literals or `&COLUMN.` substitutions. A source-backed icon column must be `varchar2`, and every SQL literal or CASE result must be provable against the pinned Font APEX catalogue.
240
+ - Use a bare projected `varchar2` alias for `plugin-avatar.initials`. Use `alignment` only with `position: inline`.
241
+ - Emit `plugin-avatar.style: subtle` only for `type: icon` or `type: initials`; omit `style` for `type: image`.
242
+ - For `plugin-avatar.type: image`, emit the nested `image: { ... }` object using the accepted source mode. The export-backed blob-column shape is `type: blobColumn` plus typed `blobColumn`, `filenameColumn`, `mimeTypeColumn`, and `lastUpdatedColumn` aliases. URL-column images must be projected from `:APP_FILES` or `:APEX_FILES` plus one static relative path; static URL images use the matching `#APP_FILES#` or `#APEX_FILES#` path.
243
+ - For Metric Card badge rendering, use `plugin-badge.displayBadge` for visibility and keep badge configuration in `plugin-badge`. Emit both `label` and `value`; source-backed label/value/state selectors use bare projected aliases.
244
+ - Keep optional badge state values restricted to lowercase `danger`, `warning`, `success`, or `info`, matching the Badge contract introduced by the standalone Badge implementation.
245
+ - Keep `plugin-grouping` only for grouped report output. Emit a static catalogue-listed Font APEX `groupIcon` only with `groupTitle`, mark the grouping child column with `appearance.group: true`, and place grouped columns first in deterministic ordering.
174
246
  - Omit `advanced { htmlDomId: ... }` unless external page logic must target a known rendered DOM id. Native runtime behavior can use the generated region id without requiring an explicit `htmlDomId`.
175
247
  - A Metric Card region may render multiple cards from multiple result rows.
176
248
  - When the page needs several independent metrics in one Metric Card region, prefer a normalized multi-row source with one row per card.
@@ -178,10 +250,17 @@ region {{regionStaticId}} (
178
250
  - Do not emit `settings.displayAvatar` for Metric Card; use `plugin-avatar.displayAvatar` instead.
179
251
  - Do not emit `settings.displayBadge` for Metric Card; use `plugin-badge.displayBadge` instead.
180
252
  - Use `rowSelection` only when the Metric Card region truly participates in row-selection behavior; otherwise omit it.
253
+ - In report mode, `messages` may contain only `whenNoDataFound` and `noDataFoundIcon`, and `pagination` may contain only `entitiesPerPage`.
181
254
  - For `rowSelection.type: focusOnly`, emit only the `type` property and no selection page items.
182
255
  - For `rowSelection.type: singleSelection`, emit `currentSelectionPageItem` and omit `selectAllPageItem`.
183
256
  - For `rowSelection.type: multipleSelection`, emit both `currentSelectionPageItem` and `selectAllPageItem`.
184
257
  - When any `rowSelection` mode is used, keep one child column marked with `source.primaryKey: true`.
258
+ - Emit an `action` only when navigation or a trigger action is requested. Use `position: link`, include deterministic `layout.sequence`, and omit `template` and `label` because this Metric Card position supplies neither action templates nor a label feature.
259
+ - Pair `redirectThisApp`/`redirectOtherApp` with `target`, pair `redirectUrl` with a reviewed `targetUrl`, and emit neither target property for `triggerAction`.
260
+ - Reject unsafe `targetUrl` values, including `javascript:`, `data:`, `vbscript:`, protocol-relative URLs, control characters, and wholly dynamic destinations that cannot be reviewed. Allow substitutions only inside query parameters; the scheme, host, path, and fragment must remain static. Use structured targets instead of same-app `f?p=` URLs.
261
+ - Keep `linkAttributes` static and reject inline event handlers, URL-bearing attributes such as `href`, scriptable CSS, unsafe URL schemes, and `target="_blank"` without `rel="noopener"` or `rel="noreferrer"`.
262
+ - For a same-app target, use a declarative `behavior.target` object and pass row values with escaped `&COLUMN.` substitutions only from projected columns.
263
+ - Omit region/action `security` when page authentication is sufficient. When stricter AuthZ is required, reference an existing authorization scheme and apply it at the narrowest relevant scope.
185
264
  - In report mode, emit explicit child `column (...)` metadata for every delivered source projection before finals.
186
265
  - Do not stop after the first compiler-satisfying child column when the source projects multiple fields.
187
266
  - For child column `source.dataType`, emit only exact values from the Metric Card Column Data Types inventory; do not normalize them to uppercase SQL names or Interactive Report `STRING`/`NUMBER`/`DATE` tokens.
@@ -189,5 +268,19 @@ region {{regionStaticId}} (
189
268
 
190
269
  # Guardrails
191
270
 
192
- - Metadata export lookup: search for `Metric Card`, `themeTemplateComponent/metricCard`, and `column-metric-card`.
271
+ - Metadata export lookup: search for `Metric Card` and `themeTemplateComponent/metricCard`; compiler truth resolves its child columns to `column-f`.
193
272
  - If the requested Metric Card behavior depends on external page logic targeting the region container directly, treat the chosen region template plus optional `advanced.htmlDomId` as part of the runtime contract, not as incidental styling.
273
+ - Do not place presentation HTML in the Metric Card SQL source. Project raw values and render them through native settings and action attributes.
274
+ - Do not expose sensitive metrics solely by hiding card markup. Enforce access through authenticated pages, verified authorization schemes, and source predicates where row-level filtering is required.
275
+
276
+ # Validation Checklist
277
+
278
+ - `type` is `themeTemplateComponent/metricCard` and `componentAppearance.display` is `partial` or `report`.
279
+ - Partial mode omits every report-scoped setting and block; report mode may use layout, grouping, selection, messages, and `pagination.entitiesPerPage`.
280
+ - `settings.metric` is present; query-backed title/metric/meta mappings use `&COLUMN.` syntax.
281
+ - Every source projection has a matching child `column (...)` with a valid Metric Card data type.
282
+ - Optional layout, grouping, and row-selection values use compiler-backed enums.
283
+ - Optional avatar and badge blocks satisfy their type/payload dependencies, selector mappings, data types, and compiler-backed enums.
284
+ - Badge label/value are present whenever `displayBadge: true`; optional state values use the Badge allowlist.
285
+ - Optional row navigation uses only `action.position: link`, a declarative behavior, and no action template.
286
+ - Page authentication is present; any stricter region/action authorization references an existing scheme.
@@ -4,6 +4,7 @@ componentType: region
4
4
  version: 1.0
5
5
  imports:
6
6
  - metric-card._common.md
7
+ - metric-card.report-minimal.md
7
8
  description: Routing entrypoint for metric-card regions.
8
9
  ---
9
10
 
@@ -15,3 +16,8 @@ Primary routing entrypoint for `metric-card` region templates.
15
16
 
16
17
  1. Load this file.
17
18
  2. Load `metric-card._common.md`.
19
+ 3. Use `metric-card.partial-minimal.md` for one component without the report wrapper; otherwise default to `metric-card.report-minimal.md`.
20
+ 4. Load `metric-card.report-avatar-badge.md` only when nested Avatar or Badge content is requested.
21
+ 5. Load `metric-card.report-link.md` only when row navigation is requested.
22
+ 6. Load `metric-card.report-grouping-selection.md` only when grouping or native row selection is requested.
23
+ 7. Load `metric-card.permutations.md` only for QA, regression, or exhaustive permutation requests.
@@ -2,10 +2,13 @@
2
2
 
3
3
  These entries come from `create_plugin_attribute` and `create_plugin_attr_value`, not from `wwv_flow_template_options`.
4
4
 
5
- Apply these values through `settings`, `plugin-appearance`, and `plugin-grouping`.
6
- Load `../avatar._template_options.md` and `../badge._template_options.md` for the shared avatar and badge substructures used by Metric Card.
5
+ Apply these values through `settings`, `plugin-avatar`, `plugin-badge`, and `plugin-grouping`.
7
6
  Emit only exact accepted values from this inventory. Do not concatenate adjacent values into one token and do not substitute labels or implementation details.
8
7
 
8
+ `layout`, `itemCssClasses`, `plugin-grouping`, `rowSelection`, `messages`, and `pagination` are report-only. Omit them when `componentAppearance.display: partial`.
9
+
10
+ For source-backed selector fields, use bare delivered aliases: `plugin-avatar.initials`, `plugin-badge.value`, and `plugin-badge.state` must not use `&COLUMN.` substitutions. A source-backed badge label also uses its bare delivered alias.
11
+
9
12
  When a row includes `values=`, pass the left-hand side of each `name=>return_value` pair.
10
13
 
11
14
  ## Metric Card (`metricCard`)
@@ -21,3 +24,45 @@ Supported: `PARTIAL:REPORT`
21
24
  - `itemCssClasses` | prompt=`Item CSS Classes` | type=`TEXT` | scope=`REPORT` | required=`false` | default=`--` | group=`Advanced` | depends=`--`
22
25
  - `groupIcon` | prompt=`Group Icon` | type=`ICON` | scope=`REPORT_GROUP` | required=`false` | default=`--` | group=`Grouping` | depends=`groupTitle NOT_NULL`
23
26
  - `groupTitle` | prompt=`Group Title` | type=`TEXT` | scope=`REPORT_GROUP` | required=`false` | default=`--` | group=`Grouping` | depends=`--`
27
+
28
+ ## Metric Card Avatar (`plugin-avatar`)
29
+
30
+ - `displayAvatar` | prompt=`Display Avatar` | type=`YES NO` | scope=`COMPONENT` | required=`false` | default=`--` | group=`Avatar` | depends=`--`
31
+ - `type` | prompt=`Type` | type=`SELECT LIST` | scope=`COMPONENT` | required=`true` | default=`icon` | group=`Avatar` | depends=`displayAvatar EQUALS true` | values=`icon=>icon, image=>image, initials=>initials`
32
+ - `icon` | prompt=`Icon` | type=`ICON` | scope=`COMPONENT` | required=`true` | default=`fa-line-chart` | group=`Avatar` | depends=`type EQUALS icon`
33
+ - `image` | prompt=`Image` | type=`MEDIA` | scope=`COMPONENT` | required=`true` | default=`--` | group=`Avatar` | depends=`type EQUALS image`
34
+ - `initials` | prompt=`Initials` | type=`SESSION STATE VALUE` | scope=`COMPONENT` | required=`true` | default=`--` | group=`Avatar` | depends=`type EQUALS initials`
35
+ - `position` | prompt=`Position` | type=`SELECT LIST` | scope=`COMPONENT` | required=`true` | default=`top` | group=`Avatar` | depends=`displayAvatar EQUALS true` | values=`inline=>t-MetricCard-body--avatarPositionInline, top=>t-MetricCard-body--avatarPositionTop`
36
+ - `alignment` | prompt=`Alignment` | type=`SELECT LIST` | scope=`COMPONENT` | required=`true` | default=`start` | group=`Avatar` | depends=`position EQUALS inline` | values=`center=>t-MetricCard-body--avatarAlignmentCenter, end=>t-MetricCard-body--avatarAlignmentEnd, start=>t-MetricCard-body--avatarAlignmentStart`
37
+ - `shape` | prompt=`Shape` | type=`SELECT LIST` | scope=`COMPONENT` | required=`true` | default=`rounded` | group=`Avatar` | depends=`displayAvatar EQUALS true` | values=`circular=>t-Avatar--circle, noShape=>t-Avatar--noShape, rounded=>t-Avatar--rounded, square=>t-Avatar--square`
38
+ - `size` | prompt=`Size` | type=`SELECT LIST` | scope=`COMPONENT` | required=`false` | default=`--` | group=`Avatar` | depends=`displayAvatar EQUALS true` | values=`large=>t-Avatar--lg, medium=>t-Avatar--md, small=>t-Avatar--sm`
39
+ - `style` | prompt=`Style` | type=`SELECT LIST` | scope=`COMPONENT` | required=`false` | default=`--` | group=`Avatar` | depends=`type IN_LIST initials,icon` | values=`subtle=>t-MetricCard-avatar--subtle`
40
+
41
+ ## Metric Card Badge (`plugin-badge`)
42
+
43
+ - `displayBadge` | prompt=`Display Badge` | type=`YES NO` | scope=`COMPONENT` | required=`false` | default=`--` | group=`Badge` | depends=`--`
44
+ - `label` | prompt=`Label` | type=`TEXT` | scope=`COMPONENT` | required=`true` | default=`--` | group=`Badge` | depends=`displayBadge EQUALS true`
45
+ - `value` | prompt=`Value` | type=`SESSION STATE VALUE` | scope=`COMPONENT` | required=`true` | default=`--` | group=`Badge` | depends=`displayBadge EQUALS true`
46
+ - `state` | prompt=`State` | type=`SESSION STATE VALUE` | scope=`COMPONENT` | required=`false` | default=`--` | group=`Badge` | depends=`displayBadge EQUALS true`
47
+ - `icon` | prompt=`Icon` | type=`ICON` | scope=`COMPONENT` | required=`false` | default=`--` | group=`Badge` | depends=`displayBadge EQUALS true`
48
+ - `displayLabel` | prompt=`Display Label` | type=`YES NO` | scope=`COMPONENT` | required=`false` | default=`--` | group=`Badge` | depends=`displayBadge EQUALS true`
49
+ - `style` | prompt=`Style` | type=`SELECT LIST` | scope=`COMPONENT` | required=`false` | default=`--` | group=`Badge` | depends=`displayBadge EQUALS true` | values=`outline=>t-Badge--outline, subtle=>t-Badge--subtle`
50
+ - `shape` | prompt=`Shape` | type=`SELECT LIST` | scope=`COMPONENT` | required=`false` | default=`--` | group=`Badge` | depends=`displayBadge EQUALS true` | values=`circular=>t-Badge--circle, rounded=>t-Badge--rounded, square=>t-Badge--square`
51
+ - `size` | prompt=`Size` | type=`SELECT LIST` | scope=`COMPONENT` | required=`false` | default=`--` | group=`Badge` | depends=`displayBadge EQUALS true` | values=`large=>t-Badge--lg, medium=>t-Badge--md, small=>t-Badge--sm`
52
+
53
+ ## Metric Card Actions
54
+
55
+ - Supported action position: `link`
56
+ - Action templates: none
57
+ - Do not emit `action.template` or `action.label` for the row link.
58
+ - Supported behavior variants are `redirectThisApp`/`redirectOtherApp` with `target`, `redirectUrl` with a reviewed safe `targetUrl`, and `triggerAction` with neither target property. In `targetUrl`, substitutions are limited to query parameters so the scheme, host, path, and fragment remain static. Optional `linkAttributes` must be static and free of inline handlers, URL-bearing attributes, scriptable CSS, and unsafe URL schemes.
59
+
60
+ ## APEX 26.1 Report-only Standard Blocks
61
+
62
+ These properties are live-compiler-backed standard report properties rather than `create_plugin_attribute` entries:
63
+
64
+ - `messages.whenNoDataFound`
65
+ - `messages.noDataFoundIcon`
66
+ - `pagination.entitiesPerPage`
67
+
68
+ Do not emit pagination `type` or `showTotalCount`; APEX 26.1 rejects them for Metric Card. All three properties above must be omitted in partial mode.
@@ -0,0 +1,51 @@
1
+ ---
2
+ templateId: metric-card.partial-minimal
3
+ componentType: templateComponent
4
+ imports:
5
+ - metric-card.common
6
+ version: 1.0
7
+ description: Minimal partial-mode Metric Card without report-only attributes.
8
+ ---
9
+
10
+ # Purpose
11
+
12
+ Render one Metric Card component without the report wrapper.
13
+
14
+ # Output Template
15
+
16
+ ```apx
17
+ region {{regionStaticId}} (
18
+ name: {{name}}
19
+ type: themeTemplateComponent/metricCard
20
+ layout {
21
+ sequence: {{layout.sequence}}
22
+ slot: body
23
+ }
24
+ appearance {
25
+ template: @/blank-with-attributes
26
+ templateOptions: #DEFAULT#
27
+ }
28
+ componentAppearance {
29
+ display: partial
30
+ }
31
+ settings {
32
+ title: {{settings.title}}
33
+ metric: {{settings.metric}}
34
+ meta: {{settings.meta}}
35
+ }
36
+ )
37
+ ```
38
+
39
+ # Conditional Rendering Rules
40
+
41
+ - Keep `settings.metric`; omit unused optional component-scope text and CSS-class properties.
42
+ - Component-scope Avatar, Badge, and `action.position: link` remain available when their complete conditional contracts are satisfied.
43
+ - Omit `settings.layout`, `settings.itemCssClasses`, `plugin-grouping`, `rowSelection`, `messages`, and `pagination`; they are report-only.
44
+ - Do not add report child columns unless a proven partial-mode source mapping actually requires them.
45
+
46
+ # Validation Checklist
47
+
48
+ - `componentAppearance.display` is `partial`.
49
+ - No report-only property or block is present.
50
+ - Avatar style is omitted for image avatars.
51
+ - Any action uses only `position: link` and one valid declarative behavior branch.
@@ -0,0 +1,56 @@
1
+ ---
2
+ templateId: metric-card.permutations
3
+ componentType: region
4
+ version: 1.0
5
+ description: APEX 26.1 Metric Card permutation and regression coverage matrix.
6
+ ---
7
+
8
+ # Purpose
9
+
10
+ Define the finite branch and enum coverage required for a Metric Card QA application. This is a coverage contract, not a requirement to generate the full Cartesian product. Use pairwise pages so every accepted token and conditional branch is exercised at least once without duplicating equivalent combinations.
11
+
12
+ # Output Template
13
+
14
+ Generate native `themeTemplateComponent/metricCard` regions from the canonical partial and report scenarios. Each generated region must select one valid value from every enabled axis below and must not combine mutually exclusive payloads.
15
+
16
+ | Axis | Required coverage |
17
+ | --- | --- |
18
+ | Display | `partial`, `report` |
19
+ | Root text | required `metric`; optional title/meta and all three CSS-class hooks |
20
+ | Report layout | omitted/default, `2Columns`, `3Columns`, `4Columns`, `5Columns`, `autoWrapping`, `overflow`, `stacked` |
21
+ | Report item classes | omitted and one safe static class list |
22
+ | Avatar type | omitted, static `icon`, source-backed `icon` with a proven Font APEX CASE mapping, `initials`, image `url`, image `urlColumn`, image `blobColumn` |
23
+ | Avatar image path | static `#APP_FILES#` and `#APEX_FILES#`; source-backed `:APP_FILES` and `:APEX_FILES`; complete BLOB companion-column mapping |
24
+ | Avatar position/alignment | omitted/default; `top`; `inline` with `start`, `center`, and `end` |
25
+ | Avatar shape | omitted/default, `circular`, `noShape`, `rounded`, `square` |
26
+ | Avatar size | omitted/default, `small`, `medium`, `large` |
27
+ | Avatar style | omitted; `subtle` with icon; `subtle` with initials; never with image |
28
+ | Badge core | omitted; enabled with static label; enabled with source-backed varchar2 label |
29
+ | Badge value type | `varchar2`, `number`, `date`, `intervalYearToMonth`, `intervalDayToSecond` |
30
+ | Badge state | omitted, `danger`, `warning`, `success`, `info` |
31
+ | Badge visuals | icon omitted/present; displayLabel false/true; style omitted/`outline`/`subtle`; shape omitted/`circular`/`rounded`/`square`; size omitted/`small`/`medium`/`large` |
32
+ | Grouping | omitted; group title; group title plus icon, grouped column, and leading static order |
33
+ | Row selection | omitted, `focusOnly`, `singleSelection`, `multipleSelection` with the required identity and page-item bindings |
34
+ | Messages | omitted; `whenNoDataFound`; `whenNoDataFound` plus `noDataFoundIcon` |
35
+ | Pagination | omitted; `entitiesPerPage`; never `type` or `showTotalCount` |
36
+ | Ordering | omitted when unnecessary; `staticValue`; `item` with a valid same-page item |
37
+ | Link action | omitted; `redirectThisApp`; `redirectOtherApp`; safe `redirectUrl`; `triggerAction`, always at `position: link` and without an action template; safe static `linkAttributes` and unsafe URL/inline-handler rejection cases |
38
+ | Column type | every delivered report projection uses one exact supported Metric Card column data type |
39
+ | Region policy | blank wrapper default, explicit standard wrapper case, optional accessibility, condition, authorization, comments, and DOM id only when justified |
40
+
41
+ # Conditional Rendering Rules
42
+
43
+ - Partial pages cover only component-scope text/CSS properties, Avatar, Badge, and link action branches. Omit every report-only setting and block.
44
+ - Report pages cover layout, item classes, grouping, selection, messages, pagination, source ordering, and explicit source-column metadata.
45
+ - Use one Avatar payload per region. Image modes are separate cases; BLOB mode includes all four typed companion aliases.
46
+ - `plugin-avatar.style: subtle` is legal only for icon or initials.
47
+ - Use pairwise visual combinations for Avatar and Badge. The matrix must cover every value, but it must not create redundant copies of the same semantic branch.
48
+ - Treat the Badge state allowlist and image URL safety rules as source contracts, not presentation-only checks.
49
+ - Use `SYS.DUAL` only in an explicit QA fixture with `object_evidence_source: user_asserted`; production generation requires target schema evidence.
50
+
51
+ # Validation Checklist
52
+
53
+ - Every value and omission branch in the matrix appears in at least one generated page and in a page inventory.
54
+ - Every page passes strict formatting, local validation, compiler-truth audit, and target-build `apex validate`.
55
+ - Negative regression checks reject report-only properties in partial mode, pagination `type`/`showTotalCount`, image Avatar style, invalid Avatar payload combinations, unsafe image URLs, invalid Badge states, and incomplete action/selection/grouping dependencies.
56
+ - The application is check-only unless the user explicitly chooses import after live validation passes.
@@ -0,0 +1,98 @@
1
+ ---
2
+ templateId: metric-card.report-avatar-badge
3
+ componentType: templateComponent
4
+ imports:
5
+ - metric-card.common
6
+ - metric-card.report-minimal
7
+ version: 1.0
8
+ description: Report-mode Metric Card with compiler-backed nested Avatar and Badge attributes.
9
+ ---
10
+
11
+ # Purpose
12
+
13
+ Add an Avatar, a Badge, or both to source-backed Metric Card rows without substituting the standalone Avatar or Badge region contracts.
14
+
15
+ # Output Template
16
+
17
+ ```apx
18
+ region {{regionStaticId}} (
19
+ type: themeTemplateComponent/metricCard
20
+ componentAppearance {
21
+ display: report
22
+ }
23
+ settings {
24
+ title: &{{settings.titleColumn}}.
25
+ metric: &{{settings.metricColumn}}.
26
+ }
27
+ plugin-avatar {
28
+ displayAvatar: true
29
+ type: initials
30
+ initials: {{avatar.initialsColumn}}
31
+ position: inline
32
+ alignment: center
33
+ shape: rounded
34
+ size: medium
35
+ style: subtle
36
+ }
37
+ plugin-badge {
38
+ displayBadge: true
39
+ label: {{badge.label}}
40
+ value: {{badge.valueColumn}}
41
+ state: {{badge.stateColumn}}
42
+ icon: {{badge.icon}}
43
+ displayLabel: true
44
+ style: subtle
45
+ shape: rounded
46
+ size: medium
47
+ }
48
+ column {{avatar.initialsColumn}} (
49
+ layout {
50
+ sequence: {{avatar.initialsColumnSequence}}
51
+ }
52
+ source {
53
+ databaseColumn: {{avatar.initialsColumn}}
54
+ dataType: varchar2
55
+ }
56
+ )
57
+ column {{badge.valueColumn}} (
58
+ layout {
59
+ sequence: {{badge.valueColumnSequence}}
60
+ }
61
+ source {
62
+ databaseColumn: {{badge.valueColumn}}
63
+ dataType: {{badge.valueColumnDataType}}
64
+ }
65
+ )
66
+ column {{badge.stateColumn}} (
67
+ layout {
68
+ sequence: {{badge.stateColumnSequence}}
69
+ }
70
+ source {
71
+ databaseColumn: {{badge.stateColumn}}
72
+ dataType: varchar2
73
+ }
74
+ )
75
+ )
76
+ ```
77
+
78
+ # Conditional Rendering Rules
79
+
80
+ - Emit `plugin-avatar` only when avatar content is requested. Set `displayAvatar: true`, select exactly one `type`, and emit only its matching payload: `icon`, `initials`, or `image`.
81
+ - `plugin-avatar.initials` is a bare projected `varchar2` alias. It is not an `&COLUMN.` rendered-text substitution.
82
+ - Avatar image payloads use the compiler-backed media object. BLOB mode maps a `blob` payload, `varchar2` filename and MIME type columns, and a date/timestamp last-updated column. URL modes use application-managed file paths only.
83
+ - Use `alignment` only for `position: inline`. Omit it for `position: top`.
84
+ - Use `style: subtle` only for icon or initials avatars. Omit Avatar style for image avatars.
85
+ - Emit `plugin-badge` only when badge content is requested. Set `displayBadge: true` and always emit both `label` and `value`.
86
+ - A source-backed badge label, badge value, and badge state use bare projected aliases. Source-backed labels are `varchar2`; static labels contain no HTML or event attributes. Omit `state` and its child column when no semantic state is requested.
87
+ - Badge state data is `varchar2` and is restricted to lowercase `danger`, `warning`, `success`, or `info` by the source contract introduced for Badge support.
88
+ - Avatar and Badge icons use the build-pinned Font APEX catalogue and the shared icon validation introduced by their standalone component implementations. Metric Card Avatar icons may use a proven `&COLUMN.` substitution; Badge icons remain static.
89
+ - Omit optional visual properties instead of emitting empty values. Use only the exact Metric Card values documented in `metric-card._template_options.md`.
90
+ - Add one explicit child column for every additional source projection, including image payload and link-context columns.
91
+
92
+ # Validation Checklist
93
+
94
+ - Avatar visibility, type, payload, position, alignment, shape, size, and style satisfy the Metric Card compiler profile.
95
+ - Initials, Badge value, and optional Badge state resolve to explicitly declared child columns with compatible data types.
96
+ - Badge label and value are present; optional state values use the Badge allowlist.
97
+ - Source-backed selector attributes use bare aliases rather than `&COLUMN.` substitutions.
98
+ - No standalone Avatar/Badge settings or duplicated template-option inventories are mixed into the Metric Card groups.