@phis/ui 0.7.7 → 0.8.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 (344) hide show
  1. package/components/controls/phi-address-control.d.ts +23 -0
  2. package/components/controls/phi-address-control.js +43 -0
  3. package/components/controls/phi-color-control.d.ts +3 -1
  4. package/components/controls/phi-color-control.js +2 -2
  5. package/components/controls/phi-country-select-control.d.ts +22 -0
  6. package/components/controls/phi-country-select-control.js +16 -0
  7. package/components/controls/phi-dialog-control.d.ts +1 -1
  8. package/components/controls/phi-drawer-control-adapter.d.ts +1 -1
  9. package/components/controls/phi-drawer-control-adapter.js +5 -3
  10. package/components/controls/phi-drawer-control.d.ts +7 -5
  11. package/components/controls/phi-float-button-control.d.ts +8 -1
  12. package/components/controls/phi-float-button-control.js +19 -3
  13. package/components/controls/phi-form-control.js +64 -9
  14. package/components/controls/phi-modal-control-adapter.d.ts +1 -1
  15. package/components/controls/phi-modal-control-adapter.js +14 -37
  16. package/components/controls/phi-modal-control.d.ts +5 -5
  17. package/components/controls/phi-options-provider.d.ts +1 -0
  18. package/components/controls/phi-options-provider.js +1 -0
  19. package/components/controls/phi-overlay-control-contract.d.ts +52 -17
  20. package/components/controls/phi-overlay-control-contract.js +55 -30
  21. package/components/controls/phi-reveal-once-dialog-control.d.ts +21 -0
  22. package/components/controls/phi-reveal-once-dialog-control.js +52 -0
  23. package/components/controls/phi-reveal-once-dialog-labels.d.ts +10 -0
  24. package/components/controls/phi-reveal-once-dialog-labels.js +5 -0
  25. package/components/forms/extended-form-field-controls.d.ts +1 -1
  26. package/components/forms/extended-form-field-controls.js +23 -7
  27. package/components/forms/flags-field.d.ts +22 -0
  28. package/components/forms/flags-field.js +58 -0
  29. package/components/forms/form-option-flags.d.ts +20 -0
  30. package/components/forms/form-option-flags.js +38 -0
  31. package/components/forms/form-provider-contract.d.ts +28 -0
  32. package/components/forms/form-provider-contract.js +45 -2
  33. package/components/forms/form-provider-registry.d.ts +11 -1
  34. package/components/forms/money-field-currency-key.d.ts +6 -0
  35. package/components/forms/money-field-currency-key.js +14 -0
  36. package/components/forms/money-field.d.ts +26 -3
  37. package/components/forms/money-field.js +54 -4
  38. package/components/forms/shared-form-provider-registry.js +13 -0
  39. package/components/forms/structured-field-labels.d.ts +24 -0
  40. package/components/forms/structured-field-labels.js +43 -0
  41. package/components/forms/structured-form-field-controls.d.ts +12 -0
  42. package/components/forms/structured-form-field-controls.js +65 -0
  43. package/components/overlays/phi-overlay-container-client.js +2 -2
  44. package/components/regions/phi-cms-region-shell.js +2 -2
  45. package/components/regions/presets/content-entry-editor-page-tree.js +12 -3
  46. package/components/regions/presets/navigation-redirect.d.ts +4 -1
  47. package/components/regions/presets/navigation-redirect.js +6 -3
  48. package/components/regions/presets/phi-settings-page-shell-tree.d.ts +6 -2
  49. package/components/regions/presets/phi-settings-page-shell-tree.js +1 -1
  50. package/components/root/phi-root-theme-resolver.js +3 -0
  51. package/components/shell/phi-antd-icon.d.ts +1 -8
  52. package/components/shell/phi-antd-icon.js +1 -227
  53. package/components/shell/phi-icon-names.d.ts +19 -0
  54. package/components/shell/phi-icon-names.js +264 -0
  55. package/components/shell/phi-icon.d.ts +2 -11
  56. package/components/shell/phi-icon.js +4 -32
  57. package/components/widgets/client/shared/phi-command-buttons.d.ts +13 -2
  58. package/components/widgets/client/shared/phi-command-buttons.js +10 -4
  59. package/components/widgets/client/shared/phi-rendered-value.js +32 -6
  60. package/components/widgets/client/shared/phi-table-provider-refusal.d.ts +13 -0
  61. package/components/widgets/client/shared/phi-table-provider-refusal.js +13 -0
  62. package/components/widgets/config/background.d.ts +3 -2
  63. package/components/widgets/config/choice-shared.d.ts +10 -1
  64. package/components/widgets/config/choice-shared.js +8 -2
  65. package/components/widgets/label-sets/admin-locales.js +1 -1
  66. package/components/widgets/label-sets/admin-users.d.ts +2 -5
  67. package/components/widgets/label-sets/admin-users.js +4 -10
  68. package/components/widgets/label-sets/effects.js +2 -4
  69. package/components/widgets/label-sets/profile.d.ts +13 -0
  70. package/components/widgets/label-sets/profile.js +28 -0
  71. package/components/widgets/label-sets/search-results.js +2 -4
  72. package/components/widgets/label-sets/table.js +9 -0
  73. package/components/widgets/label-types/effects.d.ts +3 -2
  74. package/components/widgets/label-types/effects.js +1 -2
  75. package/components/widgets/label-types/search-results.d.ts +2 -2
  76. package/components/widgets/label-types/search-results.js +1 -2
  77. package/components/widgets/label-types/table.d.ts +3 -0
  78. package/components/widgets/label-types/table.js +2 -0
  79. package/components/widgets/server/builder-chrome.d.ts +4 -1
  80. package/components/widgets/server/builder-chrome.js +2 -2
  81. package/components/widgets/shared/markdown-body-client.d.ts +26 -0
  82. package/components/widgets/shared/markdown-body-client.js +31 -1
  83. package/components/widgets/shared/markdown-render.d.ts +10 -2
  84. package/components/widgets/shared/markdown-render.js +35 -13
  85. package/constants/countries.d.ts +9 -0
  86. package/constants/countries.js +28 -0
  87. package/constants/customer-file.d.ts +25 -0
  88. package/constants/customer-file.js +26 -0
  89. package/constants/record-field-kinds.d.ts +15 -0
  90. package/constants/record-field-kinds.js +13 -0
  91. package/constants/runtime-module-ownership.js +12 -0
  92. package/constants/runtime-render-client-types.d.ts +5 -0
  93. package/constants/runtime-render-client-types.js +5 -0
  94. package/{plugins/runtime-modules/threads/controller/address.js → constants/threads-controller-address.js} +1 -1
  95. package/constants.d.ts +1 -0
  96. package/constants.js +2 -0
  97. package/gateway/form-handler-request.d.ts +22 -0
  98. package/gateway/form-handler-request.js +40 -0
  99. package/gateway/label-set.d.ts +15 -2
  100. package/gateway/label-set.js +60 -22
  101. package/gateway/site-form-route.js +11 -2
  102. package/helpers/address-field.d.ts +43 -0
  103. package/helpers/address-field.js +68 -0
  104. package/helpers/cms-dialog.d.ts +5 -20
  105. package/helpers/cms-dialog.js +8 -13
  106. package/helpers/cms-page-catalog.d.ts +10 -0
  107. package/helpers/cms-page-catalog.js +19 -0
  108. package/helpers/cms-preset-nodes.d.ts +4 -4
  109. package/helpers/cms-preset-nodes.js +1 -1
  110. package/helpers/cms-region-keys.d.ts +1 -1
  111. package/helpers/country-names.d.ts +12 -0
  112. package/helpers/country-names.js +14 -0
  113. package/helpers/money-amount.d.ts +7 -0
  114. package/helpers/money-amount.js +15 -0
  115. package/helpers/phi-metadata.d.ts +33 -1
  116. package/helpers/phi-metadata.js +62 -1
  117. package/helpers/preset-table-check.d.ts +34 -0
  118. package/helpers/preset-table-check.js +124 -0
  119. package/helpers/preset-text-source-check.d.ts +4 -1
  120. package/helpers/preset-text-source-check.js +6 -1
  121. package/helpers/preset-tree-contract-check.d.ts +3 -2
  122. package/helpers/preset-tree-contract-check.js +30 -5
  123. package/helpers/public-route-claims.d.ts +9 -1
  124. package/helpers/public-route-claims.js +23 -3
  125. package/helpers/record-fields.d.ts +1 -5
  126. package/helpers/record-fields.js +15 -6
  127. package/helpers/route-address-check.d.ts +22 -2
  128. package/helpers/route-address-check.js +29 -8
  129. package/helpers/site-address-row.d.ts +23 -0
  130. package/helpers/site-address-row.js +36 -0
  131. package/helpers/surface-style.d.ts +8 -1
  132. package/helpers/surface-style.js +12 -2
  133. package/helpers/thread-inbox-row.d.ts +20 -0
  134. package/helpers/thread-inbox-row.js +26 -0
  135. package/helpers/translation-format.d.ts +26 -0
  136. package/helpers/translation-format.js +31 -0
  137. package/module-labels.d.ts +1 -1
  138. package/module-labels.js +1 -1
  139. package/module-page-check.d.ts +1 -0
  140. package/module-page-check.js +1 -0
  141. package/module-records.d.ts +2 -2
  142. package/module-records.js +1 -0
  143. package/next/area-route.js +34 -1
  144. package/next/root-route.js +4 -5
  145. package/package.json +2 -2
  146. package/plugins/runtime-modules/accounting/customer-file-access.d.ts +11 -0
  147. package/plugins/runtime-modules/accounting/customer-file-access.js +12 -0
  148. package/plugins/runtime-modules/accounting/data-providers.js +1 -1
  149. package/plugins/runtime-modules/accounting/ids.d.ts +11 -0
  150. package/plugins/runtime-modules/accounting/ids.js +23 -0
  151. package/plugins/runtime-modules/accounting/presets.js +32 -5
  152. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.d.ts +66 -0
  153. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +122 -0
  154. package/plugins/runtime-modules/accounting/trees/accounting-products-label-set.js +2 -2
  155. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +26 -0
  156. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +381 -0
  157. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-products-page-tree.js +4 -0
  158. package/plugins/runtime-modules/app/client-data-providers.d.ts +7 -0
  159. package/plugins/runtime-modules/app/client-data-providers.js +9 -0
  160. package/plugins/runtime-modules/app/data-providers.d.ts +98 -0
  161. package/plugins/runtime-modules/app/data-providers.js +80 -0
  162. package/plugins/runtime-modules/app/definition.d.ts +131 -0
  163. package/plugins/runtime-modules/app/definition.js +2 -0
  164. package/plugins/runtime-modules/app/forms.d.ts +46 -1
  165. package/plugins/runtime-modules/app/forms.js +195 -1
  166. package/plugins/runtime-modules/app/ids.d.ts +7 -0
  167. package/plugins/runtime-modules/app/ids.js +8 -0
  168. package/plugins/runtime-modules/app/module.d.ts +131 -0
  169. package/plugins/runtime-modules/app/presets.js +3 -6
  170. package/plugins/runtime-modules/app/services/addresses-table.d.ts +135 -0
  171. package/plugins/runtime-modules/app/services/addresses-table.js +101 -0
  172. package/plugins/runtime-modules/app/trees/account-addresses-panel.d.ts +17 -0
  173. package/plugins/runtime-modules/app/trees/account-addresses-panel.js +179 -0
  174. package/plugins/runtime-modules/app/trees/addresses-label-set.d.ts +62 -0
  175. package/plugins/runtime-modules/app/trees/addresses-label-set.js +108 -0
  176. package/plugins/runtime-modules/app/trees/phi-default-app-area-preset-tree.d.ts +3 -6
  177. package/plugins/runtime-modules/app/trees/phi-default-app-area-preset-tree.js +4 -7
  178. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.js +27 -2
  179. package/plugins/runtime-modules/app/trees/profile-label-set.d.ts +1 -0
  180. package/plugins/runtime-modules/app/trees/profile-label-set.js +3 -0
  181. package/plugins/runtime-modules/asset/presets.d.ts +4 -0
  182. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +4 -2
  183. package/plugins/runtime-modules/auth/trees/phi-auth-area-overlay-tree.server.js +4 -2
  184. package/plugins/runtime-modules/auth/trees/phi-default-admin-auth-settings-page-tree.js +2 -2
  185. package/plugins/runtime-modules/auth/widgets/logout/client.d.ts +1 -1
  186. package/plugins/runtime-modules/auth/widgets/logout/client.js +2 -2
  187. package/plugins/runtime-modules/auth/widgets/security/client.d.ts +5 -1
  188. package/plugins/runtime-modules/auth/widgets/security/client.js +12 -10
  189. package/plugins/runtime-modules/avatar/overlay-tree.server.js +1 -1
  190. package/plugins/runtime-modules/blog/presets.d.ts +4 -0
  191. package/plugins/runtime-modules/builder/clients/inspector-image-field.d.ts +2 -1
  192. package/plugins/runtime-modules/builder/clients/inspector-image-field.js +3 -2
  193. package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.d.ts +23 -0
  194. package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.js +38 -0
  195. package/plugins/runtime-modules/builder/clients/mode-switch.d.ts +4 -1
  196. package/plugins/runtime-modules/builder/clients/mode-switch.js +2 -15
  197. package/plugins/runtime-modules/builder/clients/pages-workspace.js +2 -0
  198. package/plugins/runtime-modules/builder/clients/runtime-module-authoring-boundary.js +2 -1
  199. package/plugins/runtime-modules/builder/controller/client.d.ts +5 -5
  200. package/plugins/runtime-modules/builder/controller/client.js +2 -1
  201. package/plugins/runtime-modules/builder/controller/definition.d.ts +4 -4
  202. package/plugins/runtime-modules/builder/controller/definition.js +7 -0
  203. package/plugins/runtime-modules/builder/controller/draft-command-controller.d.ts +3 -1
  204. package/plugins/runtime-modules/builder/controller/draft-command-controller.js +2 -1
  205. package/plugins/runtime-modules/builder/controller/draft-status-controller.js +72 -18
  206. package/plugins/runtime-modules/builder/controller/server-definition.d.ts +4 -4
  207. package/plugins/runtime-modules/builder/controller/workspace-controller.d.ts +3 -1
  208. package/plugins/runtime-modules/builder/controller/workspace-controller.js +8 -10
  209. package/plugins/runtime-modules/builder/developer-workspace-store.d.ts +10 -0
  210. package/plugins/runtime-modules/builder/developer-workspace-store.js +35 -1
  211. package/plugins/runtime-modules/builder/developer-workspace-types.d.ts +5 -0
  212. package/plugins/runtime-modules/builder/offered-page-catalog.d.ts +6 -0
  213. package/plugins/runtime-modules/builder/offered-page-catalog.js +35 -6
  214. package/plugins/runtime-modules/builder/page-presets.server.d.ts +7 -0
  215. package/plugins/runtime-modules/builder/page-presets.server.js +10 -1
  216. package/plugins/runtime-modules/builder/persistence.d.ts +4 -1
  217. package/plugins/runtime-modules/builder/persistence.js +14 -3
  218. package/plugins/runtime-modules/builder/public-route-collisions.js +8 -3
  219. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +3 -1
  220. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +33 -6
  221. package/plugins/runtime-modules/builder/widgets/chrome/config.d.ts +6 -4
  222. package/plugins/runtime-modules/builder/widgets/chrome/config.js +11 -1
  223. package/plugins/runtime-modules/builder/widgets/inspector-header/authoring.d.ts +2 -2
  224. package/plugins/runtime-modules/builder/widgets/inspector-header/plugin.d.ts +2 -2
  225. package/plugins/runtime-modules/builder/widgets/mode-switch/plugin.js +1 -1
  226. package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +2 -2
  227. package/plugins/runtime-modules/client-manifests/app.js +3 -0
  228. package/plugins/runtime-modules/client-manifests/builder.js +10 -0
  229. package/plugins/runtime-modules/content-entry-routes.d.ts +4 -0
  230. package/plugins/runtime-modules/contracts.js +31 -1
  231. package/plugins/runtime-modules/core/definition.d.ts +28 -0
  232. package/plugins/runtime-modules/core/form-providers.d.ts +28 -0
  233. package/plugins/runtime-modules/core/messaging/thread-inbox-table.d.ts +0 -17
  234. package/plugins/runtime-modules/core/messaging/thread-inbox-table.js +2 -23
  235. package/plugins/runtime-modules/core/widgets/card/config.d.ts +0 -1
  236. package/plugins/runtime-modules/core/widgets/card/config.js +0 -1
  237. package/plugins/runtime-modules/core/widgets/card/editor.js +1 -1
  238. package/plugins/runtime-modules/core/widgets/command-toolbar/client.js +3 -0
  239. package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +316 -1
  240. package/plugins/runtime-modules/core/widgets/command-toolbar/config.js +4 -4
  241. package/plugins/runtime-modules/core/widgets/dimension/config.d.ts +1 -1
  242. package/plugins/runtime-modules/core/widgets/float-button/client.js +4 -1
  243. package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +326 -3
  244. package/plugins/runtime-modules/core/widgets/float-button/config.js +5 -2
  245. package/plugins/runtime-modules/core/widgets/header-navigation/client.js +1 -1
  246. package/plugins/runtime-modules/core/widgets/length/config.d.ts +1 -1
  247. package/plugins/runtime-modules/core/widgets/markdown/plugin.js +20 -7
  248. package/plugins/runtime-modules/core/widgets/markdown/server.d.ts +6 -2
  249. package/plugins/runtime-modules/core/widgets/markdown/server.js +2 -2
  250. package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.d.ts +12 -0
  251. package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.js +68 -0
  252. package/plugins/runtime-modules/core/widgets/number-input/config.d.ts +1 -1
  253. package/plugins/runtime-modules/core/widgets/simple-text/config.js +1 -1
  254. package/plugins/runtime-modules/core/widgets/simple-text/plugin.js +2 -1
  255. package/plugins/runtime-modules/core/widgets/spacer/client.js +3 -3
  256. package/plugins/runtime-modules/core/widgets/table/client.js +20 -5
  257. package/plugins/runtime-modules/core/widgets/table/config.js +6 -0
  258. package/plugins/runtime-modules/core/widgets/table/reader-query.d.ts +17 -0
  259. package/plugins/runtime-modules/core/widgets/table/reader-query.js +33 -0
  260. package/plugins/runtime-modules/dashboard/trees/dashboard-cards-page-tree.js +3 -1
  261. package/plugins/runtime-modules/descriptor-compiler.d.ts +19 -3
  262. package/plugins/runtime-modules/descriptor-compiler.js +44 -16
  263. package/plugins/runtime-modules/editor/presets.d.ts +4 -0
  264. package/plugins/runtime-modules/editor/trees/phi-default-editor-releases-page-tree.js +3 -1
  265. package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +5 -1
  266. package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +5 -1
  267. package/plugins/runtime-modules/localization/presets.d.ts +4 -0
  268. package/plugins/runtime-modules/localization/trees/phi-default-admin-locales-page-tree.js +3 -1
  269. package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +4 -2
  270. package/plugins/runtime-modules/news/presets.d.ts +4 -0
  271. package/plugins/runtime-modules/observability/trees/phi-default-admin-logs-page-tree.js +6 -2
  272. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +46 -39
  273. package/plugins/runtime-modules/preset-contracts/pub-area.d.ts +1 -1
  274. package/plugins/runtime-modules/preset-contracts/pub-area.js +1 -0
  275. package/plugins/runtime-modules/resolver.js +17 -0
  276. package/plugins/runtime-modules/revisions/controller/client.js +50 -46
  277. package/plugins/runtime-modules/revisions/controller/draft-context-target.d.ts +25 -0
  278. package/plugins/runtime-modules/revisions/controller/draft-context-target.js +33 -0
  279. package/plugins/runtime-modules/revisions/presets.d.ts +4 -0
  280. package/plugins/runtime-modules/revisions/services/table.js +16 -5
  281. package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +3 -1
  282. package/plugins/runtime-modules/search/widgets/search-results/client.js +4 -2
  283. package/plugins/runtime-modules/theme/presets.d.ts +4 -0
  284. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +76 -4
  285. package/plugins/runtime-modules/theme/widgets/brand-controls/config.d.ts +3 -2
  286. package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +2 -2
  287. package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +19 -7
  288. package/plugins/runtime-modules/threads/client-data-providers.js +5 -0
  289. package/plugins/runtime-modules/threads/controller/definition.js +1 -1
  290. package/plugins/runtime-modules/threads/data-providers.d.ts +115 -2
  291. package/plugins/runtime-modules/threads/data-providers.js +85 -0
  292. package/plugins/runtime-modules/threads/definition.d.ts +115 -2
  293. package/plugins/runtime-modules/threads/definition.js +1 -1
  294. package/plugins/runtime-modules/threads/ids.d.ts +2 -0
  295. package/plugins/runtime-modules/threads/ids.js +3 -0
  296. package/plugins/runtime-modules/threads/services/customer-file-table.d.ts +192 -0
  297. package/plugins/runtime-modules/threads/services/customer-file-table.js +164 -0
  298. package/plugins/runtime-modules/threads/trees/phi-default-threads-page-tree.js +5 -3
  299. package/plugins/runtime-modules/user-management/client-data-providers.js +5 -0
  300. package/plugins/runtime-modules/user-management/data-providers.d.ts +159 -0
  301. package/plugins/runtime-modules/user-management/data-providers.js +101 -3
  302. package/plugins/runtime-modules/user-management/definition.d.ts +159 -0
  303. package/plugins/runtime-modules/user-management/ids.d.ts +9 -0
  304. package/plugins/runtime-modules/user-management/ids.js +9 -0
  305. package/plugins/runtime-modules/user-management/presets.js +17 -1
  306. package/plugins/runtime-modules/user-management/services/users-access-table.d.ts +378 -0
  307. package/plugins/runtime-modules/user-management/services/users-access-table.js +132 -0
  308. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.d.ts +86 -0
  309. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.js +118 -0
  310. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.d.ts +20 -0
  311. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.js +166 -0
  312. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +19 -18
  313. package/server-helpers/cms-page-record.d.ts +9 -1
  314. package/server-helpers/cms-page-record.js +11 -1
  315. package/server-helpers/cms-request.js +8 -5
  316. package/server-helpers/link-preview-image.d.ts +30 -0
  317. package/server-helpers/link-preview-image.js +57 -0
  318. package/server-helpers/search-text.js +3 -0
  319. package/server-helpers.d.ts +1 -1
  320. package/server-helpers.js +1 -1
  321. package/styles/builder-scaffold.css +7 -1
  322. package/styles/layout-authoring-scaffold.css +27 -0
  323. package/styles/shell.css +30 -6
  324. package/theme/phi-theme-composition.js +9 -0
  325. package/theme/phi-theme-inverse-ground.d.ts +39 -0
  326. package/theme/phi-theme-inverse-ground.js +103 -0
  327. package/theme/phi-theme-tokens.d.ts +2 -1
  328. package/theme/phi-theme-tokens.js +2 -0
  329. package/types/cms-module-descriptors.d.ts +14 -0
  330. package/types/cms-overlay.d.ts +13 -6
  331. package/types/cms-overlay.js +6 -22
  332. package/types/cms-plugins.d.ts +14 -2
  333. package/types/cms.d.ts +10 -0
  334. package/types/core-widget-placements.d.ts +3 -3
  335. package/types/link-preview.d.ts +19 -0
  336. package/types/link-preview.js +19 -0
  337. package/types/record-provider.d.ts +22 -1
  338. package/types/site-theme.d.ts +27 -0
  339. package/types/table-embed.d.ts +48 -0
  340. package/types/table-embed.js +1 -0
  341. package/types/table-widget.d.ts +14 -0
  342. package/types/widget-runtime.d.ts +3 -0
  343. package/types.d.ts +1 -0
  344. /package/{plugins/runtime-modules/threads/controller/address.d.ts → constants/threads-controller-address.d.ts} +0 -0
@@ -2,11 +2,14 @@ import { PHI_APP_RUNTIME_MODULE_ID } from "../ids";
2
2
  import { PHI_APP_FORM_IDS } from "../forms";
3
3
  import { buildPhiSettingsPageShellTree } from "../../../../components/regions/presets/phi-settings-page-shell-tree";
4
4
  import { getPhiProfilePageLabels } from "./profile-label-set";
5
+ import { getPhiAppAddressesLabels } from "./addresses-label-set";
6
+ import { buildPhiAccountAddressesPanel } from "./account-addresses-panel";
5
7
  import { getPhiProfileLocaleWidgetLabels, getPhiProfileThemeWidgetLabels, } from "../../../../components/widgets/label-sets/profile";
6
8
  import { PHI_SITE_LOCALES_CONFIG_KEY } from "../../../../components/forms/site-locales-config";
7
9
  import { createPhiCoreRuntimeControllerAddress } from "../../../../components/runtime/core-runtime-controller-address";
8
10
  import { buildPhiWidgetLabelTranslatorOptions } from "../../../../components/widgets/label-sets/runtime-options";
9
11
  const REGION_CONTENT_ID = -286;
12
+ const PROFILE_PRESET_KEY = "app-profile-page";
10
13
  /**
11
14
  * What the account says about itself, as Settings panels rather than as a page of Widgets.
12
15
  *
@@ -25,11 +28,13 @@ const REGION_CONTENT_ID = -286;
25
28
  */
26
29
  export async function buildPhiDefaultAppProfilePageTree({ page, runtime, }) {
27
30
  const labelOptions = buildPhiWidgetLabelTranslatorOptions(runtime);
28
- const [labels, localeLabels, themeLabels] = await Promise.all([
31
+ const [labels, localeLabels, themeLabels, addressLabels] = await Promise.all([
29
32
  getPhiProfilePageLabels(labelOptions),
30
33
  getPhiProfileLocaleWidgetLabels(labelOptions),
31
34
  getPhiProfileThemeWidgetLabels(labelOptions),
35
+ getPhiAppAddressesLabels(labelOptions),
32
36
  ]);
37
+ const addresses = buildPhiAccountAddressesPanel(addressLabels, PROFILE_PRESET_KEY);
33
38
  const availableLocales = runtime.site.availableLocales.map((option) => ({ code: option.code, label: option.label }));
34
39
  /*
35
40
  * What the account reads in today: its own preference where it has one, and otherwise the language
@@ -39,7 +44,7 @@ export async function buildPhiDefaultAppProfilePageTree({ page, runtime, }) {
39
44
  const tree = buildPhiSettingsPageShellTree({
40
45
  page,
41
46
  ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
42
- presetKey: "app-profile-page",
47
+ presetKey: PROFILE_PRESET_KEY,
43
48
  regionId: REGION_CONTENT_ID,
44
49
  label: labels.page,
45
50
  panels: [
@@ -62,8 +67,27 @@ export async function buildPhiDefaultAppProfilePageTree({ page, runtime, }) {
62
67
  displayName: runtime.viewer.profile?.displayName ?? "",
63
68
  companyName: runtime.viewer.profile?.companyName ?? "",
64
69
  },
70
+ }, {
71
+ /*
72
+ * The numbers beside the name, as their own Form because Core writes them on their own route.
73
+ * Both start as strings, never absent: the route takes both at once, and an empty one is
74
+ * cleared rather than left out.
75
+ */
76
+ kind: "form",
77
+ nodeKey: "widgetPhone",
78
+ formId: PHI_APP_FORM_IDS.profilePhone,
79
+ label: labels.phone,
80
+ initialValues: {
81
+ phone: runtime.viewer.profile?.phone ?? "",
82
+ mobile: runtime.viewer.profile?.mobile ?? "",
83
+ },
65
84
  }],
66
85
  },
86
+ /*
87
+ * The account's addresses on this Site, after the name and numbers they are made out to: the
88
+ * address book is the Site's, so another Site lists its own.
89
+ */
90
+ addresses.panel,
67
91
  {
68
92
  nodeKey: "panelLanguage",
69
93
  title: labels.language,
@@ -161,6 +185,7 @@ export async function buildPhiDefaultAppProfilePageTree({ page, runtime, }) {
161
185
  }],
162
186
  },
163
187
  ],
188
+ overlays: addresses.overlays,
164
189
  });
165
190
  return {
166
191
  ...tree,
@@ -3,6 +3,7 @@ import { type PhiGlobalTranslatorOptions } from "../../../../gateway/tr";
3
3
  export declare function getPhiProfilePageLabels(options: PhiGlobalTranslatorOptions): Promise<{
4
4
  page: string;
5
5
  name: string;
6
+ phone: string;
6
7
  language: string;
7
8
  appearance: string;
8
9
  subscriptions: string;
@@ -8,6 +8,8 @@ const PHI_PROFILE_PAGE_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_APP_RUNTIM
8
8
  labels: {
9
9
  page: "Profile",
10
10
  name: "Name",
11
+ /** The authoring name of the Form beside the name that holds the two telephone numbers. */
12
+ phone: "Telephone numbers",
11
13
  language: "Language",
12
14
  appearance: "Appearance",
13
15
  /*
@@ -32,6 +34,7 @@ export async function getPhiProfilePageLabels(options) {
32
34
  return {
33
35
  page: labels.page,
34
36
  name: labels.name,
37
+ phone: labels.phone,
35
38
  language: labels.language,
36
39
  appearance: labels.appearance,
37
40
  subscriptions: labels.subscriptions,
@@ -45,6 +45,10 @@ export declare const PHI_ASSET_RUNTIME_MODULE_ROUTES: (PhiCmsRoutePresetDescript
45
45
  path: string;
46
46
  landingPage?: true;
47
47
  title: string;
48
+ description?: string;
49
+ shareImage?: {
50
+ asset: string;
51
+ };
48
52
  defaultPageFlags?: number;
49
53
  loadTree: (context: import("../../../types").PhiCmsDescriptorBuildContext & {
50
54
  activeModuleIds: ReadonlySet<import("../contracts").PhiRuntimeModuleId>;
@@ -133,7 +133,7 @@ export async function buildPhiDefaultBuilderMediaPageTree({ page, runtime, }) {
133
133
  config: {
134
134
  title: assetLabels.inspector.inspectorTitle ?? "Asset inspector",
135
135
  placement: "right",
136
- size: 377,
136
+ size: { width: 377 },
137
137
  mountPolicy: "lazy-keep",
138
138
  // A clear pane: the Canvas shows through, frosted.
139
139
  surface: { background: { base: { kind: "color", color: "transparent" }, filter: "glass" } },
@@ -212,7 +212,7 @@ export async function buildPhiDefaultBuilderMediaPageTree({ page, runtime, }) {
212
212
  config: {
213
213
  title: assetLabels.editor.createFolderTitle ?? "Create folder",
214
214
  controlSize: "medium",
215
- width: PHI_DIALOG_WIDTH_SINGLE_COLUMN,
215
+ size: { width: PHI_DIALOG_WIDTH_SINGLE_COLUMN },
216
216
  flags: PhiCmsFlags.Centered,
217
217
  mountPolicy: "remount",
218
218
  closeMode: "immediate",
@@ -397,6 +397,8 @@ export async function buildPhiDefaultBuilderMediaPageTree({ page, runtime, }) {
397
397
  id: PHI_ASSET_MEDIA_PAGE_WIDGET_IDS.widgetMediaPreview,
398
398
  parentLayoutNodeId: PHI_ASSET_MEDIA_PAGE_LAYOUT_IDS.layoutContent,
399
399
  slotIndex: 0,
400
+ // The Media label set's words, translated already.
401
+ flags: PhiCmsFlags.NoTranslate,
400
402
  label: "dev media preview",
401
403
  config: {
402
404
  presentation: {
@@ -67,9 +67,11 @@ export async function buildPhiAuthAreaLoginOverlayTree({ page, runtime, area, })
67
67
  * A login asks for two short lines and is not a page. The width has a floor rather than a
68
68
  * preference, though: the form inside decides its own columns from its own measured width, and
69
69
  * under 360px it puts every label back above its input. What is left over for chrome is about
70
- * a dozen pixels, so 400 keeps the two columns with room to spare.
70
+ * a dozen pixels, so 400 keeps the two columns with room to spare -- the floor is `minSize`,
71
+ * and the Modal still gives way to a phone narrower than it (OVERLAYS.md, "Presentation config").
71
72
  */
72
- width: { compact: "calc(100vw - 32px)", medium: 400, wide: 420 },
73
+ size: { width: 420 },
74
+ minSize: { width: 400 },
73
75
  mountPolicy: "lazy-keep",
74
76
  closeMode: "request",
75
77
  signalRoutes: {
@@ -273,7 +273,7 @@ export async function buildPhiDefaultAdminAuthSettingsPageTree({ page, runtime,
273
273
  title: labels.installations.createTitle,
274
274
  openActionKey: "create",
275
275
  formId: PHI_AUTH_ADMIN_SETTINGS_FORM_IDS.installationCreate,
276
- width: PHI_DIALOG_WIDTH_SINGLE_COLUMN,
276
+ size: { width: PHI_DIALOG_WIDTH_SINGLE_COLUMN },
277
277
  label: labels.installations.createTitle,
278
278
  submitLabel: labels.submitLabel,
279
279
  cancelLabel: labels.installations.confirmCancel,
@@ -298,7 +298,7 @@ export async function buildPhiDefaultAdminAuthSettingsPageTree({ page, runtime,
298
298
  title: labels.installations.editTitle,
299
299
  openActionKey: "edit",
300
300
  formId: PHI_AUTH_ADMIN_SETTINGS_FORM_IDS.installationEdit,
301
- width: PHI_DIALOG_WIDTH_SINGLE_COLUMN,
301
+ size: { width: PHI_DIALOG_WIDTH_SINGLE_COLUMN },
302
302
  label: labels.installations.editTitle,
303
303
  submitLabel: labels.submitLabel,
304
304
  cancelLabel: labels.installations.confirmCancel,
@@ -1,6 +1,6 @@
1
1
  import type { PhiBlockRuntime, PhiClientBlockBaseProps } from "../../../../../types";
2
2
  import type { PhiAuthLogoutWidgetLabels } from "../../../../../components/widgets/label-types/logout";
3
- export declare function PhiAuthLogoutWidgetClient({ runtime, labels, }: PhiClientBlockBaseProps<PhiAuthLogoutWidgetLabels, {
3
+ export declare function PhiAuthLogoutWidgetClient({ runtime, labels, config, }: PhiClientBlockBaseProps<PhiAuthLogoutWidgetLabels, {
4
4
  padding?: number | string;
5
5
  }, Pick<PhiBlockRuntime, "site" | "locale">> & {
6
6
  runtime: Pick<PhiBlockRuntime, "site" | "locale">;
@@ -8,7 +8,7 @@ import { localizePath } from "../../../../../helpers/locale";
8
8
  import { PhiFlexControl } from "../../../../../components/controls/phi-flex-control";
9
9
  import { PhiTypographyControl } from "../../../../../components/controls/phi-typography-control";
10
10
  import { PhiSpinControl } from "../../../../../components/controls/phi-spin-control";
11
- export function PhiAuthLogoutWidgetClient({ runtime, labels, }) {
11
+ export function PhiAuthLogoutWidgetClient({ runtime, labels, config, }) {
12
12
  const [error, setError] = useState(null);
13
13
  const locale = runtime.locale.current;
14
14
  const siteKey = runtime.site.key;
@@ -33,5 +33,5 @@ export function PhiAuthLogoutWidgetClient({ runtime, labels, }) {
33
33
  void logout();
34
34
  return () => controller.abort();
35
35
  }, [failedLabel, locale, siteKey]);
36
- return (_jsx(PhiFlexControl, { vertical: true, align: "center", gap: "middle", children: error ? (_jsxs(_Fragment, { children: [_jsx(PhiAlertControl, { level: "error", showIcon: true, title: error }), _jsx(PhiButtonControl, { onClick: () => window.location.reload(), label: labels.retry })] })) : (_jsxs(_Fragment, { children: [_jsx(PhiSpinControl, {}), _jsx(PhiTypographyControl, { type: "secondary", children: labels.signingOut })] })) }));
36
+ return (_jsx(PhiFlexControl, { vertical: true, align: "center", gap: "middle", style: { padding: config?.padding }, children: error ? (_jsxs(_Fragment, { children: [_jsx(PhiAlertControl, { level: "error", showIcon: true, title: error }), _jsx(PhiButtonControl, { onClick: () => window.location.reload(), label: labels.retry })] })) : (_jsxs(_Fragment, { children: [_jsx(PhiSpinControl, {}), _jsx(PhiTypographyControl, { type: "secondary", children: labels.signingOut })] })) }));
37
37
  }
@@ -1,8 +1,12 @@
1
1
  import type { PhiBlockRuntime } from "../../../../../types";
2
2
  import type { PhiAuthWorkflowBodyLabels } from "../../../../../components/widgets/label-types/auth-workflow";
3
3
  import { type PhiAuthSecurityWidgetLabels } from "../../../../../components/widgets/label-types/security";
4
- export declare function PhiAuthSecurityWidgetClient({ apiPath, runtime, labels, workflowLabels, }: {
4
+ export declare function PhiAuthSecurityWidgetClient({ apiPath, runtime, labels, workflowLabels, config, }: {
5
5
  apiPath?: string;
6
+ /** The Widget's padding, as the account avatar applies it, around every state it draws. */
7
+ config?: {
8
+ padding?: number | string;
9
+ };
6
10
  /** The page's locale, which dates are written in; the browser's own language is not the Site's. */
7
11
  runtime: Pick<PhiBlockRuntime, "locale">;
8
12
  labels: PhiAuthSecurityWidgetLabels;
@@ -15,7 +15,7 @@ import { formatPhiAuthSecurityWidgetLabel, } from "../../../../../components/wid
15
15
  import { usePhiPathname } from "../../../../../components/runtime/use-phi-pathname";
16
16
  const PhiAuthWorkflowBody = lazy(() => import("../../../../../components/widgets/client/auth-workflow-body")
17
17
  .then((module) => ({ default: module.PhiAuthWorkflowBody })));
18
- export function PhiAuthSecurityWidgetClient({ apiPath = "/api/auth/account/security", runtime, labels, workflowLabels, }) {
18
+ export function PhiAuthSecurityWidgetClient({ apiPath = "/api/auth/account/security", runtime, labels, workflowLabels, config, }) {
19
19
  const [payload, setPayload] = useState(null);
20
20
  const [loading, setLoading] = useState(true);
21
21
  const [error, setError] = useState(null);
@@ -76,17 +76,19 @@ export function PhiAuthSecurityWidgetClient({ apiPath = "/api/auth/account/secur
76
76
  function revokeSession(sessionId) {
77
77
  return removeAndReload(`/api/auth/account/sessions/${encodeURIComponent(sessionId)}`, labels.errors.sessionRevokeFailed);
78
78
  }
79
+ const padding = config?.padding;
79
80
  if (enrolling) {
80
- return (_jsx(Suspense, { fallback: _jsx(PhiSkeletonControl, { lines: 4 }), children: _jsx(PhiAuthWorkflowBody, { mode: "enroll", next: pathname, labels: workflowLabels, onComplete: async () => {
81
- setEnrolling(false);
82
- await load();
83
- } }) }));
81
+ return (_jsx(PhiFlexControl, { vertical: true, style: { padding }, children: _jsx(Suspense, { fallback: _jsx(PhiSkeletonControl, { lines: 4 }), children: _jsx(PhiAuthWorkflowBody, { mode: "enroll", next: pathname, labels: workflowLabels, onComplete: async () => {
82
+ setEnrolling(false);
83
+ await load();
84
+ } }) }) }));
84
85
  }
85
- if (loading)
86
- return _jsx(PhiSkeletonControl, { lines: 8, withTitle: true });
87
- if (!payload)
88
- return _jsx(PhiAlertControl, { level: "error", showIcon: true, title: error ?? labels.errors.unavailable });
89
- return (_jsxs(PhiFlexControl, { vertical: true, gap: "large", children: [_jsx(PhiTypographyControl, { presentation: "paragraph", type: "secondary", children: labels.intro }), error ? _jsx(PhiAlertControl, { level: "error", showIcon: true, title: error, dismissible: true, onDismiss: () => setError(null) }) : null, _jsx(PhiCardControl, { title: labels.authenticators.title, toolbar: _jsx(PhiButtonControl, { type: "primary", onClick: () => setEnrolling(true), label: labels.authenticators.add }), children: _jsx(PhiEntryListControl, { emptyDescription: labels.authenticators.empty, entries: payload.factors
86
+ if (loading || !payload) {
87
+ return (_jsx(PhiFlexControl, { vertical: true, style: { padding }, children: loading
88
+ ? _jsx(PhiSkeletonControl, { lines: 8, withTitle: true })
89
+ : _jsx(PhiAlertControl, { level: "error", showIcon: true, title: error ?? labels.errors.unavailable }) }));
90
+ }
91
+ return (_jsxs(PhiFlexControl, { vertical: true, gap: "large", style: { padding }, children: [_jsx(PhiTypographyControl, { presentation: "paragraph", type: "secondary", children: labels.intro }), error ? _jsx(PhiAlertControl, { level: "error", showIcon: true, title: error, dismissible: true, onDismiss: () => setError(null) }) : null, _jsx(PhiCardControl, { title: labels.authenticators.title, toolbar: _jsx(PhiButtonControl, { type: "primary", onClick: () => setEnrolling(true), label: labels.authenticators.add }), children: _jsx(PhiEntryListControl, { emptyDescription: labels.authenticators.empty, entries: payload.factors
90
92
  .filter((factor) => factor.type === 2 && factor.confirmedAt)
91
93
  .map((factor) => ({
92
94
  key: String(factor.id),
@@ -29,7 +29,7 @@ export async function buildPhiAvatarAreaPickerOverlayTree({ page, runtime, }) {
29
29
  config: {
30
30
  title: labels.overlayTitle,
31
31
  controlSize: "medium",
32
- width: { compact: "calc(100vw - 32px)", medium: 480, wide: 520 },
32
+ size: { width: 520 },
33
33
  /*
34
34
  * `immediate`, not `request`. Request mode keeps the Overlay open and emits a `closeRequest`
35
35
  * for a Controller to answer -- and this Module has no Controller, so the X and the mask were
@@ -44,6 +44,10 @@ export declare const PHI_BLOG_RUNTIME_MODULE_ROUTES: ({
44
44
  path: string;
45
45
  landingPage?: true;
46
46
  title: string;
47
+ description?: string;
48
+ shareImage?: {
49
+ asset: string;
50
+ };
47
51
  defaultPageFlags?: number;
48
52
  loadTree: (context: import("../../../types").PhiCmsDescriptorBuildContext & {
49
53
  activeModuleIds: ReadonlySet<import("../contracts").PhiRuntimeModuleId>;
@@ -4,7 +4,8 @@
4
4
  * Background control uses; this adds only what a picture placed on its own also needs.
5
5
  *
6
6
  * It writes the keys every image source is read from (`readPhiMediaImageSourceConfig`) -- `sourceKind`,
7
- * `assetId`, `variantKey`, `variantVersion`, `sourceUrl` -- and `alt`. An Asset is picked from the media
7
+ * `assetId`, `variantKey`, `sourceUrl` -- and `alt`. No `variantVersion`: the Card draws the resolved
8
+ * Asset's own, so a stored one only went stale; choosing a picture clears one an older field wrote. An Asset is picked from the media
8
9
  * library; without one, an address stands for a picture from elsewhere. Removing the picture clears both,
9
10
  * so nothing of the old one is left to come back.
10
11
  */
@@ -17,7 +17,8 @@ const PHI_IMAGE_FIELD_ORIGINAL_VARIANT = "__original__";
17
17
  * Background control uses; this adds only what a picture placed on its own also needs.
18
18
  *
19
19
  * It writes the keys every image source is read from (`readPhiMediaImageSourceConfig`) -- `sourceKind`,
20
- * `assetId`, `variantKey`, `variantVersion`, `sourceUrl` -- and `alt`. An Asset is picked from the media
20
+ * `assetId`, `variantKey`, `sourceUrl` -- and `alt`. No `variantVersion`: the Card draws the resolved
21
+ * Asset's own, so a stored one only went stale; choosing a picture clears one an older field wrote. An Asset is picked from the media
21
22
  * library; without one, an address stands for a picture from elsewhere. Removing the picture clears both,
22
23
  * so nothing of the old one is left to come back.
23
24
  */
@@ -39,7 +40,7 @@ export function PhiInspectorImageFieldControl({ config, disabled, onChange, }) {
39
40
  sourceKind: "asset",
40
41
  assetId: picked.id,
41
42
  variantKey: PhiImageAssetVariantKey.Card,
42
- variantVersion: picked.variantVersion ?? null,
43
+ variantVersion: undefined,
43
44
  sourceUrl: undefined,
44
45
  })
45
46
  : undefined, onAssetClear: editable
@@ -0,0 +1,23 @@
1
+ import { type ReactNode } from "react";
2
+ import { type PhiTableProviderRegistration } from "../../../../components/widgets/client/shared/phi-table-provider";
3
+ import type { PhiRuntimeModuleDataProviderDescriptor } from "../../../../types/cms-plugins";
4
+ import type { PhiRuntimeDataProviderKey } from "../../../../types/runtime-data-provider";
5
+ /**
6
+ * What the canvas has of a Table Provider the Builder may not read: its declaration, and no rows.
7
+ *
8
+ * `authoringMode: "none"` exposes metadata and binding fields only (TABLES.md), so the edited Area's
9
+ * Module never hands the canvas a Client for it. A Table bound to one -- the conversations inbox, the
10
+ * groups, the customer file -- found no Provider at all and drew "not available from the active runtime
11
+ * modules", which reads as a Module that is switched off when it is the Builder keeping its hands off a
12
+ * person's data. Standing in with the declared resources and an empty answer lets the Table draw its
13
+ * columns, tools and binding fields as an author arranges them, and asks the Site nothing.
14
+ */
15
+ export declare function createPhiMetadataTableProviderRegistration(descriptor: Extract<PhiRuntimeModuleDataProviderDescriptor, {
16
+ kind: "table";
17
+ }>): PhiTableProviderRegistration;
18
+ export declare function PhiBuilderMetadataTableProviders({ descriptors, mountedProviderKeys, children, }: {
19
+ descriptors: readonly PhiRuntimeModuleDataProviderDescriptor[];
20
+ /** Providers the canvas mounts for real (the Builder's own pickers), which need no stand-in. */
21
+ mountedProviderKeys: readonly PhiRuntimeDataProviderKey[];
22
+ children: ReactNode;
23
+ }): ReactNode;
@@ -0,0 +1,38 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useMemo } from "react";
4
+ import { PhiTableProviderClient } from "../../../../components/widgets/client/shared/phi-table-provider";
5
+ import { PhiTableProviderError } from "../../../../types/table-widget";
6
+ /**
7
+ * What the canvas has of a Table Provider the Builder may not read: its declaration, and no rows.
8
+ *
9
+ * `authoringMode: "none"` exposes metadata and binding fields only (TABLES.md), so the edited Area's
10
+ * Module never hands the canvas a Client for it. A Table bound to one -- the conversations inbox, the
11
+ * groups, the customer file -- found no Provider at all and drew "not available from the active runtime
12
+ * modules", which reads as a Module that is switched off when it is the Builder keeping its hands off a
13
+ * person's data. Standing in with the declared resources and an empty answer lets the Table draw its
14
+ * columns, tools and binding fields as an author arranges them, and asks the Site nothing.
15
+ */
16
+ export function createPhiMetadataTableProviderRegistration(descriptor) {
17
+ return {
18
+ key: descriptor.key,
19
+ resources: descriptor.resources,
20
+ query: async () => ({ rows: [], total: 0 }),
21
+ ...(descriptor.resources.some((resource) => resource.recordRead === true)
22
+ ? {
23
+ readRecord: async () => {
24
+ throw new PhiTableProviderError("authoring-not-supported", `The Builder does not read records of "${descriptor.key}".`);
25
+ },
26
+ }
27
+ : {}),
28
+ };
29
+ }
30
+ export function PhiBuilderMetadataTableProviders({ descriptors, mountedProviderKeys, children, }) {
31
+ const registrations = useMemo(() => {
32
+ const mounted = new Set(mountedProviderKeys);
33
+ return descriptors.flatMap((descriptor) => descriptor.kind === "table" && descriptor.authoringMode === "none" && !mounted.has(descriptor.key)
34
+ ? [createPhiMetadataTableProviderRegistration(descriptor)]
35
+ : []);
36
+ }, [descriptors, mountedProviderKeys]);
37
+ return registrations.reduceRight((nested, registration) => (_jsx(PhiTableProviderClient, { registration: registration, children: nested }, registration.key)), children);
38
+ }
@@ -1,5 +1,8 @@
1
1
  import { type PhiBuilderChromeWidgetLabels } from "../../../../components/widgets/label-types/builder-chrome";
2
- export declare function PhiBuilderModeSwitchWidgetClient({ disabled, labels, }: {
2
+ import type { PhiSignalRouteSet } from "../../../../types/signals";
3
+ export declare function PhiBuilderModeSwitchWidgetClient({ disabled, labels, signalRoutes, }: {
3
4
  disabled?: boolean;
4
5
  labels?: PhiBuilderChromeWidgetLabels;
6
+ /** The routes its tree writes for `change`: to the Builder Controller, which enters the mode. */
7
+ signalRoutes?: PhiSignalRouteSet | null;
5
8
  }): import("react").JSX.Element;
@@ -6,26 +6,13 @@ import { PHI_BUILDER_CHROME_WIDGET_DEFAULT_LABELS, } from "../../../../component
6
6
  import { usePhiControlSignalController } from "../../../../components/widgets/client/shared/phi-control-signals";
7
7
  import { usePhiConfig } from "../../../../components/root/phi-config-provider";
8
8
  import { PhiFlexControl } from "../../../../components/controls/phi-flex-control";
9
- export function PhiBuilderModeSwitchWidgetClient({ disabled = false, labels = PHI_BUILDER_CHROME_WIDGET_DEFAULT_LABELS, }) {
9
+ export function PhiBuilderModeSwitchWidgetClient({ disabled = false, labels = PHI_BUILDER_CHROME_WIDGET_DEFAULT_LABELS, signalRoutes = null, }) {
10
10
  const { token } = usePhiConfig();
11
11
  const builderMode = usePhiDeveloperBuilderStateValue((state) => state.builderMode);
12
12
  const isDisabled = disabled;
13
13
  const controlSignals = usePhiControlSignalController({
14
14
  key: "builderMode",
15
- // The Widget's own address: the Builder Controller does not answer what was sent under its own.
16
- signalRoutes: {
17
- emits: [
18
- {
19
- routeKey: "builder-mode-change",
20
- capabilityId: "change",
21
- scope: "area",
22
- channel: "builderMode",
23
- action: "change",
24
- valueType: "string",
25
- receiver: "broadcast",
26
- },
27
- ],
28
- },
15
+ signalRoutes,
29
16
  typeKey: "segmented",
30
17
  initialDisabled: isDisabled,
31
18
  clearValue: builderMode,
@@ -17,6 +17,7 @@ export function PhiDeveloperBuilderPagesWorkspaceWidgetClient({ pageDraftsByScop
17
17
  title: pageMeta?.title ?? null,
18
18
  description: pageMeta?.description ?? null,
19
19
  index: pageMeta?.index ?? true,
20
+ shareImage: pageMeta?.shareImage ?? null,
20
21
  },
21
22
  });
22
23
  mergePhiDeveloperDeletedPageDrafts(pageMetaArea, {
@@ -26,6 +27,7 @@ export function PhiDeveloperBuilderPagesWorkspaceWidgetClient({ pageDraftsByScop
26
27
  pageMeta?.description,
27
28
  pageMeta?.index,
28
29
  pageMeta?.isDeleted,
30
+ pageMeta?.shareImage,
29
31
  pageMeta?.title,
30
32
  pageMetaArea,
31
33
  pageMetaPageKey,
@@ -8,6 +8,7 @@ import { PhiRuntimeModuleProvider } from "../../../../components/runtime/runtime
8
8
  import { setPhiBuilderModuleMetas } from "../plugin-meta-store";
9
9
  import { usePhiDeveloperBuilderStateValue } from "../developer-workspace-store";
10
10
  import { PhiModuleIconsProvider } from "../../../../components/shell/phi-module-icons";
11
+ import { PhiBuilderMetadataTableProviders } from "./metadata-table-provider-stand-ins";
11
12
  export function PhiBuilderRuntimeModuleAuthoringBoundary({ targetArea, catalog, pickerDataProviderKeys, children, }) {
12
13
  const selectedModuleIds = usePhiDeveloperBuilderStateValue((state) => state.runtimeModuleIdsByArea[targetArea]);
13
14
  const activeEntries = useMemo(() => {
@@ -48,5 +49,5 @@ export function PhiBuilderRuntimeModuleAuthoringBoundary({ targetArea, catalog,
48
49
  targetArea,
49
50
  videoProviderDescriptors,
50
51
  ]);
51
- return (_jsx(PhiRuntimeModuleProvider, { moduleIds: moduleIds, widgetTypes: widgetDefinitions.map((definition) => definition.type), layoutTypes: layoutTypes, widgetDefinitions: widgetDefinitions, dataProviderDescriptors: dataProviderDescriptors, calendarAdapterDescriptors: calendarAdapterDescriptors, videoProviderDescriptors: videoProviderDescriptors, collectionItemRendererDescriptors: collectionItemRendererDescriptors, children: _jsx(PhiRuntimeModuleAuthoringDataProviderHost, { providerKeys: authoringDataProviderKeys, children: _jsx(PhiRuntimeModuleDataProviderClientHost, { providerKeys: pickerDataProviderKeys, mode: "live", children: _jsx(PhiRuntimeModuleAuthoringClientHost, { moduleIds: moduleIds, children: _jsx(PhiModuleIconsProvider, { sets: iconSets, flagUnavailable: true, children: children }) }) }) }) }));
52
+ return (_jsx(PhiRuntimeModuleProvider, { moduleIds: moduleIds, widgetTypes: widgetDefinitions.map((definition) => definition.type), layoutTypes: layoutTypes, widgetDefinitions: widgetDefinitions, dataProviderDescriptors: dataProviderDescriptors, calendarAdapterDescriptors: calendarAdapterDescriptors, videoProviderDescriptors: videoProviderDescriptors, collectionItemRendererDescriptors: collectionItemRendererDescriptors, children: _jsx(PhiRuntimeModuleAuthoringDataProviderHost, { providerKeys: authoringDataProviderKeys, children: _jsx(PhiRuntimeModuleDataProviderClientHost, { providerKeys: pickerDataProviderKeys, mode: "live", children: _jsx(PhiBuilderMetadataTableProviders, { descriptors: dataProviderDescriptors, mountedProviderKeys: pickerDataProviderKeys, children: _jsx(PhiRuntimeModuleAuthoringClientHost, { moduleIds: moduleIds, children: _jsx(PhiModuleIconsProvider, { sets: iconSets, flagUnavailable: true, children: children }) }) }) }) }) }));
52
53
  }
@@ -1,6 +1,6 @@
1
1
  import { type PhiBuilderRuntimeControllerConfig, type PhiBuilderRuntimeControllerPreload } from "./definition";
2
2
  export declare const PHI_BUILDER_RUNTIME_CONTROLLER_PLUGIN: {
3
- renderController: ({ preloadData, config }: import("../../../../types").PhiRuntimeControllerRenderArgs<PhiBuilderRuntimeControllerConfig, PhiBuilderRuntimeControllerPreload>) => import("react").FunctionComponentElement<import("./workspace-controller").PhiDeveloperBuilderWorkspaceControllerProps>;
3
+ renderController: ({ preloadData, config, runtime }: import("../../../../types").PhiRuntimeControllerRenderArgs<PhiBuilderRuntimeControllerConfig, PhiBuilderRuntimeControllerPreload>) => import("react").FunctionComponentElement<import("./workspace-controller").PhiDeveloperBuilderWorkspaceControllerProps>;
4
4
  kind: "controller";
5
5
  pluginKey: string;
6
6
  key: string;
@@ -55,14 +55,14 @@ export declare const PHI_BUILDER_RUNTIME_CONTROLLER_PLUGIN: {
55
55
  id: string;
56
56
  channel: string;
57
57
  action: "change";
58
- valueType: "string";
59
- valueSchema?: undefined;
58
+ valueType: "json";
59
+ valueSchema: `${string}/signals/${string}`;
60
60
  } | {
61
61
  id: string;
62
62
  channel: string;
63
63
  action: "change";
64
- valueType: "json";
65
- valueSchema: `${string}/signals/${string}`;
64
+ valueType: "string";
65
+ valueSchema?: undefined;
66
66
  } | {
67
67
  id: string;
68
68
  channel: string;
@@ -5,7 +5,7 @@ import { PhiDeveloperBuilderWorkspaceControllerMount } from "./mount";
5
5
  import { PHI_BUILDER_RUNTIME_CONTROLLER_DEFINITION, } from "./definition";
6
6
  export const PHI_BUILDER_RUNTIME_CONTROLLER_PLUGIN = {
7
7
  ...PHI_BUILDER_RUNTIME_CONTROLLER_DEFINITION,
8
- renderController: ({ preloadData, config }) => {
8
+ renderController: ({ preloadData, config, runtime }) => {
9
9
  if (!preloadData?.shellPresetDraftsByArea ||
10
10
  !preloadData.runtimeModuleDefinitions ||
11
11
  !preloadData.runtimeModuleIdsByArea ||
@@ -25,6 +25,7 @@ export const PHI_BUILDER_RUNTIME_CONTROLLER_PLUGIN = {
25
25
  throw new Error("Builder runtime controller requires server preload data.");
26
26
  }
27
27
  return createElement(PhiDeveloperBuilderWorkspaceControllerMount, {
28
+ viewer: runtime.viewer,
28
29
  signalRoutes: config.signalRoutes,
29
30
  shellPresetDraftsByArea: preloadData.shellPresetDraftsByArea,
30
31
  runtimeModuleDefinitions: preloadData.runtimeModuleDefinitions,
@@ -105,14 +105,14 @@ export declare const PHI_BUILDER_RUNTIME_CONTROLLER_DEFINITION: {
105
105
  id: string;
106
106
  channel: string;
107
107
  action: "change";
108
- valueType: "string";
109
- valueSchema?: undefined;
108
+ valueType: "json";
109
+ valueSchema: `${string}/signals/${string}`;
110
110
  } | {
111
111
  id: string;
112
112
  channel: string;
113
113
  action: "change";
114
- valueType: "json";
115
- valueSchema: `${string}/signals/${string}`;
114
+ valueType: "string";
115
+ valueSchema?: undefined;
116
116
  } | {
117
117
  id: string;
118
118
  channel: string;
@@ -150,6 +150,13 @@ export const PHI_BUILDER_RUNTIME_CONTROLLER_DEFINITION = {
150
150
  action: "activate",
151
151
  valueType: "none",
152
152
  },
153
+ {
154
+ id: "revisionDraftStatus",
155
+ channel: "draftStatus",
156
+ action: "change",
157
+ valueType: "json",
158
+ valueSchema: PHI_SIGNAL_VALUE_SCHEMAS.revisionsDraftStatus,
159
+ },
153
160
  {
154
161
  id: "builderMode",
155
162
  channel: "builderMode",
@@ -1,8 +1,9 @@
1
+ import type { PhiAccessViewer } from "../../../../types/access";
1
2
  import { type PhiHistoryLabels } from "../../../../components/widgets/label-types/history";
2
3
  import type { PhiBuilderSavedHistoryHead } from "./draft-status-controller";
3
4
  import type { PhiDeveloperBuilderArea, PhiDeveloperBuilderWorkspaceState } from "../developer-workspace-types";
4
5
  export type PhiDeveloperBuilderToolbarCommand = "save" | "preview" | "publish" | "undo" | "redo" | "reset";
5
- export declare function usePhiBuilderDraftCommandController({ effectiveArea, effectiveNavKey, effectivePageKey, pathname, captureHistoryHead, reportSaved, hasUnsavedChanges, state, historyLabels, }: {
6
+ export declare function usePhiBuilderDraftCommandController({ effectiveArea, effectiveNavKey, effectivePageKey, pathname, captureHistoryHead, reportSaved, hasUnsavedChanges, state, viewer, historyLabels, }: {
6
7
  effectiveArea: PhiDeveloperBuilderArea;
7
8
  effectiveNavKey: string;
8
9
  effectivePageKey: string;
@@ -14,6 +15,7 @@ export declare function usePhiBuilderDraftCommandController({ effectiveArea, eff
14
15
  /** Whether the workspace on screen holds edits no stored revision has. */
15
16
  hasUnsavedChanges: boolean;
16
17
  state: PhiDeveloperBuilderWorkspaceState;
18
+ viewer: PhiAccessViewer;
17
19
  /** What an undo or redo says it moved, in the author's language. */
18
20
  historyLabels: PhiHistoryLabels;
19
21
  }): {
@@ -19,7 +19,7 @@ import { usePhiBuilderModuleMetas } from "../plugin-meta-store";
19
19
  import { setPhiWorkspaceModuleSelection } from "../workspace-catalog-actions";
20
20
  import { applyPhiBuilderNavigationFolderTargets, refreshPhiBuilderNavigationFolderAddresses, } from "../navigation-folder-address";
21
21
  import { createPhiBuilderNavigationPathContext } from "../navigation-path-context";
22
- export function usePhiBuilderDraftCommandController({ effectiveArea, effectiveNavKey, effectivePageKey, pathname, captureHistoryHead, reportSaved, hasUnsavedChanges, state, historyLabels, }) {
22
+ export function usePhiBuilderDraftCommandController({ effectiveArea, effectiveNavKey, effectivePageKey, pathname, captureHistoryHead, reportSaved, hasUnsavedChanges, state, viewer, historyLabels, }) {
23
23
  /*
24
24
  * Every one of these is a command from a toolbar somewhere else, so there is nothing on screen to
25
25
  * hang a Popconfirm on. Drawn as a Dialog by this Controller rather than asked of Ant Design's
@@ -258,6 +258,7 @@ export function usePhiBuilderDraftCommandController({ effectiveArea, effectiveNa
258
258
  * before it opens, and which of the two it shows.
259
259
  */
260
260
  const result = await previewPhiDeveloperBuilderDraft(state, workspaceKind, {
261
+ viewer,
261
262
  pathname,
262
263
  scope: previewScope,
263
264
  });