@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
@@ -18,6 +18,48 @@ export declare const PHI_APP_RUNTIME_MODULE_DEFINITION: Omit<{
18
18
  csrfPath: string;
19
19
  requiresCsrf: true;
20
20
  credentialPolicy: "site-session";
21
+ } | {
22
+ key: `${string}/${string}`;
23
+ ownerModuleId: "@phis/ui/modules/app";
24
+ title: string;
25
+ phase: "submit";
26
+ handlerKey: "site.app.profile-phone";
27
+ category: "site";
28
+ transport: "relay";
29
+ method: "PATCH";
30
+ endpointKey: null;
31
+ upstreamPath: string;
32
+ csrfPath: string;
33
+ requiresCsrf: true;
34
+ credentialPolicy: "site-session";
35
+ } | {
36
+ key: `${string}/${string}`;
37
+ ownerModuleId: "@phis/ui/modules/app";
38
+ title: string;
39
+ phase: "submit";
40
+ handlerKey: "site.app.address-create";
41
+ category: "site";
42
+ transport: "relay";
43
+ method: "POST";
44
+ endpointKey: null;
45
+ upstreamPath: string;
46
+ csrfPath: null;
47
+ requiresCsrf: false;
48
+ credentialPolicy: "site-session";
49
+ } | {
50
+ key: `${string}/${string}`;
51
+ ownerModuleId: "@phis/ui/modules/app";
52
+ title: string;
53
+ phase: "submit";
54
+ handlerKey: "site.app.address-edit";
55
+ category: "site";
56
+ transport: "relay";
57
+ method: "PUT";
58
+ endpointKey: null;
59
+ upstreamPath: string;
60
+ csrfPath: null;
61
+ requiresCsrf: false;
62
+ credentialPolicy: "site-session";
21
63
  } | {
22
64
  key: `${string}/${string}`;
23
65
  ownerModuleId: "@phis/ui/modules/app";
@@ -62,6 +104,95 @@ export declare const PHI_APP_RUNTIME_MODULE_DEFINITION: Omit<{
62
104
  credentialPolicy: "site-session";
63
105
  })[];
64
106
  };
107
+ dataProviders: {
108
+ key: `${string}/${string}`;
109
+ ownerModuleId: "@phis/ui/modules/app";
110
+ kind: "table";
111
+ executionMode: "live";
112
+ authoringMode: "none";
113
+ title: string;
114
+ description: string;
115
+ resources: {
116
+ resourceKey: string;
117
+ title: string;
118
+ rowIdentityPath: string;
119
+ recordRead: true;
120
+ fields: ({
121
+ key: string;
122
+ title: string;
123
+ type: "number";
124
+ required: true;
125
+ options?: undefined;
126
+ } | {
127
+ key: string;
128
+ title: string;
129
+ type: "string";
130
+ required?: undefined;
131
+ options?: undefined;
132
+ } | {
133
+ key: string;
134
+ title: string;
135
+ type: "enum[]";
136
+ options: {
137
+ value: "billing" | "shipping" | "defaultBilling" | "defaultShipping";
138
+ label: "billing" | "shipping" | "defaultBilling" | "defaultShipping";
139
+ }[];
140
+ required?: undefined;
141
+ } | {
142
+ key: string;
143
+ title: string;
144
+ type: "boolean";
145
+ required?: undefined;
146
+ options?: undefined;
147
+ } | {
148
+ key: string;
149
+ title: string;
150
+ type: "datetime";
151
+ required?: undefined;
152
+ options?: undefined;
153
+ } | {
154
+ key: string;
155
+ title: string;
156
+ type: "json";
157
+ required?: undefined;
158
+ options?: undefined;
159
+ } | {
160
+ key: string;
161
+ title: string;
162
+ type: "number";
163
+ required?: undefined;
164
+ options?: undefined;
165
+ })[];
166
+ query: {
167
+ search: false;
168
+ filterFields: never[];
169
+ sorting: "none";
170
+ pagination: "none";
171
+ };
172
+ actions: ({
173
+ key: string;
174
+ title: string;
175
+ scope: "row";
176
+ intent: "write";
177
+ disabledWhen: {
178
+ match: "any";
179
+ conditions: {
180
+ source: "row";
181
+ valuePath: string;
182
+ operator: "truthy";
183
+ }[];
184
+ };
185
+ confirmation?: undefined;
186
+ } | {
187
+ key: string;
188
+ title: string;
189
+ scope: "row";
190
+ intent: "destructive";
191
+ confirmation: "required";
192
+ disabledWhen?: undefined;
193
+ })[];
194
+ }[];
195
+ }[];
65
196
  moduleId: "@phis/ui/modules/app";
66
197
  area: "app";
67
198
  }, "area"> & {
@@ -1,5 +1,6 @@
1
1
  import { definePhiAreaBaseRuntimeModuleDefinition } from "../area-base-definition";
2
2
  import { PHI_APP_FORM_HANDLER_PROVIDER_DESCRIPTORS } from "./forms";
3
+ import { PHI_APP_RUNTIME_DATA_PROVIDER_DESCRIPTORS } from "./data-providers";
3
4
  import { PHI_APP_RUNTIME_MODULE_IDENTITY } from "./ids";
4
5
  import { PHI_CORE_SERVER_BINDING, } from "../../../types/server-capabilities";
5
6
  export const PHI_APP_RUNTIME_MODULE_DEFINITION = definePhiAreaBaseRuntimeModuleDefinition({
@@ -12,4 +13,5 @@ export const PHI_APP_RUNTIME_MODULE_DEFINITION = definePhiAreaBaseRuntimeModuleD
12
13
  formProviders: {
13
14
  handlers: PHI_APP_FORM_HANDLER_PROVIDER_DESCRIPTORS,
14
15
  },
16
+ dataProviders: PHI_APP_RUNTIME_DATA_PROVIDER_DESCRIPTORS,
15
17
  });
@@ -12,11 +12,14 @@
12
12
  */
13
13
  export declare const PHI_APP_FORM_IDS: {
14
14
  readonly profileName: `${string}/forms/${string}`;
15
+ readonly profilePhone: `${string}/forms/${string}`;
16
+ readonly addressCreate: `${string}/forms/${string}`;
17
+ readonly addressEdit: `${string}/forms/${string}`;
15
18
  readonly profileNewsletter: `${string}/forms/${string}`;
16
19
  readonly profileLocale: `${string}/forms/${string}`;
17
20
  readonly profileTheme: `${string}/forms/${string}`;
18
21
  };
19
- export declare const PHI_APP_RUNTIME_MODULE_FORMS: readonly [import("../contracts").PhiRuntimeModuleFormDefinition, import("../contracts").PhiRuntimeModuleFormDefinition, import("../contracts").PhiRuntimeModuleFormDefinition, import("../contracts").PhiRuntimeModuleFormDefinition];
22
+ export declare const PHI_APP_RUNTIME_MODULE_FORMS: readonly [import("../contracts").PhiRuntimeModuleFormDefinition, import("../contracts").PhiRuntimeModuleFormDefinition, import("../contracts").PhiRuntimeModuleFormDefinition, import("../contracts").PhiRuntimeModuleFormDefinition, import("../contracts").PhiRuntimeModuleFormDefinition, import("../contracts").PhiRuntimeModuleFormDefinition, import("../contracts").PhiRuntimeModuleFormDefinition];
20
23
  export declare const PHI_APP_FORM_HANDLER_PROVIDER_DESCRIPTORS: ({
21
24
  key: `${string}/${string}`;
22
25
  ownerModuleId: "@phis/ui/modules/app";
@@ -31,6 +34,48 @@ export declare const PHI_APP_FORM_HANDLER_PROVIDER_DESCRIPTORS: ({
31
34
  csrfPath: string;
32
35
  requiresCsrf: true;
33
36
  credentialPolicy: "site-session";
37
+ } | {
38
+ key: `${string}/${string}`;
39
+ ownerModuleId: "@phis/ui/modules/app";
40
+ title: string;
41
+ phase: "submit";
42
+ handlerKey: "site.app.profile-phone";
43
+ category: "site";
44
+ transport: "relay";
45
+ method: "PATCH";
46
+ endpointKey: null;
47
+ upstreamPath: string;
48
+ csrfPath: string;
49
+ requiresCsrf: true;
50
+ credentialPolicy: "site-session";
51
+ } | {
52
+ key: `${string}/${string}`;
53
+ ownerModuleId: "@phis/ui/modules/app";
54
+ title: string;
55
+ phase: "submit";
56
+ handlerKey: "site.app.address-create";
57
+ category: "site";
58
+ transport: "relay";
59
+ method: "POST";
60
+ endpointKey: null;
61
+ upstreamPath: string;
62
+ csrfPath: null;
63
+ requiresCsrf: false;
64
+ credentialPolicy: "site-session";
65
+ } | {
66
+ key: `${string}/${string}`;
67
+ ownerModuleId: "@phis/ui/modules/app";
68
+ title: string;
69
+ phase: "submit";
70
+ handlerKey: "site.app.address-edit";
71
+ category: "site";
72
+ transport: "relay";
73
+ method: "PUT";
74
+ endpointKey: null;
75
+ upstreamPath: string;
76
+ csrfPath: null;
77
+ requiresCsrf: false;
78
+ credentialPolicy: "site-session";
34
79
  } | {
35
80
  key: `${string}/${string}`;
36
81
  ownerModuleId: "@phis/ui/modules/app";
@@ -1,11 +1,12 @@
1
1
  import { createPhiFormLabelSetLoader } from "../../../components/forms/shared-form-loaders";
2
2
  import { createPhiFormId } from "../../../types/form-id";
3
3
  import { PHI_SHARED_PACKAGE_NAME } from "../../../types/signals";
4
- import { PHI_FORM_FIELD_PROVIDER_KEYS, createPhiSharedFormProviderKey, } from "../../../components/forms/form-provider-contract";
4
+ import { PHI_FORM_FIELD_PROVIDER_KEYS, PHI_FORM_VALIDATION_PROVIDER_KEYS, createPhiSharedFormProviderKey, } from "../../../components/forms/form-provider-contract";
5
5
  import { PHI_CORE_RUNTIME_DATA_PROVIDER_KEYS } from "../../../constants/core-data-provider-keys";
6
6
  import { definePhiRuntimeModuleForm } from "../../../components/forms/form-registry";
7
7
  import { PHI_APP_RUNTIME_MODULE_ID } from "./ids";
8
8
  import { phiFormLabel as label } from "../../../components/forms/form-descriptor-text";
9
+ import { PhisSiteAddressFlags } from "@phis/contracts/users";
9
10
  /**
10
11
  * What a signed-in person can settle about their own account, as Forms rather than as Widgets.
11
12
  *
@@ -20,17 +21,25 @@ import { phiFormLabel as label } from "../../../components/forms/form-descriptor
20
21
  */
21
22
  export const PHI_APP_FORM_IDS = {
22
23
  profileName: createPhiFormId(PHI_SHARED_PACKAGE_NAME, "app/profile-name"),
24
+ profilePhone: createPhiFormId(PHI_SHARED_PACKAGE_NAME, "app/profile-phone"),
25
+ addressCreate: createPhiFormId(PHI_SHARED_PACKAGE_NAME, "app/address-create"),
26
+ addressEdit: createPhiFormId(PHI_SHARED_PACKAGE_NAME, "app/address-edit"),
23
27
  profileNewsletter: createPhiFormId(PHI_SHARED_PACKAGE_NAME, "app/profile-newsletter"),
24
28
  profileLocale: createPhiFormId(PHI_SHARED_PACKAGE_NAME, "app/profile-locale"),
25
29
  profileTheme: createPhiFormId(PHI_SHARED_PACKAGE_NAME, "app/profile-theme"),
26
30
  };
27
31
  const PHI_APP_FORM_HANDLER_KEYS = {
28
32
  profileName: "site.app.profile-name",
33
+ profilePhone: "site.app.profile-phone",
34
+ addressCreate: "site.app.address-create",
35
+ addressEdit: "site.app.address-edit",
29
36
  profileNewsletter: "site.app.profile-newsletter",
30
37
  profileLocale: "site.app.profile-locale",
31
38
  profileTheme: "site.app.profile-theme",
32
39
  };
33
40
  const NAME_LABEL_SET_KEY = "@phis/ui/modules/app/labels/profile-name";
41
+ const PHONE_LABEL_SET_KEY = "@phis/ui/modules/app/labels/profile-phone";
42
+ const ADDRESS_LABEL_SET_KEY = "@phis/ui/modules/app/labels/address";
34
43
  const NEWSLETTER_LABEL_SET_KEY = "@phis/ui/modules/app/labels/profile-newsletter";
35
44
  const LOCALE_LABEL_SET_KEY = "@phis/ui/modules/app/labels/profile-locale";
36
45
  const THEME_LABEL_SET_KEY = "@phis/ui/modules/app/labels/profile-theme";
@@ -79,6 +88,91 @@ const nameDescriptor = {
79
88
  },
80
89
  layout: { gap: { compact: "sm", medium: "base" } },
81
90
  };
91
+ /**
92
+ * The two numbers beside the name, a Form of their own because Core keeps them behind their own write
93
+ * (`PATCH /api/v1/auth/profile/phone`), which takes both at once: what is sent is what is kept, an empty
94
+ * field clears its number. They are written as the person writes them -- spaces, a leading `+`, an
95
+ * extension -- so the rule is the Core's own length and nothing about the digits; the member picker finds a
96
+ * person by them either way.
97
+ */
98
+ const PHONE_MAX_LENGTH = 64;
99
+ const phoneDescriptor = {
100
+ schemaVersion: 1,
101
+ key: PHI_APP_FORM_IDS.profilePhone,
102
+ labelSetKey: PHONE_LABEL_SET_KEY,
103
+ fields: [
104
+ {
105
+ key: "phone",
106
+ fieldProviderKey: PHI_FORM_FIELD_PROVIDER_KEYS.tel,
107
+ label: label("phone", "Business phone"),
108
+ autoComplete: "work tel",
109
+ validation: [{
110
+ providerKey: PHI_FORM_VALIDATION_PROVIDER_KEYS.maxLength,
111
+ message: label("tooLong", "At most 64 characters."),
112
+ config: { max: PHONE_MAX_LENGTH },
113
+ }],
114
+ },
115
+ {
116
+ key: "mobile",
117
+ fieldProviderKey: PHI_FORM_FIELD_PROVIDER_KEYS.tel,
118
+ label: label("mobile", "Mobile"),
119
+ autoComplete: "mobile tel",
120
+ validation: [{
121
+ providerKey: PHI_FORM_VALIDATION_PROVIDER_KEYS.maxLength,
122
+ message: label("tooLong", "At most 64 characters."),
123
+ config: { max: PHONE_MAX_LENGTH },
124
+ }],
125
+ },
126
+ ],
127
+ success: {
128
+ title: label("successTitle", "Numbers updated"),
129
+ text: label("successText", "Your telephone numbers have been saved."),
130
+ },
131
+ layout: { gap: { compact: "sm", medium: "base" } },
132
+ };
133
+ /**
134
+ * One address of the account's book, added or changed (`users:v1`, phis-server
135
+ * `/api/site/account/addresses`): the same two fields twice, the change with the hidden id of the version
136
+ * it replaces in its address. Core takes `{ address, flags }`, and the fields are those two values: the
137
+ * `address` field holds the parts as `PhisSiteAddressInput` and its own rules, the `flags` field what the
138
+ * address is for as `PhisSiteAddressFlags`, a default offered only beside its purpose -- Core refuses a
139
+ * default for a purpose the address does not have.
140
+ */
141
+ const ADDRESS_FLAG_OPTIONS = [
142
+ { value: String(PhisSiteAddressFlags.Billing), label: label("billing", "Billing address") },
143
+ { value: String(PhisSiteAddressFlags.Shipping), label: label("shipping", "Shipping address") },
144
+ { value: String(PhisSiteAddressFlags.DefaultBilling), label: label("defaultBilling", "Default for billing") },
145
+ { value: String(PhisSiteAddressFlags.DefaultShipping), label: label("defaultShipping", "Default for shipping") },
146
+ ];
147
+ function addressDescriptor(formId, mode) {
148
+ return {
149
+ schemaVersion: 1,
150
+ key: formId,
151
+ labelSetKey: ADDRESS_LABEL_SET_KEY,
152
+ fields: [
153
+ ...(mode === "edit" ? [{ key: "id", fieldProviderKey: PHI_FORM_FIELD_PROVIDER_KEYS.hidden }] : []),
154
+ { key: "address", fieldProviderKey: PHI_FORM_FIELD_PROVIDER_KEYS.address },
155
+ {
156
+ key: "flags",
157
+ fieldProviderKey: PHI_FORM_FIELD_PROVIDER_KEYS.flags,
158
+ label: label("purposes", "Used for"),
159
+ options: ADDRESS_FLAG_OPTIONS,
160
+ config: {
161
+ requires: {
162
+ [String(PhisSiteAddressFlags.DefaultBilling)]: String(PhisSiteAddressFlags.Billing),
163
+ [String(PhisSiteAddressFlags.DefaultShipping)]: String(PhisSiteAddressFlags.Shipping),
164
+ },
165
+ },
166
+ ...(mode === "create" ? { initialValue: PhisSiteAddressFlags.Billing | PhisSiteAddressFlags.Shipping } : {}),
167
+ },
168
+ ],
169
+ success: {
170
+ title: label("successTitle", "Address saved"),
171
+ text: label("successText", "Your address has been saved."),
172
+ },
173
+ layout: { gap: { compact: "sm", medium: "base" } },
174
+ };
175
+ }
82
176
  /**
83
177
  * One switch, and therefore no Save button: the Preset routes the Form's own `stateChange` back to
84
178
  * its `submit` channel, so flipping it is the submit. A panel holding more than one field states a
@@ -177,6 +271,15 @@ const loadNameLabels = createPhiFormLabelSetLoader(() => import("../../../compon
177
271
  successText: labels.feedback.successText,
178
272
  actions: { submitLabel: labels.submitLabel },
179
273
  }));
274
+ const loadPhoneLabels = createPhiFormLabelSetLoader(() => import("../../../components/widgets/label-sets/profile").then((module) => module.getPhiProfilePhoneWidgetLabels), (labels) => ({
275
+ phone: labels.fields.phone,
276
+ mobile: labels.fields.mobile,
277
+ tooLong: labels.tooLong,
278
+ successTitle: labels.feedback.successTitle,
279
+ successText: labels.feedback.successText,
280
+ actions: { submitLabel: labels.submitLabel },
281
+ }));
282
+ const loadAddressLabels = createPhiFormLabelSetLoader(() => import("./trees/addresses-label-set").then((module) => module.getPhiAppAddressesLabels), (labels) => ({ ...labels.form, actions: { submitLabel: labels.save } }));
180
283
  const loadNewsletterLabels = createPhiFormLabelSetLoader(() => import("../../../components/widgets/label-sets/profile").then((module) => module.getPhiProfileOverviewWidgetLabels), (labels) => ({
181
284
  newsletter: labels.newsletterLabel,
182
285
  newsletterDescription: labels.newsletterDescription,
@@ -205,6 +308,48 @@ export const PHI_APP_RUNTIME_MODULE_FORMS = [
205
308
  submitHandlerKey: PHI_APP_FORM_HANDLER_KEYS.profileName,
206
309
  loadLabels: loadNameLabels,
207
310
  }),
311
+ definePhiRuntimeModuleForm({
312
+ ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
313
+ areas: ["app"],
314
+ formId: PHI_APP_FORM_IDS.profilePhone,
315
+ version: 1,
316
+ flags: 0,
317
+ title: "Telephone numbers",
318
+ description: "The business telephone and mobile number this account can be reached at.",
319
+ category: "forms",
320
+ tags: ["profile", "account"],
321
+ descriptor: phoneDescriptor,
322
+ submitHandlerKey: PHI_APP_FORM_HANDLER_KEYS.profilePhone,
323
+ loadLabels: loadPhoneLabels,
324
+ }),
325
+ definePhiRuntimeModuleForm({
326
+ ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
327
+ areas: ["app"],
328
+ formId: PHI_APP_FORM_IDS.addressCreate,
329
+ version: 1,
330
+ flags: 0,
331
+ title: "Add address",
332
+ description: "A billing or shipping address of this account on this site.",
333
+ category: "forms",
334
+ tags: ["profile", "account", "address"],
335
+ descriptor: addressDescriptor(PHI_APP_FORM_IDS.addressCreate, "create"),
336
+ submitHandlerKey: PHI_APP_FORM_HANDLER_KEYS.addressCreate,
337
+ loadLabels: loadAddressLabels,
338
+ }),
339
+ definePhiRuntimeModuleForm({
340
+ ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
341
+ areas: ["app"],
342
+ formId: PHI_APP_FORM_IDS.addressEdit,
343
+ version: 1,
344
+ flags: 0,
345
+ title: "Change address",
346
+ description: "A new version of one of this account's addresses, replacing it.",
347
+ category: "forms",
348
+ tags: ["profile", "account", "address"],
349
+ descriptor: addressDescriptor(PHI_APP_FORM_IDS.addressEdit, "edit"),
350
+ submitHandlerKey: PHI_APP_FORM_HANDLER_KEYS.addressEdit,
351
+ loadLabels: loadAddressLabels,
352
+ }),
208
353
  definePhiRuntimeModuleForm({
209
354
  ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
210
355
  areas: ["app"],
@@ -271,6 +416,55 @@ export const PHI_APP_FORM_HANDLER_PROVIDER_DESCRIPTORS = [
271
416
  requiresCsrf: true,
272
417
  credentialPolicy: "site-session",
273
418
  },
419
+ {
420
+ key: createPhiSharedFormProviderKey("handler", "app-profile-phone"),
421
+ ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
422
+ title: "Profile telephone numbers",
423
+ phase: "submit",
424
+ handlerKey: PHI_APP_FORM_HANDLER_KEYS.profilePhone,
425
+ category: "site",
426
+ transport: "relay",
427
+ method: "PATCH",
428
+ endpointKey: null,
429
+ upstreamPath: "/api/v1/auth/profile/phone",
430
+ csrfPath: "/api/v1/auth/csrf",
431
+ requiresCsrf: true,
432
+ credentialPolicy: "site-session",
433
+ },
434
+ /*
435
+ * The address book's two writes. The Form's two values are Core's `{ address, flags }`; a change names
436
+ * the version it replaces in its path, the hidden `id` as `{id}`.
437
+ */
438
+ {
439
+ key: createPhiSharedFormProviderKey("handler", "app-address-create"),
440
+ ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
441
+ title: "Add address",
442
+ phase: "submit",
443
+ handlerKey: PHI_APP_FORM_HANDLER_KEYS.addressCreate,
444
+ category: "site",
445
+ transport: "relay",
446
+ method: "POST",
447
+ endpointKey: null,
448
+ upstreamPath: "/api/site/account/addresses",
449
+ csrfPath: null,
450
+ requiresCsrf: false,
451
+ credentialPolicy: "site-session",
452
+ },
453
+ {
454
+ key: createPhiSharedFormProviderKey("handler", "app-address-edit"),
455
+ ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
456
+ title: "Change address",
457
+ phase: "submit",
458
+ handlerKey: PHI_APP_FORM_HANDLER_KEYS.addressEdit,
459
+ category: "site",
460
+ transport: "relay",
461
+ method: "PUT",
462
+ endpointKey: null,
463
+ upstreamPath: "/api/site/account/addresses/{id}",
464
+ csrfPath: null,
465
+ requiresCsrf: false,
466
+ credentialPolicy: "site-session",
467
+ },
274
468
  {
275
469
  key: createPhiSharedFormProviderKey("handler", "app-profile-newsletter"),
276
470
  ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
@@ -8,3 +8,10 @@ export declare const PHI_APP_RUNTIME_MODULE_ID: "@phis/ui/modules/app";
8
8
  export declare const PHI_APP_RUNTIME_MODULE_IDENTITY: {
9
9
  readonly moduleId: "@phis/ui/modules/app";
10
10
  };
11
+ /**
12
+ * The signed-in person's own addresses on this Site (phis-server `GET /api/site/account/addresses`,
13
+ * `users:v1`), as the account lists, adds, changes and removes them.
14
+ */
15
+ export declare const PHI_APP_ADDRESSES_DATA_PROVIDER_KEY: `${string}/${string}`;
16
+ /** The one resource the addresses Provider answers. */
17
+ export declare const PHI_APP_ADDRESSES_RESOURCE_KEY = "addresses";
@@ -1,4 +1,5 @@
1
1
  import { PHI_SHARED_PACKAGE_NAME } from "../../../types/signals";
2
+ import { createPhiSharedRuntimeDataProviderKey } from "../../../constants/runtime-data-provider-key";
2
3
  export const PHI_APP_RUNTIME_MODULE_ID = `${PHI_SHARED_PACKAGE_NAME}/modules/app`;
3
4
  /**
4
5
  * The Module's identity as its Label Sets inherit it (`definePhiRuntimeModuleLabelSet`): the id and,
@@ -9,3 +10,10 @@ export const PHI_APP_RUNTIME_MODULE_ID = `${PHI_SHARED_PACKAGE_NAME}/modules/app
9
10
  export const PHI_APP_RUNTIME_MODULE_IDENTITY = {
10
11
  moduleId: PHI_APP_RUNTIME_MODULE_ID,
11
12
  };
13
+ /**
14
+ * The signed-in person's own addresses on this Site (phis-server `GET /api/site/account/addresses`,
15
+ * `users:v1`), as the account lists, adds, changes and removes them.
16
+ */
17
+ export const PHI_APP_ADDRESSES_DATA_PROVIDER_KEY = createPhiSharedRuntimeDataProviderKey("tables", "app-addresses");
18
+ /** The one resource the addresses Provider answers. */
19
+ export const PHI_APP_ADDRESSES_RESOURCE_KEY = "addresses";
@@ -9,6 +9,95 @@ export declare const PHI_APP_RUNTIME_MODULE: {
9
9
  description: string;
10
10
  icon: string;
11
11
  serverBinding: import("../../../types").PhiRuntimeModuleServerBinding;
12
+ dataProviders: {
13
+ key: `${string}/${string}`;
14
+ ownerModuleId: "@phis/ui/modules/app";
15
+ kind: "table";
16
+ executionMode: "live";
17
+ authoringMode: "none";
18
+ title: string;
19
+ description: string;
20
+ resources: {
21
+ resourceKey: string;
22
+ title: string;
23
+ rowIdentityPath: string;
24
+ recordRead: true;
25
+ fields: ({
26
+ key: string;
27
+ title: string;
28
+ type: "number";
29
+ required: true;
30
+ options?: undefined;
31
+ } | {
32
+ key: string;
33
+ title: string;
34
+ type: "string";
35
+ required?: undefined;
36
+ options?: undefined;
37
+ } | {
38
+ key: string;
39
+ title: string;
40
+ type: "enum[]";
41
+ options: {
42
+ value: "billing" | "shipping" | "defaultBilling" | "defaultShipping";
43
+ label: "billing" | "shipping" | "defaultBilling" | "defaultShipping";
44
+ }[];
45
+ required?: undefined;
46
+ } | {
47
+ key: string;
48
+ title: string;
49
+ type: "boolean";
50
+ required?: undefined;
51
+ options?: undefined;
52
+ } | {
53
+ key: string;
54
+ title: string;
55
+ type: "datetime";
56
+ required?: undefined;
57
+ options?: undefined;
58
+ } | {
59
+ key: string;
60
+ title: string;
61
+ type: "json";
62
+ required?: undefined;
63
+ options?: undefined;
64
+ } | {
65
+ key: string;
66
+ title: string;
67
+ type: "number";
68
+ required?: undefined;
69
+ options?: undefined;
70
+ })[];
71
+ query: {
72
+ search: false;
73
+ filterFields: never[];
74
+ sorting: "none";
75
+ pagination: "none";
76
+ };
77
+ actions: ({
78
+ key: string;
79
+ title: string;
80
+ scope: "row";
81
+ intent: "write";
82
+ disabledWhen: {
83
+ match: "any";
84
+ conditions: {
85
+ source: "row";
86
+ valuePath: string;
87
+ operator: "truthy";
88
+ }[];
89
+ };
90
+ confirmation?: undefined;
91
+ } | {
92
+ key: string;
93
+ title: string;
94
+ scope: "row";
95
+ intent: "destructive";
96
+ confirmation: "required";
97
+ disabledWhen?: undefined;
98
+ })[];
99
+ }[];
100
+ }[];
12
101
  formProviders: {
13
102
  handlers: ({
14
103
  key: `${string}/${string}`;
@@ -24,6 +113,48 @@ export declare const PHI_APP_RUNTIME_MODULE: {
24
113
  csrfPath: string;
25
114
  requiresCsrf: true;
26
115
  credentialPolicy: "site-session";
116
+ } | {
117
+ key: `${string}/${string}`;
118
+ ownerModuleId: "@phis/ui/modules/app";
119
+ title: string;
120
+ phase: "submit";
121
+ handlerKey: "site.app.profile-phone";
122
+ category: "site";
123
+ transport: "relay";
124
+ method: "PATCH";
125
+ endpointKey: null;
126
+ upstreamPath: string;
127
+ csrfPath: string;
128
+ requiresCsrf: true;
129
+ credentialPolicy: "site-session";
130
+ } | {
131
+ key: `${string}/${string}`;
132
+ ownerModuleId: "@phis/ui/modules/app";
133
+ title: string;
134
+ phase: "submit";
135
+ handlerKey: "site.app.address-create";
136
+ category: "site";
137
+ transport: "relay";
138
+ method: "POST";
139
+ endpointKey: null;
140
+ upstreamPath: string;
141
+ csrfPath: null;
142
+ requiresCsrf: false;
143
+ credentialPolicy: "site-session";
144
+ } | {
145
+ key: `${string}/${string}`;
146
+ ownerModuleId: "@phis/ui/modules/app";
147
+ title: string;
148
+ phase: "submit";
149
+ handlerKey: "site.app.address-edit";
150
+ category: "site";
151
+ transport: "relay";
152
+ method: "PUT";
153
+ endpointKey: null;
154
+ upstreamPath: string;
155
+ csrfPath: null;
156
+ requiresCsrf: false;
157
+ credentialPolicy: "site-session";
27
158
  } | {
28
159
  key: `${string}/${string}`;
29
160
  ownerModuleId: "@phis/ui/modules/app";
@@ -9,12 +9,9 @@ export const PHI_APP_RUNTIME_MODULE_AREA_SHELLS = [
9
9
  shellPresetVersion: 1,
10
10
  area: "app",
11
11
  /*
12
- * The Site shell with a left sider added, rather than a shell of its own.
13
- *
14
- * App's header and footer are Public's -- one Brand, one account trigger, one description of both.
15
- * What App has that Public does not is somewhere for the Modules a signed-in person works with,
16
- * and that is the whole of the overlay. Nothing is omitted from the base, so the two trees cannot
17
- * disagree about a Region: composition refuses a Region type stated twice.
12
+ * The App variant of the Site shell, with the App's left sider added. The Site shell owns the
13
+ * header and footer and the overlay owns the sidebar. Composition refuses a Region type stated
14
+ * twice.
18
15
  */
19
16
  loadTree: async ({ page, runtime }) => {
20
17
  const [{ buildPhiDefaultSiteAreaPresetTree }, { buildPhiDefaultAppAreaPresetTree }, { mergePhiCmsShellTrees },] = await Promise.all([