@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
@@ -0,0 +1,135 @@
1
+ import { type PhiTableProviderMutationRequest, type PhiTableProviderQueryRequest, type PhiTableProviderRecordRequest } from "../../../../types/table-widget";
2
+ /** The account's own address book (phis-server `/api/site/account/addresses`). */
3
+ export declare const PHI_APP_ADDRESSES_PATH = "/api/site/account/addresses";
4
+ declare function queryAddresses({ resourceKey, signal }: PhiTableProviderQueryRequest): Promise<{
5
+ rows: {
6
+ createdAt: {} | null;
7
+ flags: number;
8
+ billing: boolean;
9
+ shipping: boolean;
10
+ defaultBilling: boolean;
11
+ defaultShipping: boolean;
12
+ address: {
13
+ [k: string]: string | null;
14
+ };
15
+ lines: string;
16
+ purposes: ("billing" | "shipping" | "defaultBilling" | "defaultShipping")[];
17
+ id: unknown;
18
+ }[];
19
+ total: number;
20
+ }>;
21
+ declare function readAddressRecord({ resourceKey, rowIdentity, signal }: PhiTableProviderRecordRequest): Promise<{
22
+ createdAt: {} | null;
23
+ flags: number;
24
+ billing: boolean;
25
+ shipping: boolean;
26
+ defaultBilling: boolean;
27
+ defaultShipping: boolean;
28
+ address: {
29
+ [k: string]: string | null;
30
+ };
31
+ lines: string;
32
+ purposes: ("billing" | "shipping" | "defaultBilling" | "defaultShipping")[];
33
+ id: unknown;
34
+ }>;
35
+ /** The request that gives a listed address the default it asks for, or throws where it has none listed. */
36
+ export declare function buildPhiAppAddressDefaultRequest(address: Record<string, unknown>, actionKey: "makeDefaultBilling" | "makeDefaultShipping"): {
37
+ address: {
38
+ [k: string]: {} | null;
39
+ };
40
+ flags: number;
41
+ };
42
+ declare function mutateAddresses(request: PhiTableProviderMutationRequest): Promise<{
43
+ status: "accepted";
44
+ invalidation: "view";
45
+ }>;
46
+ export declare const PHI_APP_ADDRESSES_TABLE_PROVIDER_REGISTRATION: {
47
+ key: `${string}/${string}`;
48
+ resources: {
49
+ resourceKey: string;
50
+ title: string;
51
+ rowIdentityPath: string;
52
+ recordRead: true;
53
+ fields: ({
54
+ key: string;
55
+ title: string;
56
+ type: "number";
57
+ required: true;
58
+ options?: undefined;
59
+ } | {
60
+ key: string;
61
+ title: string;
62
+ type: "string";
63
+ required?: undefined;
64
+ options?: undefined;
65
+ } | {
66
+ key: string;
67
+ title: string;
68
+ type: "enum[]";
69
+ options: {
70
+ value: "billing" | "shipping" | "defaultBilling" | "defaultShipping";
71
+ label: "billing" | "shipping" | "defaultBilling" | "defaultShipping";
72
+ }[];
73
+ required?: undefined;
74
+ } | {
75
+ key: string;
76
+ title: string;
77
+ type: "boolean";
78
+ required?: undefined;
79
+ options?: undefined;
80
+ } | {
81
+ key: string;
82
+ title: string;
83
+ type: "datetime";
84
+ required?: undefined;
85
+ options?: undefined;
86
+ } | {
87
+ key: string;
88
+ title: string;
89
+ type: "json";
90
+ required?: undefined;
91
+ options?: undefined;
92
+ } | {
93
+ key: string;
94
+ title: string;
95
+ type: "number";
96
+ required?: undefined;
97
+ options?: undefined;
98
+ })[];
99
+ query: {
100
+ search: false;
101
+ filterFields: never[];
102
+ sorting: "none";
103
+ pagination: "none";
104
+ };
105
+ actions: ({
106
+ key: string;
107
+ title: string;
108
+ scope: "row";
109
+ intent: "write";
110
+ disabledWhen: {
111
+ match: "any";
112
+ conditions: {
113
+ source: "row";
114
+ valuePath: string;
115
+ operator: "truthy";
116
+ }[];
117
+ };
118
+ confirmation?: undefined;
119
+ } | {
120
+ key: string;
121
+ title: string;
122
+ scope: "row";
123
+ intent: "destructive";
124
+ confirmation: "required";
125
+ disabledWhen?: undefined;
126
+ })[];
127
+ }[];
128
+ query: typeof queryAddresses;
129
+ readRecord: typeof readAddressRecord;
130
+ mutate: typeof mutateAddresses;
131
+ };
132
+ export declare const PhiAppAddressesTableProviderClient: import("react").ComponentType<{
133
+ children: import("react").ReactNode;
134
+ }>;
135
+ export {};
@@ -0,0 +1,101 @@
1
+ "use client";
2
+ import { PhisSiteAddressFlags } from "@phis/contracts/users";
3
+ import { isPhiRecord } from "../../../../helpers/is-record";
4
+ import { createPhiTableProviderRequestInit, readPhiPositiveInteger, readPhiTableRows, } from "../../../../components/widgets/client/shared/phi-table-provider-request";
5
+ import { readPhiTableProviderResponse, } from "../../../../components/widgets/client/shared/phi-table-provider-response";
6
+ import { createPhiTableProviderClient, } from "../../../../components/widgets/client/shared/phi-table-provider";
7
+ import { PhiTableProviderError, } from "../../../../types/table-widget";
8
+ import { PHI_APP_RUNTIME_DATA_PROVIDER_DESCRIPTORS } from "../data-providers";
9
+ import { PHI_APP_ADDRESSES_DATA_PROVIDER_KEY, PHI_APP_ADDRESSES_RESOURCE_KEY } from "../ids";
10
+ import { PHI_SITE_ADDRESS_TEXT_KEYS, toPhiSiteAddressRow } from "../../../../helpers/site-address-row";
11
+ /** The account's own address book (phis-server `/api/site/account/addresses`). */
12
+ export const PHI_APP_ADDRESSES_PATH = "/api/site/account/addresses";
13
+ const RESPONSE_OPTIONS = { subject: "Addresses" };
14
+ /*
15
+ * The addresses as the last list answered them, which a default is set from: Core takes an address equal in
16
+ * every part to a current one as that one, given the purposes and defaults asked besides, so setting a
17
+ * default sends the address again rather than writing a new version of it.
18
+ */
19
+ const listed = new Map();
20
+ function requireResource(resourceKey) {
21
+ if (resourceKey !== PHI_APP_ADDRESSES_RESOURCE_KEY) {
22
+ throw new PhiTableProviderError("resource-not-found", `Unknown addresses resource "${resourceKey}".`);
23
+ }
24
+ }
25
+ async function readAddresses(signal) {
26
+ const result = await readPhiTableProviderResponse(await fetch(PHI_APP_ADDRESSES_PATH, createPhiTableProviderRequestInit(signal)), RESPONSE_OPTIONS);
27
+ const items = readPhiTableRows(result?.items);
28
+ listed.clear();
29
+ for (const item of items) {
30
+ const id = readPhiPositiveInteger(item.id);
31
+ if (id)
32
+ listed.set(id, item);
33
+ }
34
+ return items;
35
+ }
36
+ async function queryAddresses({ resourceKey, signal }) {
37
+ requireResource(resourceKey);
38
+ const rows = (await readAddresses(signal)).map(toPhiSiteAddressRow);
39
+ return { rows, total: rows.length };
40
+ }
41
+ async function readAddressRecord({ resourceKey, rowIdentity, signal }) {
42
+ requireResource(resourceKey);
43
+ const id = readPhiPositiveInteger(rowIdentity);
44
+ const address = (await readAddresses(signal)).find((item) => item.id === id);
45
+ if (!id || !address) {
46
+ throw new PhiTableProviderError("record-not-found", "This address is no longer one of yours.");
47
+ }
48
+ return toPhiSiteAddressRow(address);
49
+ }
50
+ /** The request that gives a listed address the default it asks for, or throws where it has none listed. */
51
+ export function buildPhiAppAddressDefaultRequest(address, actionKey) {
52
+ const flags = typeof address.flags === "number" ? address.flags : 0;
53
+ const added = actionKey === "makeDefaultBilling"
54
+ ? PhisSiteAddressFlags.Billing | PhisSiteAddressFlags.DefaultBilling
55
+ : PhisSiteAddressFlags.Shipping | PhisSiteAddressFlags.DefaultShipping;
56
+ const writable = PhisSiteAddressFlags.Billing | PhisSiteAddressFlags.Shipping |
57
+ PhisSiteAddressFlags.DefaultBilling | PhisSiteAddressFlags.DefaultShipping;
58
+ return {
59
+ address: Object.fromEntries(PHI_SITE_ADDRESS_TEXT_KEYS.map((key) => [key, address[key] ?? null])),
60
+ flags: (flags & writable) | added,
61
+ };
62
+ }
63
+ async function mutateAddresses(request) {
64
+ requireResource(request.resourceKey);
65
+ if (request.kind !== "action") {
66
+ throw new PhiTableProviderError("mutation-not-supported", "Addresses are changed through their dialog, never in a cell.");
67
+ }
68
+ const id = readPhiPositiveInteger(request.rowIdentity);
69
+ if (!id)
70
+ throw new PhiTableProviderError("invalid-query", "An address id is required.");
71
+ const init = createPhiTableProviderRequestInit(request.signal);
72
+ if (request.actionKey === "delete") {
73
+ await readPhiTableProviderResponse(await fetch(`${PHI_APP_ADDRESSES_PATH}/${id}`, { ...init, method: "DELETE" }), RESPONSE_OPTIONS);
74
+ }
75
+ else if (request.actionKey === "makeDefaultBilling" || request.actionKey === "makeDefaultShipping") {
76
+ const address = listed.get(id);
77
+ if (!isPhiRecord(address))
78
+ throw new PhiTableProviderError("record-not-found", "This address is no longer listed.");
79
+ await readPhiTableProviderResponse(await fetch(PHI_APP_ADDRESSES_PATH, {
80
+ ...init,
81
+ method: "POST",
82
+ headers: { ...init.headers, "content-type": "application/json" },
83
+ body: JSON.stringify(buildPhiAppAddressDefaultRequest(address, request.actionKey)),
84
+ }), RESPONSE_OPTIONS);
85
+ }
86
+ else {
87
+ throw new PhiTableProviderError("action-not-supported", `Unsupported addresses action "${request.actionKey}".`);
88
+ }
89
+ // A default moves from the address that held it, and a removal takes a row: the view is read again.
90
+ return { status: "accepted", invalidation: "view" };
91
+ }
92
+ const resources = PHI_APP_RUNTIME_DATA_PROVIDER_DESCRIPTORS
93
+ .find((descriptor) => descriptor.key === PHI_APP_ADDRESSES_DATA_PROVIDER_KEY)?.resources ?? [];
94
+ export const PHI_APP_ADDRESSES_TABLE_PROVIDER_REGISTRATION = {
95
+ key: PHI_APP_ADDRESSES_DATA_PROVIDER_KEY,
96
+ resources,
97
+ query: queryAddresses,
98
+ readRecord: readAddressRecord,
99
+ mutate: mutateAddresses,
100
+ };
101
+ export const PhiAppAddressesTableProviderClient = createPhiTableProviderClient(PHI_APP_ADDRESSES_TABLE_PROVIDER_REGISTRATION);
@@ -0,0 +1,17 @@
1
+ import type { PhiSettingsPageShellOverlay, PhiSettingsPageShellPanel } from "../../../../components/regions/presets/phi-settings-page-shell-tree";
2
+ import type { getPhiAppAddressesLabels } from "./addresses-label-set";
3
+ type Labels = Awaited<ReturnType<typeof getPhiAppAddressesLabels>>;
4
+ /**
5
+ * The account's addresses on the Profile page: one panel holding the Table, and the two dialogs it opens.
6
+ *
7
+ * Arranged as the Admin's provider installations are (the Settings shell's overlays): `+` in the Table's
8
+ * toolbar opens the add dialog, the row's pencil the change dialog, whose Form reads the row it was opened
9
+ * on; either Form's success reads the Table again. Removing and the two defaults are the Table's own
10
+ * Provider acts. An address is a row of a list somebody keeps, not a part of the page, so a panel per
11
+ * Form would describe things nobody is looking at.
12
+ */
13
+ export declare function buildPhiAccountAddressesPanel(labels: Labels, presetKey: string): {
14
+ panel: PhiSettingsPageShellPanel;
15
+ overlays: PhiSettingsPageShellOverlay[];
16
+ };
17
+ export {};
@@ -0,0 +1,179 @@
1
+ import { PHI_APP_ADDRESSES_DATA_PROVIDER_KEY, PHI_APP_ADDRESSES_RESOURCE_KEY, PHI_APP_RUNTIME_MODULE_ID } from "../ids";
2
+ import { PHI_APP_FORM_IDS } from "../forms";
3
+ import { createPhiPresetCmsInstanceIdMap } from "../../../../types/cms-instance-id";
4
+ import { PHI_SIGNAL_VALUE_SCHEMAS, createPhiSignalAddress } from "../../../../types/signals";
5
+ import { PHI_DIALOG_WIDTH_SINGLE_COLUMN } from "../../../../helpers/cms-dialog";
6
+ /**
7
+ * The account's addresses on the Profile page: one panel holding the Table, and the two dialogs it opens.
8
+ *
9
+ * Arranged as the Admin's provider installations are (the Settings shell's overlays): `+` in the Table's
10
+ * toolbar opens the add dialog, the row's pencil the change dialog, whose Form reads the row it was opened
11
+ * on; either Form's success reads the Table again. Removing and the two defaults are the Table's own
12
+ * Provider acts. An address is a row of a list somebody keeps, not a part of the page, so a panel per
13
+ * Form would describe things nobody is looking at.
14
+ */
15
+ export function buildPhiAccountAddressesPanel(labels, presetKey) {
16
+ // The shell derives the instance ids from the node keys; the same derivation gives the addresses here.
17
+ const ids = createPhiPresetCmsInstanceIdMap({ domain: "page", ownerModuleId: PHI_APP_RUNTIME_MODULE_ID, presetKey }, ["widgetAddresses", "overlayAddressCreate", "overlayAddressEdit", "overlayAddressEditForm"]);
18
+ const tableAddress = createPhiSignalAddress("cms", ids.widgetAddresses);
19
+ const editFormAddress = createPhiSignalAddress("cms", ids.overlayAddressEditForm);
20
+ const source = { providerKey: PHI_APP_ADDRESSES_DATA_PROVIDER_KEY, resourceKey: PHI_APP_ADDRESSES_RESOURCE_KEY };
21
+ const actionTo = (routeKey, receiver) => ({
22
+ routeKey,
23
+ capabilityId: "actionActivate",
24
+ scope: "page",
25
+ channel: "action",
26
+ action: "activate",
27
+ valueType: "json",
28
+ valueSchema: PHI_SIGNAL_VALUE_SCHEMAS.tableAction,
29
+ receiver,
30
+ });
31
+ // The Table's reload takes no value, and a listener matches on the value type too.
32
+ const reloadTable = (routeKey) => ({
33
+ routeKey,
34
+ capabilityId: "submitSuccess",
35
+ scope: "page",
36
+ channel: "reload",
37
+ action: "activate",
38
+ valueType: "none",
39
+ receiver: tableAddress,
40
+ });
41
+ return {
42
+ panel: {
43
+ nodeKey: "panelAddresses",
44
+ title: labels.panel.title,
45
+ description: labels.panel.description,
46
+ sections: [{
47
+ nodeKey: "widgetAddresses",
48
+ typeKey: "table",
49
+ label: labels.tableLabel,
50
+ config: {
51
+ source,
52
+ presentation: {
53
+ controlSize: "small",
54
+ layout: { mode: "auto", overflowX: "auto" },
55
+ columns: [
56
+ { key: "name", fieldKey: "name", title: labels.columns.name, sizing: { mode: "content" } },
57
+ { key: "lines", fieldKey: "lines", title: labels.columns.address, sizing: { mode: "fill" } },
58
+ {
59
+ key: "purposes",
60
+ fieldKey: "purposes",
61
+ title: labels.columns.purposes,
62
+ renderer: "tags",
63
+ sizing: { mode: "content" },
64
+ valueMap: labels.purposes,
65
+ tagColorMap: { billing: "default", shipping: "default", defaultBilling: "processing", defaultShipping: "processing" },
66
+ },
67
+ ],
68
+ emptyState: { title: labels.empty.title, description: labels.empty.text },
69
+ },
70
+ features: {
71
+ pagination: { enabled: false },
72
+ sorting: { mode: "none" },
73
+ tools: { mode: "self-contained", reset: false, reload: false },
74
+ actions: {
75
+ rowLayout: "compact",
76
+ toolbar: [{
77
+ key: "create",
78
+ label: labels.actions.add,
79
+ icon: "plus",
80
+ display: "icon",
81
+ mode: "primary",
82
+ execution: "signal",
83
+ }],
84
+ row: [
85
+ { key: "edit", label: labels.actions.edit, icon: "edit", display: "icon", execution: "signal" },
86
+ {
87
+ key: "makeDefaultBilling",
88
+ label: labels.actions.defaultBilling,
89
+ icon: "antd:file-text",
90
+ display: "icon",
91
+ execution: "provider",
92
+ },
93
+ {
94
+ key: "makeDefaultShipping",
95
+ label: labels.actions.defaultShipping,
96
+ icon: "antd:shopping",
97
+ display: "icon",
98
+ execution: "provider",
99
+ },
100
+ {
101
+ key: "delete",
102
+ label: labels.actions.remove,
103
+ icon: "antd:delete",
104
+ display: "icon",
105
+ mode: "danger",
106
+ execution: "provider",
107
+ confirm: {
108
+ title: labels.remove.title,
109
+ description: labels.remove.text,
110
+ okText: labels.remove.ok,
111
+ cancelText: labels.cancel,
112
+ },
113
+ },
114
+ ],
115
+ },
116
+ },
117
+ signalRoutes: {
118
+ // One announcement, three listeners; each decides by the action key whether it was meant.
119
+ emits: [
120
+ actionTo("app-addresses-action-edit-form", editFormAddress),
121
+ actionTo("app-addresses-action-create-dialog", createPhiSignalAddress("cms", ids.overlayAddressCreate)),
122
+ actionTo("app-addresses-action-edit-dialog", createPhiSignalAddress("cms", ids.overlayAddressEdit)),
123
+ ],
124
+ listens: [{
125
+ routeKey: "app-addresses-reload",
126
+ capabilityId: "reload",
127
+ scope: "page",
128
+ channel: "reload",
129
+ action: "activate",
130
+ valueType: "none",
131
+ receiver: tableAddress,
132
+ }],
133
+ },
134
+ },
135
+ }],
136
+ },
137
+ overlays: [
138
+ {
139
+ nodeKey: "overlayAddressCreate",
140
+ title: labels.addTitle,
141
+ openActionKey: "create",
142
+ formId: PHI_APP_FORM_IDS.addressCreate,
143
+ size: { width: PHI_DIALOG_WIDTH_SINGLE_COLUMN },
144
+ label: labels.addTitle,
145
+ submitLabel: labels.save,
146
+ cancelLabel: labels.cancel,
147
+ configOverrides: { signalRoutes: { emits: [reloadTable("app-address-create-success")] } },
148
+ },
149
+ {
150
+ nodeKey: "overlayAddressEdit",
151
+ title: labels.editTitle,
152
+ openActionKey: "edit",
153
+ formId: PHI_APP_FORM_IDS.addressEdit,
154
+ size: { width: PHI_DIALOG_WIDTH_SINGLE_COLUMN },
155
+ label: labels.editTitle,
156
+ submitLabel: labels.save,
157
+ cancelLabel: labels.cancel,
158
+ configOverrides: {
159
+ // The Form reads the row the same action opened the dialog with; both filter on this key.
160
+ source,
161
+ openActionKey: "edit",
162
+ signalRoutes: {
163
+ emits: [reloadTable("app-address-edit-success")],
164
+ listens: [{
165
+ routeKey: "app-address-edit-open",
166
+ capabilityId: "recordOpen",
167
+ scope: "page",
168
+ channel: "action",
169
+ action: "activate",
170
+ valueType: "json",
171
+ valueSchema: PHI_SIGNAL_VALUE_SCHEMAS.tableAction,
172
+ receiver: editFormAddress,
173
+ }],
174
+ },
175
+ },
176
+ },
177
+ ],
178
+ };
179
+ }
@@ -0,0 +1,62 @@
1
+ import "server-only";
2
+ import { type PhiGlobalTranslatorOptions } from "../../../../gateway/tr";
3
+ export declare function getPhiAppAddressesLabels(options: PhiGlobalTranslatorOptions): Promise<{
4
+ panel: {
5
+ title: string;
6
+ description: string;
7
+ };
8
+ tableLabel: string;
9
+ columns: {
10
+ name: string;
11
+ address: string;
12
+ purposes: string;
13
+ };
14
+ purposes: {
15
+ billing: string;
16
+ shipping: string;
17
+ defaultBilling: string;
18
+ defaultShipping: string;
19
+ };
20
+ empty: {
21
+ title: string;
22
+ text: string;
23
+ };
24
+ actions: {
25
+ add: string;
26
+ edit: string;
27
+ defaultBilling: string;
28
+ defaultShipping: string;
29
+ remove: string;
30
+ };
31
+ remove: {
32
+ title: string;
33
+ text: string;
34
+ ok: string;
35
+ };
36
+ cancel: string;
37
+ save: string;
38
+ addTitle: string;
39
+ editTitle: string;
40
+ form: {
41
+ addressName: string;
42
+ addressNameRequired: string;
43
+ addressCompanyName: string;
44
+ addressLine1: string;
45
+ addressLine1Required: string;
46
+ addressLine2: string;
47
+ addressPostalCode: string;
48
+ addressCity: string;
49
+ addressCityRequired: string;
50
+ addressRegion: string;
51
+ addressCountry: string;
52
+ addressCountryRequired: string;
53
+ addressTooLong: string;
54
+ purposes: string;
55
+ billing: string;
56
+ shipping: string;
57
+ defaultBilling: string;
58
+ defaultShipping: string;
59
+ successTitle: string;
60
+ successText: string;
61
+ };
62
+ }>;
@@ -0,0 +1,108 @@
1
+ import "server-only";
2
+ import { PHI_TR_CTX_WEB_UI_LABEL } from "../../../../gateway/tr";
3
+ import { definePhiMessageLabel, definePhiRuntimeModuleLabelSet, getPhiLabelSet } from "../../../../gateway/label-set";
4
+ import { PHI_APP_RUNTIME_MODULE_IDENTITY } from "../ids";
5
+ /**
6
+ * What the account's addresses say: the panel, the Table's columns and acts, and the two dialogs that add
7
+ * an address and change one. One set for all of it, because the Forms and the Table name the same parts.
8
+ */
9
+ const PHI_APP_ADDRESSES_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_APP_RUNTIME_MODULE_IDENTITY, {
10
+ key: "preset:account-addresses",
11
+ ctx: PHI_TR_CTX_WEB_UI_LABEL,
12
+ labels: {
13
+ panel_title: "Addresses",
14
+ panel_description: definePhiMessageLabel("Where invoices are made out to and orders are sent on this site."),
15
+ table_label: "addresses",
16
+ column_name: "Name",
17
+ column_address: "Address",
18
+ column_purposes: "Used for",
19
+ purpose_billing: "Billing",
20
+ purpose_shipping: "Shipping",
21
+ purpose_default_billing: "Default billing",
22
+ purpose_default_shipping: "Default shipping",
23
+ empty_title: definePhiMessageLabel("No address yet."),
24
+ empty_text: definePhiMessageLabel("Add one for invoices or deliveries; it is kept for this site only."),
25
+ action_add: "Add address",
26
+ action_edit: "Change",
27
+ action_default_billing: "Use for billing by default",
28
+ action_default_shipping: "Use for shipping by default",
29
+ action_remove: "Remove",
30
+ remove_title: "Remove this address?",
31
+ remove_text: definePhiMessageLabel("It is gone from your account. An order or invoice made out to it keeps it."),
32
+ confirm_ok: "Remove",
33
+ cancel: "Cancel",
34
+ save: "Save",
35
+ add_title: "Add address",
36
+ edit_title: "Change address",
37
+ field_name: "Name",
38
+ field_name_required: "Enter the name the address is made out to.",
39
+ field_company: "Company",
40
+ field_line1: "Street and number",
41
+ field_line1_required: "Enter the street and number.",
42
+ field_line2: "Address line 2",
43
+ field_postal_code: "Postal code",
44
+ field_city: "City",
45
+ field_city_required: "Enter the city.",
46
+ field_region: "Region",
47
+ field_country: "Country",
48
+ field_country_required: "Choose the country.",
49
+ field_too_long: definePhiMessageLabel("%1 takes at most %2 characters."),
50
+ field_purposes: "Used for",
51
+ field_billing: "Billing address",
52
+ field_shipping: "Shipping address",
53
+ field_default_billing: "Default for billing",
54
+ field_default_shipping: "Default for shipping",
55
+ success_title: "Address saved",
56
+ success_text: definePhiMessageLabel("Your address has been saved."),
57
+ },
58
+ });
59
+ export async function getPhiAppAddressesLabels(options) {
60
+ const labels = await getPhiLabelSet(options, PHI_APP_ADDRESSES_LABEL_SET);
61
+ return {
62
+ panel: { title: labels.panel_title, description: labels.panel_description },
63
+ tableLabel: labels.table_label,
64
+ columns: { name: labels.column_name, address: labels.column_address, purposes: labels.column_purposes },
65
+ purposes: {
66
+ billing: labels.purpose_billing,
67
+ shipping: labels.purpose_shipping,
68
+ defaultBilling: labels.purpose_default_billing,
69
+ defaultShipping: labels.purpose_default_shipping,
70
+ },
71
+ empty: { title: labels.empty_title, text: labels.empty_text },
72
+ actions: {
73
+ add: labels.action_add,
74
+ edit: labels.action_edit,
75
+ defaultBilling: labels.action_default_billing,
76
+ defaultShipping: labels.action_default_shipping,
77
+ remove: labels.action_remove,
78
+ },
79
+ remove: { title: labels.remove_title, text: labels.remove_text, ok: labels.confirm_ok },
80
+ cancel: labels.cancel,
81
+ save: labels.save,
82
+ addTitle: labels.add_title,
83
+ editTitle: labels.edit_title,
84
+ // The address field's words under its own keys (PHI_FORM_ADDRESS_LABEL_KEYS), the purposes' beside them.
85
+ form: {
86
+ addressName: labels.field_name,
87
+ addressNameRequired: labels.field_name_required,
88
+ addressCompanyName: labels.field_company,
89
+ addressLine1: labels.field_line1,
90
+ addressLine1Required: labels.field_line1_required,
91
+ addressLine2: labels.field_line2,
92
+ addressPostalCode: labels.field_postal_code,
93
+ addressCity: labels.field_city,
94
+ addressCityRequired: labels.field_city_required,
95
+ addressRegion: labels.field_region,
96
+ addressCountry: labels.field_country,
97
+ addressCountryRequired: labels.field_country_required,
98
+ addressTooLong: labels.field_too_long,
99
+ purposes: labels.field_purposes,
100
+ billing: labels.field_billing,
101
+ shipping: labels.field_shipping,
102
+ defaultBilling: labels.field_default_billing,
103
+ defaultShipping: labels.field_default_shipping,
104
+ successTitle: labels.success_title,
105
+ successText: labels.success_text,
106
+ },
107
+ };
108
+ }
@@ -3,15 +3,12 @@ import type { PhiBlockRuntime } from "../../../../types";
3
3
  /**
4
4
  * The App's own left sider, laid over the Site shell rather than replacing it.
5
5
  *
6
- * App shares its header and its footer with Public -- the same Brand, the same account trigger -- and
7
- * the one thing it does not share is a place for the Modules a signed-in person works with. This adds
8
- * that place and nothing else, so the Site shell stays the single description of everything above and
9
- * below it.
6
+ * The Site shell builds the App's header and footer. This overlay gives the signed-in person's
7
+ * Modules a place in the App's own sidebar.
10
8
  *
11
9
  * The sider is where the Area's navigation belongs, and the reason is in SETTINGS.md section 3: a
12
10
  * shell Region outlives a move between Pages, while a Page-owned one is built again for each of them.
13
- * Navigation placed in the latter rebuilds itself under the hand that just used it. The search box
14
- * stands above it for the same reason (SEARCH.md): a member searches from wherever they are.
11
+ * Navigation placed in the latter rebuilds itself under the hand that just used it.
15
12
  */
16
13
  export declare function buildPhiDefaultAppAreaPresetTree({ page, runtime, }: {
17
14
  page: PhiCmsPageNode;
@@ -14,19 +14,16 @@ const SYNTHETIC_APP_WIDGET_IDS = createPhiPresetCmsInstanceIdMap({
14
14
  domain: "area",
15
15
  ownerModuleId: PHI_APP_RUNTIME_MODULE_ID,
16
16
  presetKey: "app-area-preset",
17
- }, ["widgetSiderLeftNav", "widgetSiderLeftSearch"]);
17
+ }, ["widgetSiderLeftNav"]);
18
18
  /**
19
19
  * The App's own left sider, laid over the Site shell rather than replacing it.
20
20
  *
21
- * App shares its header and its footer with Public -- the same Brand, the same account trigger -- and
22
- * the one thing it does not share is a place for the Modules a signed-in person works with. This adds
23
- * that place and nothing else, so the Site shell stays the single description of everything above and
24
- * below it.
21
+ * The Site shell builds the App's header and footer. This overlay gives the signed-in person's
22
+ * Modules a place in the App's own sidebar.
25
23
  *
26
24
  * The sider is where the Area's navigation belongs, and the reason is in SETTINGS.md section 3: a
27
25
  * shell Region outlives a move between Pages, while a Page-owned one is built again for each of them.
28
- * Navigation placed in the latter rebuilds itself under the hand that just used it. The search box
29
- * stands above it for the same reason (SEARCH.md): a member searches from wherever they are.
26
+ * Navigation placed in the latter rebuilds itself under the hand that just used it.
30
27
  */
31
28
  export async function buildPhiDefaultAppAreaPresetTree({ page, runtime, }) {
32
29
  const nodes = createPhiCmsPresetNodes(page);