@phis/ui 0.7.8 → 0.8.1

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 (462) hide show
  1. package/components/cms/phi-cms-layout-renderer.js +15 -7
  2. package/components/cms/phi-cms-render-diagnostic-client.d.ts +3 -1
  3. package/components/cms/phi-cms-render-diagnostic-client.js +4 -3
  4. package/components/cms/phi-cms-render-diagnostic.d.ts +8 -2
  5. package/components/cms/phi-cms-render-diagnostic.js +12 -2
  6. package/components/cms/phi-cms-render-error-boundary.d.ts +2 -0
  7. package/components/cms/phi-cms-render-error-boundary.js +1 -1
  8. package/components/cms/phi-cms-root-layout.js +3 -1
  9. package/components/controls/phi-address-control.d.ts +23 -0
  10. package/components/controls/phi-address-control.js +43 -0
  11. package/components/controls/phi-color-control.d.ts +3 -1
  12. package/components/controls/phi-color-control.js +2 -2
  13. package/components/controls/phi-country-select-control.d.ts +22 -0
  14. package/components/controls/phi-country-select-control.js +16 -0
  15. package/components/controls/phi-dialog-control.d.ts +1 -1
  16. package/components/controls/phi-drawer-control-adapter.d.ts +1 -1
  17. package/components/controls/phi-drawer-control-adapter.js +5 -3
  18. package/components/controls/phi-drawer-control.d.ts +7 -5
  19. package/components/controls/phi-float-button-control.d.ts +8 -1
  20. package/components/controls/phi-float-button-control.js +19 -3
  21. package/components/controls/phi-form-control.js +52 -8
  22. package/components/controls/phi-media-picker-control.d.ts +9 -0
  23. package/components/controls/phi-media-picker-control.js +1 -1
  24. package/components/controls/phi-modal-control-adapter.d.ts +1 -1
  25. package/components/controls/phi-modal-control-adapter.js +14 -37
  26. package/components/controls/phi-modal-control.d.ts +5 -5
  27. package/components/controls/phi-options-provider.d.ts +1 -0
  28. package/components/controls/phi-options-provider.js +1 -0
  29. package/components/controls/phi-overlay-control-contract.d.ts +52 -17
  30. package/components/controls/phi-overlay-control-contract.js +55 -30
  31. package/components/controls/phi-popover-control.js +4 -1
  32. package/components/controls/phi-reveal-once-dialog-control.d.ts +21 -0
  33. package/components/controls/phi-reveal-once-dialog-control.js +52 -0
  34. package/components/controls/phi-reveal-once-dialog-labels.d.ts +10 -0
  35. package/components/controls/phi-reveal-once-dialog-labels.js +5 -0
  36. package/components/controls/phi-table-control.d.ts +7 -1
  37. package/components/controls/phi-table-control.js +23 -8
  38. package/components/forms/flags-field.d.ts +22 -0
  39. package/components/forms/flags-field.js +58 -0
  40. package/components/forms/form-descriptor-field-check.d.ts +18 -0
  41. package/components/forms/form-descriptor-field-check.js +41 -0
  42. package/components/forms/form-descriptor-runtime-client.js +11 -10
  43. package/components/forms/form-option-flags.d.ts +20 -0
  44. package/components/forms/form-option-flags.js +38 -0
  45. package/components/forms/form-provider-contract.d.ts +23 -0
  46. package/components/forms/form-provider-contract.js +36 -0
  47. package/components/forms/form-provider-registry.d.ts +5 -1
  48. package/components/forms/form-record-source.d.ts +38 -0
  49. package/components/forms/form-record-source.js +48 -0
  50. package/components/forms/shared-form-descriptors.d.ts +0 -34
  51. package/components/forms/shared-form-descriptors.js +0 -6
  52. package/components/forms/shared-form-ids.d.ts +1 -1
  53. package/components/forms/shared-form-ids.js +1 -1
  54. package/components/forms/shared-form-provider-registry.js +13 -0
  55. package/components/forms/structured-field-labels.d.ts +24 -0
  56. package/components/forms/structured-field-labels.js +43 -0
  57. package/components/forms/structured-form-field-controls.d.ts +12 -0
  58. package/components/forms/structured-form-field-controls.js +65 -0
  59. package/components/media/media-settings-labels.d.ts +1 -0
  60. package/components/media/media-settings-labels.js +2 -0
  61. package/components/media/phi-media-picker-binding.d.ts +41 -33
  62. package/components/media/phi-media-picker-binding.js +2 -1
  63. package/components/media/use-media-library-add-picker.d.ts +33 -32
  64. package/components/overlays/phi-overlay-container-client.js +13 -11
  65. package/components/regions/phi-cms-region-shell.js +2 -2
  66. package/components/regions/presets/content-entry-editor-page-tree.js +12 -3
  67. package/components/regions/presets/phi-settings-page-shell-tree.d.ts +13 -2
  68. package/components/regions/presets/phi-settings-page-shell-tree.js +4 -4
  69. package/components/root/phi-root-theme-resolver.js +3 -0
  70. package/components/shell/phi-antd-icon.d.ts +1 -8
  71. package/components/shell/phi-antd-icon.js +1 -227
  72. package/components/shell/phi-icon-names.d.ts +22 -0
  73. package/components/shell/phi-icon-names.js +267 -0
  74. package/components/shell/phi-icon.d.ts +4 -15
  75. package/components/shell/phi-icon.js +9 -50
  76. package/components/tables/client/phi-table-binding-params.d.ts +24 -0
  77. package/components/tables/client/phi-table-binding-params.js +39 -0
  78. package/components/tables/client/phi-table-binding.d.ts +1 -3
  79. package/components/tables/client/phi-table-binding.js +5 -9
  80. package/components/widgets/client/shared/phi-button-icons.d.ts +6 -4
  81. package/components/widgets/client/shared/phi-button-icons.js +8 -12
  82. package/components/widgets/client/shared/phi-collection-binding-params.d.ts +8 -0
  83. package/components/widgets/client/shared/phi-collection-binding-params.js +13 -0
  84. package/components/widgets/client/shared/phi-collection-provider.d.ts +11 -1
  85. package/components/widgets/client/shared/phi-collection-provider.js +5 -0
  86. package/components/widgets/client/shared/phi-collection-view-binding.d.ts +1 -0
  87. package/components/widgets/client/shared/phi-command-buttons.d.ts +29 -2
  88. package/components/widgets/client/shared/phi-command-buttons.js +19 -5
  89. package/components/widgets/client/shared/phi-rendered-value.js +27 -3
  90. package/components/widgets/client/shared/phi-table-provider-refusal.d.ts +13 -0
  91. package/components/widgets/client/shared/phi-table-provider-refusal.js +13 -0
  92. package/components/widgets/config/background.d.ts +3 -2
  93. package/components/widgets/config/choice-shared.d.ts +10 -1
  94. package/components/widgets/config/choice-shared.js +8 -2
  95. package/components/widgets/label-sets/admin-locales.js +1 -1
  96. package/components/widgets/label-sets/admin-users.d.ts +3 -5
  97. package/components/widgets/label-sets/admin-users.js +6 -10
  98. package/components/widgets/label-sets/builder-modules.js +4 -0
  99. package/components/widgets/label-sets/effects.js +2 -4
  100. package/components/widgets/label-sets/profile.d.ts +13 -16
  101. package/components/widgets/label-sets/profile.js +24 -33
  102. package/components/widgets/label-sets/registration.d.ts +0 -1
  103. package/components/widgets/label-sets/registration.js +0 -2
  104. package/components/widgets/label-sets/revisions.js +2 -0
  105. package/components/widgets/label-sets/search-results.js +2 -4
  106. package/components/widgets/label-sets/signals.js +2 -0
  107. package/components/widgets/label-sets/table.js +9 -0
  108. package/components/widgets/label-types/builder-modules.d.ts +4 -0
  109. package/components/widgets/label-types/builder-modules.js +2 -0
  110. package/components/widgets/label-types/effects.d.ts +3 -2
  111. package/components/widgets/label-types/effects.js +1 -2
  112. package/components/widgets/label-types/revisions.d.ts +2 -0
  113. package/components/widgets/label-types/revisions.js +2 -1
  114. package/components/widgets/label-types/search-results.d.ts +2 -2
  115. package/components/widgets/label-types/search-results.js +1 -2
  116. package/components/widgets/label-types/signals.d.ts +2 -0
  117. package/components/widgets/label-types/signals.js +1 -0
  118. package/components/widgets/label-types/table.d.ts +3 -0
  119. package/components/widgets/label-types/table.js +2 -0
  120. package/components/widgets/server/builder-chrome.d.ts +4 -1
  121. package/components/widgets/server/builder-chrome.js +2 -2
  122. package/components/widgets/shared/markdown-body-client.d.ts +26 -0
  123. package/components/widgets/shared/markdown-body-client.js +31 -1
  124. package/components/widgets/shared/markdown-render.d.ts +10 -2
  125. package/components/widgets/shared/markdown-render.js +35 -13
  126. package/components/widgets/shared/widget-failure-audience.d.ts +7 -0
  127. package/components/widgets/shared/widget-failure-audience.js +21 -0
  128. package/components/widgets/shared/widget-failure-client.js +5 -2
  129. package/components/widgets/shared/widget-failure-notice-client.d.ts +6 -0
  130. package/components/widgets/shared/widget-failure-notice-client.js +10 -0
  131. package/components/widgets/shared/widget-failure-notice.d.ts +6 -0
  132. package/components/widgets/shared/widget-failure-notice.js +17 -0
  133. package/components/widgets/shared/widget-failure-staff.d.ts +3 -0
  134. package/components/widgets/shared/widget-failure-staff.js +18 -0
  135. package/components/widgets/shared/widget-failure.d.ts +9 -6
  136. package/components/widgets/shared/widget-failure.js +0 -9
  137. package/components/widgets/shared/widget-failure.server.d.ts +4 -2
  138. package/components/widgets/shared/widget-failure.server.js +8 -3
  139. package/constants/countries.d.ts +9 -0
  140. package/constants/countries.js +28 -0
  141. package/constants/customer-file.d.ts +34 -0
  142. package/constants/customer-file.js +35 -0
  143. package/constants/record-field-kinds.d.ts +15 -0
  144. package/constants/record-field-kinds.js +13 -0
  145. package/constants/runtime-module-ownership.js +15 -2
  146. package/constants/runtime-render-client-types.d.ts +5 -0
  147. package/constants/runtime-render-client-types.js +5 -0
  148. package/constants/site-address.d.ts +9 -0
  149. package/constants/site-address.js +10 -0
  150. package/constants/table-loading.d.ts +14 -0
  151. package/constants/table-loading.js +14 -0
  152. package/{plugins/runtime-modules/threads/controller/address.js → constants/threads-controller-address.js} +1 -1
  153. package/constants.d.ts +2 -0
  154. package/constants.js +4 -0
  155. package/gateway/form-handler-request.d.ts +22 -0
  156. package/gateway/form-handler-request.js +40 -0
  157. package/gateway/label-set.d.ts +15 -2
  158. package/gateway/label-set.js +60 -22
  159. package/gateway/site-cms-write-validation.js +19 -3
  160. package/gateway/site-form-route.js +11 -2
  161. package/helpers/address-field.d.ts +43 -0
  162. package/helpers/address-field.js +68 -0
  163. package/helpers/announced-action.d.ts +17 -0
  164. package/helpers/announced-action.js +29 -0
  165. package/helpers/cms-dialog.d.ts +5 -20
  166. package/helpers/cms-dialog.js +8 -13
  167. package/helpers/cms-page-catalog.d.ts +10 -0
  168. package/helpers/cms-page-catalog.js +19 -0
  169. package/helpers/cms-preset-nodes.d.ts +4 -4
  170. package/helpers/cms-preset-nodes.js +1 -1
  171. package/helpers/cms-region-keys.d.ts +1 -1
  172. package/helpers/country-names.d.ts +12 -0
  173. package/helpers/country-names.js +14 -0
  174. package/helpers/phi-metadata.d.ts +25 -1
  175. package/helpers/phi-metadata.js +53 -1
  176. package/helpers/phi-site-description.d.ts +11 -0
  177. package/helpers/phi-site-description.js +13 -0
  178. package/helpers/preset-form-check.d.ts +14 -0
  179. package/helpers/preset-form-check.js +12 -0
  180. package/helpers/preset-table-check.d.ts +38 -0
  181. package/helpers/preset-table-check.js +118 -0
  182. package/helpers/preset-text-source-check.d.ts +4 -1
  183. package/helpers/preset-text-source-check.js +6 -1
  184. package/helpers/preset-tree-contract-check.d.ts +3 -2
  185. package/helpers/preset-tree-contract-check.js +30 -5
  186. package/helpers/public-route-claims.d.ts +9 -1
  187. package/helpers/public-route-claims.js +23 -3
  188. package/helpers/record-fields.d.ts +1 -5
  189. package/helpers/record-fields.js +15 -6
  190. package/helpers/record-widget-binding.d.ts +10 -0
  191. package/helpers/record-widget-binding.js +35 -0
  192. package/helpers/record-widget.d.ts +1 -10
  193. package/helpers/record-widget.js +4 -33
  194. package/helpers/route-address-check.d.ts +22 -2
  195. package/helpers/route-address-check.js +29 -8
  196. package/helpers/site-address-row.d.ts +23 -0
  197. package/helpers/site-address-row.js +36 -0
  198. package/helpers/surface-style.d.ts +8 -1
  199. package/helpers/surface-style.js +12 -2
  200. package/helpers/table-widget-binding.d.ts +12 -0
  201. package/helpers/table-widget-binding.js +296 -0
  202. package/helpers/thread-inbox-row.d.ts +20 -0
  203. package/helpers/thread-inbox-row.js +26 -0
  204. package/helpers/translation-format.d.ts +26 -0
  205. package/helpers/translation-format.js +31 -0
  206. package/helpers/tree-widget-binding.d.ts +19 -0
  207. package/helpers/tree-widget-binding.js +72 -0
  208. package/helpers/typed-confirmation.d.ts +9 -0
  209. package/helpers/typed-confirmation.js +13 -0
  210. package/helpers/widget-binding-check.d.ts +22 -0
  211. package/helpers/widget-binding-check.js +91 -0
  212. package/module-labels.d.ts +1 -1
  213. package/module-labels.js +1 -1
  214. package/module-page-check.d.ts +3 -0
  215. package/module-page-check.js +3 -0
  216. package/module-records.d.ts +2 -2
  217. package/module-records.js +1 -0
  218. package/next/area-route.js +34 -1
  219. package/next/root-route.js +4 -4
  220. package/package.json +2 -2
  221. package/plugins/runtime-modules/accounting/customer-file-access.d.ts +11 -0
  222. package/plugins/runtime-modules/accounting/customer-file-access.js +12 -0
  223. package/plugins/runtime-modules/accounting/data-providers.js +1 -1
  224. package/plugins/runtime-modules/accounting/ids.d.ts +14 -0
  225. package/plugins/runtime-modules/accounting/ids.js +34 -0
  226. package/plugins/runtime-modules/accounting/presets.js +32 -5
  227. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.d.ts +78 -0
  228. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +136 -0
  229. package/plugins/runtime-modules/accounting/trees/accounting-products-label-set.js +2 -2
  230. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +29 -0
  231. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +450 -0
  232. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-products-page-tree.js +4 -0
  233. package/plugins/runtime-modules/app/client-data-providers.d.ts +7 -0
  234. package/plugins/runtime-modules/app/client-data-providers.js +9 -0
  235. package/plugins/runtime-modules/app/data-providers.d.ts +43 -0
  236. package/plugins/runtime-modules/app/data-providers.js +45 -0
  237. package/plugins/runtime-modules/app/definition.d.ts +60 -1
  238. package/plugins/runtime-modules/app/definition.js +2 -0
  239. package/plugins/runtime-modules/app/forms.d.ts +33 -3
  240. package/plugins/runtime-modules/app/forms.js +166 -31
  241. package/plugins/runtime-modules/app/ids.d.ts +8 -0
  242. package/plugins/runtime-modules/app/ids.js +9 -0
  243. package/plugins/runtime-modules/app/module.d.ts +60 -1
  244. package/plugins/runtime-modules/app/services/addresses-collection.d.ts +59 -0
  245. package/plugins/runtime-modules/app/services/addresses-collection.js +105 -0
  246. package/plugins/runtime-modules/app/trees/account-addresses-panel.d.ts +21 -0
  247. package/plugins/runtime-modules/app/trees/account-addresses-panel.js +143 -0
  248. package/plugins/runtime-modules/app/trees/addresses-label-set.d.ts +57 -0
  249. package/plugins/runtime-modules/app/trees/addresses-label-set.js +104 -0
  250. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.d.ts +1 -2
  251. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.js +28 -19
  252. package/plugins/runtime-modules/app/trees/profile-label-set.d.ts +1 -2
  253. package/plugins/runtime-modules/app/trees/profile-label-set.js +5 -14
  254. package/plugins/runtime-modules/asset/presets.d.ts +4 -0
  255. package/plugins/runtime-modules/asset/trees/phi-default-admin-media-settings-page-tree.js +5 -0
  256. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +4 -2
  257. package/plugins/runtime-modules/auth/trees/phi-auth-area-overlay-tree.server.js +4 -2
  258. package/plugins/runtime-modules/auth/trees/phi-default-admin-auth-settings-page-tree.js +2 -2
  259. package/plugins/runtime-modules/auth/widgets/logout/client.d.ts +1 -1
  260. package/plugins/runtime-modules/auth/widgets/logout/client.js +2 -2
  261. package/plugins/runtime-modules/auth/widgets/security/client.d.ts +5 -1
  262. package/plugins/runtime-modules/auth/widgets/security/client.js +12 -10
  263. package/plugins/runtime-modules/avatar/overlay-tree.server.js +1 -1
  264. package/plugins/runtime-modules/blog/presets.d.ts +4 -0
  265. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +16 -6
  266. package/plugins/runtime-modules/builder/clients/inspector-image-field.d.ts +2 -1
  267. package/plugins/runtime-modules/builder/clients/inspector-image-field.js +6 -3
  268. package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +3 -1
  269. package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.d.ts +23 -0
  270. package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.js +38 -0
  271. package/plugins/runtime-modules/builder/clients/mode-switch.d.ts +4 -1
  272. package/plugins/runtime-modules/builder/clients/mode-switch.js +2 -15
  273. package/plugins/runtime-modules/builder/clients/pages-workspace.js +2 -0
  274. package/plugins/runtime-modules/builder/clients/runtime-module-authoring-boundary.js +2 -1
  275. package/plugins/runtime-modules/builder/controller/draft-status-controller.js +28 -1
  276. package/plugins/runtime-modules/builder/controller/signal-wiring-controller.js +5 -1
  277. package/plugins/runtime-modules/builder/developer-workspace-types.d.ts +5 -0
  278. package/plugins/runtime-modules/builder/page-presets.server.d.ts +7 -0
  279. package/plugins/runtime-modules/builder/page-presets.server.js +10 -1
  280. package/plugins/runtime-modules/builder/persistence.js +4 -0
  281. package/plugins/runtime-modules/builder/public-route-collisions.js +8 -3
  282. package/plugins/runtime-modules/builder/signal-wiring-options.js +9 -2
  283. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +8 -1
  284. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +47 -7
  285. package/plugins/runtime-modules/builder/widgets/chrome/config.d.ts +6 -4
  286. package/plugins/runtime-modules/builder/widgets/chrome/config.js +11 -1
  287. package/plugins/runtime-modules/builder/widgets/inspector-header/authoring.d.ts +2 -2
  288. package/plugins/runtime-modules/builder/widgets/inspector-header/plugin.d.ts +2 -2
  289. package/plugins/runtime-modules/builder/widgets/mode-switch/plugin.js +1 -1
  290. package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +2 -2
  291. package/plugins/runtime-modules/client-manifests/app.js +3 -0
  292. package/plugins/runtime-modules/client-manifests/builder.js +10 -0
  293. package/plugins/runtime-modules/client-manifests/common.js +6 -0
  294. package/plugins/runtime-modules/content-entry-routes.d.ts +4 -0
  295. package/plugins/runtime-modules/contracts.js +31 -1
  296. package/plugins/runtime-modules/core/definition.d.ts +23 -0
  297. package/plugins/runtime-modules/core/form-providers.d.ts +23 -0
  298. package/plugins/runtime-modules/core/messaging/thread-inbox-table.d.ts +0 -17
  299. package/plugins/runtime-modules/core/messaging/thread-inbox-table.js +2 -23
  300. package/plugins/runtime-modules/core/widgets/card/config.d.ts +1 -2
  301. package/plugins/runtime-modules/core/widgets/card/config.js +0 -1
  302. package/plugins/runtime-modules/core/widgets/card/editor.js +1 -1
  303. package/plugins/runtime-modules/core/widgets/collection-view/client.js +5 -2
  304. package/plugins/runtime-modules/core/widgets/collection-view/config.js +8 -0
  305. package/plugins/runtime-modules/core/widgets/collection-view/site-address-binding.d.ts +55 -0
  306. package/plugins/runtime-modules/core/widgets/collection-view/site-address-binding.js +173 -0
  307. package/plugins/runtime-modules/core/widgets/collection-view/site-address-tiles.d.ts +48 -0
  308. package/plugins/runtime-modules/core/widgets/collection-view/site-address-tiles.js +67 -0
  309. package/plugins/runtime-modules/core/widgets/command-toolbar/client.js +3 -0
  310. package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +316 -1
  311. package/plugins/runtime-modules/core/widgets/command-toolbar/config.js +4 -4
  312. package/plugins/runtime-modules/core/widgets/description/config.d.ts +1 -1
  313. package/plugins/runtime-modules/core/widgets/dimension/config.d.ts +1 -1
  314. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +1 -1
  315. package/plugins/runtime-modules/core/widgets/float-button/client.js +4 -1
  316. package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +326 -3
  317. package/plugins/runtime-modules/core/widgets/float-button/config.js +5 -2
  318. package/plugins/runtime-modules/core/widgets/form/config.d.ts +1 -1
  319. package/plugins/runtime-modules/core/widgets/form/config.js +14 -1
  320. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +1 -1
  321. package/plugins/runtime-modules/core/widgets/header-navigation/client.js +1 -1
  322. package/plugins/runtime-modules/core/widgets/length/config.d.ts +1 -1
  323. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +1 -1
  324. package/plugins/runtime-modules/core/widgets/markdown/plugin.js +20 -7
  325. package/plugins/runtime-modules/core/widgets/markdown/server.d.ts +6 -2
  326. package/plugins/runtime-modules/core/widgets/markdown/server.js +2 -2
  327. package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.d.ts +12 -0
  328. package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.js +68 -0
  329. package/plugins/runtime-modules/core/widgets/number-input/config.d.ts +1 -1
  330. package/plugins/runtime-modules/core/widgets/record/client.js +2 -6
  331. package/plugins/runtime-modules/core/widgets/result/config.d.ts +1 -1
  332. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +1 -1
  333. package/plugins/runtime-modules/core/widgets/simple-text/config.js +1 -1
  334. package/plugins/runtime-modules/core/widgets/simple-text/plugin.js +2 -1
  335. package/plugins/runtime-modules/core/widgets/table/client.js +48 -51
  336. package/plugins/runtime-modules/core/widgets/table/config.d.ts +3 -3
  337. package/plugins/runtime-modules/core/widgets/table/config.js +9 -0
  338. package/plugins/runtime-modules/core/widgets/table/reader-query.d.ts +17 -0
  339. package/plugins/runtime-modules/core/widgets/table/reader-query.js +33 -0
  340. package/plugins/runtime-modules/core/widgets/thread-conversation/client.js +2 -2
  341. package/plugins/runtime-modules/core/widgets/thread-conversation/config.d.ts +6 -2
  342. package/plugins/runtime-modules/core/widgets/thread-conversation/config.js +6 -1
  343. package/plugins/runtime-modules/core/widgets/thread-widget-config.d.ts +10 -0
  344. package/plugins/runtime-modules/core/widgets/thread-widget-config.js +6 -0
  345. package/plugins/runtime-modules/core/widgets/tree/client.js +6 -6
  346. package/plugins/runtime-modules/dashboard/trees/dashboard-cards-page-tree.js +3 -1
  347. package/plugins/runtime-modules/descriptor-compiler.d.ts +19 -3
  348. package/plugins/runtime-modules/descriptor-compiler.js +44 -16
  349. package/plugins/runtime-modules/editor/presets.d.ts +4 -0
  350. package/plugins/runtime-modules/editor/trees/phi-default-editor-releases-page-tree.js +3 -1
  351. package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +5 -1
  352. package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +5 -1
  353. package/plugins/runtime-modules/localization/presets.d.ts +4 -0
  354. package/plugins/runtime-modules/localization/trees/editor-translations-widget-label-set.d.ts +2 -0
  355. package/plugins/runtime-modules/localization/trees/editor-translations-widget-label-set.js +2 -0
  356. package/plugins/runtime-modules/localization/trees/phi-default-admin-locales-page-tree.js +3 -1
  357. package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +9 -2
  358. package/plugins/runtime-modules/news/presets.d.ts +4 -0
  359. package/plugins/runtime-modules/observability/trees/phi-default-admin-logs-page-tree.js +6 -2
  360. package/plugins/runtime-modules/resolver.js +17 -0
  361. package/plugins/runtime-modules/revisions/controller/binding.d.ts +37 -0
  362. package/plugins/runtime-modules/revisions/controller/binding.js +75 -0
  363. package/plugins/runtime-modules/revisions/controller/client.d.ts +5 -0
  364. package/plugins/runtime-modules/revisions/controller/client.js +86 -60
  365. package/plugins/runtime-modules/revisions/controller/definition.d.ts +5 -0
  366. package/plugins/runtime-modules/revisions/controller/definition.js +10 -0
  367. package/plugins/runtime-modules/revisions/controller/draft-context-target.d.ts +25 -0
  368. package/plugins/runtime-modules/revisions/controller/draft-context-target.js +33 -0
  369. package/plugins/runtime-modules/revisions/forms.js +1 -1
  370. package/plugins/runtime-modules/revisions/page-ids.d.ts +1 -1
  371. package/plugins/runtime-modules/revisions/page-ids.js +4 -1
  372. package/plugins/runtime-modules/revisions/presets.d.ts +4 -0
  373. package/plugins/runtime-modules/revisions/services/options.js +14 -4
  374. package/plugins/runtime-modules/revisions/services/table.js +54 -25
  375. package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +79 -4
  376. package/plugins/runtime-modules/search/widgets/search-results/client.js +4 -2
  377. package/plugins/runtime-modules/theme/controller/runtime.js +14 -2
  378. package/plugins/runtime-modules/theme/presets.d.ts +4 -0
  379. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +105 -7
  380. package/plugins/runtime-modules/theme/widgets/brand-controls/config.d.ts +3 -2
  381. package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +2 -2
  382. package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +19 -7
  383. package/plugins/runtime-modules/threads/client-data-providers.js +10 -0
  384. package/plugins/runtime-modules/threads/controller/client.js +62 -2
  385. package/plugins/runtime-modules/threads/controller/definition.js +49 -1
  386. package/plugins/runtime-modules/threads/data-providers.d.ts +100 -2
  387. package/plugins/runtime-modules/threads/data-providers.js +96 -0
  388. package/plugins/runtime-modules/threads/definition.d.ts +100 -2
  389. package/plugins/runtime-modules/threads/definition.js +1 -1
  390. package/plugins/runtime-modules/threads/ids.d.ts +4 -0
  391. package/plugins/runtime-modules/threads/ids.js +5 -0
  392. package/plugins/runtime-modules/threads/services/customer-file-addresses.d.ts +30 -0
  393. package/plugins/runtime-modules/threads/services/customer-file-addresses.js +59 -0
  394. package/plugins/runtime-modules/threads/services/customer-file-read.d.ts +22 -0
  395. package/plugins/runtime-modules/threads/services/customer-file-read.js +101 -0
  396. package/plugins/runtime-modules/threads/services/customer-file-table.d.ts +126 -0
  397. package/plugins/runtime-modules/threads/services/customer-file-table.js +79 -0
  398. package/plugins/runtime-modules/threads/trees/phi-default-threads-page-tree.js +5 -3
  399. package/plugins/runtime-modules/user-management/client-data-providers.js +5 -0
  400. package/plugins/runtime-modules/user-management/data-providers.d.ts +159 -0
  401. package/plugins/runtime-modules/user-management/data-providers.js +101 -3
  402. package/plugins/runtime-modules/user-management/definition.d.ts +159 -0
  403. package/plugins/runtime-modules/user-management/ids.d.ts +9 -0
  404. package/plugins/runtime-modules/user-management/ids.js +9 -0
  405. package/plugins/runtime-modules/user-management/presets.js +17 -1
  406. package/plugins/runtime-modules/user-management/services/users-access-table.d.ts +378 -0
  407. package/plugins/runtime-modules/user-management/services/users-access-table.js +132 -0
  408. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.d.ts +90 -0
  409. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.js +122 -0
  410. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.d.ts +20 -0
  411. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.js +181 -0
  412. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +24 -18
  413. package/server-helpers/cms-page-record.d.ts +9 -1
  414. package/server-helpers/cms-page-record.js +11 -1
  415. package/server-helpers/cms-request.js +8 -5
  416. package/server-helpers/link-preview-image.d.ts +30 -0
  417. package/server-helpers/link-preview-image.js +57 -0
  418. package/server-helpers/runtime.js +0 -1
  419. package/server-helpers/search-text.js +3 -0
  420. package/server-helpers.d.ts +1 -1
  421. package/server-helpers.js +1 -1
  422. package/styles/controls.css +4 -2
  423. package/styles/layout.css +7 -0
  424. package/styles/shell.css +30 -6
  425. package/theme/phi-antd-token-resolver.d.ts +8 -0
  426. package/theme/phi-antd-token-resolver.js +10 -0
  427. package/theme/phi-theme-color.d.ts +19 -0
  428. package/theme/phi-theme-color.js +42 -0
  429. package/theme/phi-theme-composition.js +9 -0
  430. package/theme/phi-theme-gradients.js +4 -22
  431. package/theme/phi-theme-inverse-ground.d.ts +39 -0
  432. package/theme/phi-theme-inverse-ground.js +103 -0
  433. package/theme/phi-theme-palette-defaults.d.ts +16 -0
  434. package/theme/phi-theme-palette-defaults.js +103 -0
  435. package/theme/phi-theme-tokens.d.ts +2 -1
  436. package/theme/phi-theme-tokens.js +2 -0
  437. package/types/cms-module-descriptors.d.ts +14 -0
  438. package/types/cms-overlay.d.ts +13 -6
  439. package/types/cms-overlay.js +6 -22
  440. package/types/cms-plugins.d.ts +20 -3
  441. package/types/cms.d.ts +10 -0
  442. package/types/collection-provider.d.ts +27 -0
  443. package/types/collection-signal-values.d.ts +2 -0
  444. package/types/collection-signal-values.js +23 -0
  445. package/types/collection-view-widget.d.ts +9 -0
  446. package/types/core-widget-placements.d.ts +9 -3
  447. package/types/link-preview.d.ts +19 -0
  448. package/types/link-preview.js +19 -0
  449. package/types/record-provider.d.ts +22 -1
  450. package/types/signals.d.ts +2 -0
  451. package/types/signals.js +2 -0
  452. package/types/site-theme.d.ts +27 -0
  453. package/types/table-embed.d.ts +48 -0
  454. package/types/table-embed.js +1 -0
  455. package/types/table-widget.d.ts +29 -1
  456. package/types/table-widget.js +0 -282
  457. package/types/tree-widget.d.ts +0 -1
  458. package/types/tree-widget.js +0 -60
  459. package/types/widget-runtime.d.ts +3 -1
  460. package/types.d.ts +2 -1
  461. package/types.js +1 -1
  462. /package/{plugins/runtime-modules/threads/controller/address.d.ts → constants/threads-controller-address.d.ts} +0 -0
@@ -10,7 +10,7 @@
10
10
  * `../../gateway/label-set` directly. That is the whole reason this file exists: the boundary a Module
11
11
  * outside must use should be as narrow as the relative path a Module inside gets for free.
12
12
  */
13
- export { definePhiLabelSet, definePhiMessageLabel, definePhiRuntimeModuleLabelSet, getPhiLabelSet, type PhiLabelSetDefinition, type PhiLabelSetEntry, type PhiLabelSetLabels, type PhiLabelSetTexts, } from "./gateway/label-set";
13
+ export { definePhiCountLabel, definePhiLabelSet, definePhiMessageLabel, definePhiRuntimeModuleLabelSet, getPhiLabelSet, type PhiLabelSetCountEntry, type PhiLabelSetDefinition, type PhiLabelSetEntry, type PhiLabelSetLabels, type PhiLabelSetTexts, } from "./gateway/label-set";
14
14
  export { PHI_TR_CTX_WEB_UI_LABEL, PHI_TR_CTX_WEB_UI_MESSAGE } from "./gateway/tr";
15
15
  export type { PhiGlobalTranslatorOptions } from "./gateway/tr";
16
16
  /** Where a Site's own address for this server comes from, for code that runs outside a request. */
package/module-labels.js CHANGED
@@ -10,7 +10,7 @@
10
10
  * `../../gateway/label-set` directly. That is the whole reason this file exists: the boundary a Module
11
11
  * outside must use should be as narrow as the relative path a Module inside gets for free.
12
12
  */
13
- export { definePhiLabelSet, definePhiMessageLabel, definePhiRuntimeModuleLabelSet, getPhiLabelSet, } from "./gateway/label-set";
13
+ export { definePhiCountLabel, definePhiLabelSet, definePhiMessageLabel, definePhiRuntimeModuleLabelSet, getPhiLabelSet, } from "./gateway/label-set";
14
14
  export { PHI_TR_CTX_WEB_UI_LABEL, PHI_TR_CTX_WEB_UI_MESSAGE } from "./gateway/tr";
15
15
  /** Where a Site's own address for this server comes from, for code that runs outside a request. */
16
16
  export { readPhiServerApiCredentials } from "./helpers/phis-server-credentials";
@@ -15,7 +15,10 @@
15
15
  * No `server-only` here, on purpose: a test in a package loads this door without a mock.
16
16
  */
17
17
  export { createPhiDeclaredMediaResolver, type PhiModuleMediaFinding } from "./helpers/module-media-check";
18
+ export { checkPhiPresetForms } from "./helpers/preset-form-check";
18
19
  export { checkPhiPagePresetLayout, type PhiPageLayoutFinding } from "./helpers/page-layout-check";
19
20
  export { checkPhiPresetTextSources, type PhiPresetTextSourceFinding } from "./helpers/preset-text-source-check";
21
+ export { checkPhiEmbeddableTables, checkPhiPresetTables } from "./helpers/preset-table-check";
20
22
  export { checkPhiPresetTreeContract, type PhiPresetTreeContractFinding } from "./helpers/preset-tree-contract-check";
23
+ export { validatePhiTreeWidgetBinding } from "./helpers/tree-widget-binding";
21
24
  export { checkPhiRouteAddresses, type PhiRouteAddressFinding, type PhiRouteAddressSubject } from "./helpers/route-address-check";
@@ -15,7 +15,10 @@
15
15
  * No `server-only` here, on purpose: a test in a package loads this door without a mock.
16
16
  */
17
17
  export { createPhiDeclaredMediaResolver } from "./helpers/module-media-check";
18
+ export { checkPhiPresetForms } from "./helpers/preset-form-check";
18
19
  export { checkPhiPagePresetLayout } from "./helpers/page-layout-check";
19
20
  export { checkPhiPresetTextSources } from "./helpers/preset-text-source-check";
21
+ export { checkPhiEmbeddableTables, checkPhiPresetTables } from "./helpers/preset-table-check";
20
22
  export { checkPhiPresetTreeContract } from "./helpers/preset-tree-contract-check";
23
+ export { validatePhiTreeWidgetBinding } from "./helpers/tree-widget-binding";
21
24
  export { checkPhiRouteAddresses } from "./helpers/route-address-check";
@@ -17,8 +17,8 @@
17
17
  * in `@phis/ui/runtime/data-provider-client`.
18
18
  */
19
19
  import "server-only";
20
- export type { PhiRecordFieldKind } from "./constants/record-field-kinds";
21
- export type { PhiRecordField, PhiRecordFieldValueByKind, PhiRecordLink, PhiRecordPicture, PhiRecordSample, PhiRecordTag, PhiRuntimeModuleRecordProviderServerDefinition, PhiRuntimeRecordFieldsReader, PhiRuntimeRecordProviderContext, PhiRuntimeRecordProviderResolver, PhiRuntimeRecordSamplesReader, } from "./types/record-provider";
20
+ export { PhiRecordMarkdownFlag, type PhiRecordFieldKind } from "./constants/record-field-kinds";
21
+ export type { PhiRecordField, PhiRecordFieldValueByKind, PhiRecordLink, PhiRecordMarkdown, PhiRecordPicture, PhiRecordSample, PhiRecordTag, PhiRuntimeModuleRecordProviderServerDefinition, PhiRuntimeRecordFieldsReader, PhiRuntimeRecordProviderContext, PhiRuntimeRecordProviderResolver, PhiRuntimeRecordSamplesReader, } from "./types/record-provider";
22
22
  export { resolvePhiRecordSource, type PhiRecordSourceResult } from "./server-helpers/record-source";
23
23
  export { readPhiPageRecordField, resolvePhiPageRecordFields, resolvePhiWidgetRecordField, type PhiPageRecordFieldsResult, type PhiWidgetRecordField, } from "./server-helpers/record-fields";
24
24
  export { fetchPhiSiteApi, type PhiSiteApiRequest } from "./gateway/site-api-request";
package/module-records.js CHANGED
@@ -17,6 +17,7 @@
17
17
  * in `@phis/ui/runtime/data-provider-client`.
18
18
  */
19
19
  import "server-only";
20
+ export { PhiRecordMarkdownFlag } from "./constants/record-field-kinds";
20
21
  export { resolvePhiRecordSource } from "./server-helpers/record-source";
21
22
  export { readPhiPageRecordField, resolvePhiPageRecordFields, resolvePhiWidgetRecordField, } from "./server-helpers/record-fields";
22
23
  export { fetchPhiSiteApi } from "./gateway/site-api-request";
@@ -4,6 +4,9 @@ import { readPhiAreaMeta } from "../helpers/cms-area-config";
4
4
  import { buildPhiAreaPageMetadata } from "../helpers/phi-metadata";
5
5
  import { resolvePhiSitePublicBase } from "../helpers/phi-seo";
6
6
  import { readPhiSiteRuntimeConfigSync } from "../helpers/site-runtime";
7
+ import { readPhiServerApiCredentials } from "../helpers/phis-server-credentials";
8
+ import { readPhiMediaDeliveryAssetId, resolvePhiLinkPreviewImage } from "../server-helpers/link-preview-image";
9
+ import { PHI_PAGE_SHARE_IMAGE_CONFIG_KEY, readPhiShareImage } from "../types/link-preview";
7
10
  import { PhiCmsErrorPage } from "../components/cms/phi-cms-error-page";
8
11
  import { PhiCmsDeferredErrorPage, } from "../components/cms/phi-cms-deferred-error-page";
9
12
  import { PhiCmsAreaBoundary, PhiCmsAreaShell, } from "../components/cms/phi-cms-root-layout";
@@ -170,6 +173,29 @@ export function createPhiNextDynamicRootPage(cmsBridge) {
170
173
  if (resolvedRoute.canonicalHref || !resolvedRequest) {
171
174
  return {};
172
175
  }
176
+ const { runtime, page } = resolvedRequest;
177
+ const publicBase = resolvePhiSitePublicBase(runtime.site.publicUrl, readPhiSiteRuntimeConfigSync().site.publicUrl);
178
+ const brand = runtime.site.theme?.brand;
179
+ const preview = page.pageMeta?.preview ?? null;
180
+ const recordImageAssetId = preview?.image ? readPhiMediaDeliveryAssetId(preview.image.src, publicBase) : null;
181
+ const credentials = readPhiServerApiCredentials();
182
+ /*
183
+ * The preview's picture, in the order the Page answers: the record's, the Page's own, the Theme's
184
+ * (NEXT_INTEGRATION.md, "Link previews"). Only Public is shared; another Area states no preview.
185
+ */
186
+ const image = resolvedRoute.area === "public"
187
+ ? await resolvePhiLinkPreviewImage({
188
+ ...credentials,
189
+ siteKey: runtime.site.key,
190
+ publicBase,
191
+ candidates: [
192
+ recordImageAssetId ? { assetId: recordImageAssetId, alt: preview?.image?.alt ?? null } : null,
193
+ readPhiShareImage(page.page.layoutConfig?.[PHI_PAGE_SHARE_IMAGE_CONFIG_KEY]),
194
+ readPhiShareImage(brand?.shareImage),
195
+ ],
196
+ fallbackAlt: preview?.title ?? page.pageMeta?.title?.value ?? runtime.site.name ?? "",
197
+ })
198
+ : null;
173
199
  return buildPhiAreaPageMetadata({
174
200
  area: resolvedRoute.area,
175
201
  meta: readPhiAreaMeta(rootRequest.resolvedAreaPreset?.preset.config),
@@ -177,8 +203,15 @@ export function createPhiNextDynamicRootPage(cmsBridge) {
177
203
  pageTitle: resolvedRequest.page.pageMeta?.title?.value,
178
204
  pageDescription: resolvedRequest.page.pageMeta?.description?.value,
179
205
  pageNoindex: resolvedRequest.runtime.page?.noindex,
206
+ linkPreview: {
207
+ recordTitle: preview?.title,
208
+ recordDescription: preview?.description,
209
+ slogan: brand?.slogan?.label,
210
+ image,
211
+ xAccount: brand?.xAccount,
212
+ },
180
213
  publicAddress: {
181
- publicBase: resolvePhiSitePublicBase(resolvedRequest.runtime.site.publicUrl, readPhiSiteRuntimeConfigSync().site.publicUrl),
214
+ publicBase,
182
215
  path: resolvedRoute.cmsPath,
183
216
  locale: resolvedRoute.locale,
184
217
  availableLocales: resolvedRequest.runtime.site.availableLocales.map((option) => option.code),
@@ -10,6 +10,7 @@ import { resolvePhiThemeComposition } from "../theme/phi-theme-composition";
10
10
  import { composePhiFontCatalogue } from "../theme/phi-font-catalogue";
11
11
  import { PHI_REM_ROOT_PX } from "../theme/phi-css-vars";
12
12
  import { buildPhiRootMetadata } from "../helpers/phi-metadata";
13
+ import { resolvePhiSiteDescription } from "../helpers/phi-site-description";
13
14
  import { describePhiSignetHead } from "../helpers/phi-signet-head";
14
15
  import { localizePath } from "../helpers/locale";
15
16
  import { readPhiSiteRuntimeConfigSync, } from "../helpers/site-runtime";
@@ -78,12 +79,11 @@ function buildPhiNextRootMetadata(runtimeConfig, site, themeBlocks) {
78
79
  applicationName: site.name,
79
80
  titleTemplate: `%s | ${site.name}`,
80
81
  defaultTitle: site.name,
81
- defaultDescription: site.theme?.brand?.slogan?.label ??
82
- "Canonical starter structure for PHIS-powered sites.",
82
+ // The Page's own description wins where it states one (`buildPhiAreaPageMetadata`).
83
+ defaultDescription: resolvePhiSiteDescription(site.theme?.brand?.slogan?.label),
83
84
  site: {
84
85
  title: site.name,
85
- description: site.theme?.brand?.slogan?.label ??
86
- "Canonical starter structure for PHIS-powered sites.",
86
+ description: resolvePhiSiteDescription(site.theme?.brand?.slogan?.label),
87
87
  },
88
88
  /*
89
89
  * The Signet the Site wears, resolved the way the Brand Widget resolves the Logo -- the Site's own,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phis/ui",
3
- "version": "0.7.8",
3
+ "version": "0.8.1",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -521,7 +521,7 @@
521
521
  "@lexical/rich-text": "0.50.0",
522
522
  "@lexical/selection": "0.50.0",
523
523
  "@lexical/utils": "0.50.0",
524
- "@phis/contracts": "^0.8.9",
524
+ "@phis/contracts": "^0.8.11",
525
525
  "dayjs": "^1.11.23",
526
526
  "dom-serializer": "^2.0.0",
527
527
  "htmlparser2": "^10.1.0",
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Who works with the customer file: the holders of the Site access `accounting` (Maintainer, Accountant;
3
+ * an Admin through the Site-superuser rule). phis-server's `GET /api/site/members/{userId}/file` answers
4
+ * `support` as well, without addresses; a Supporter's file is the Support Module's own Page over the same
5
+ * route, not this one. Said for the Page's entry and its tree.
6
+ */
7
+ export declare const PHI_ACCOUNTING_CUSTOMER_FILE_ACCESS: {
8
+ readonly access: "roles";
9
+ readonly providerId: "@phis/server/core";
10
+ readonly allowedRoleFlags: number;
11
+ };
@@ -0,0 +1,12 @@
1
+ import { PHI_CORE_ROLE_PROVIDER_ID, PhiBaseRole } from "@phis/contracts/access";
2
+ /**
3
+ * Who works with the customer file: the holders of the Site access `accounting` (Maintainer, Accountant;
4
+ * an Admin through the Site-superuser rule). phis-server's `GET /api/site/members/{userId}/file` answers
5
+ * `support` as well, without addresses; a Supporter's file is the Support Module's own Page over the same
6
+ * route, not this one. Said for the Page's entry and its tree.
7
+ */
8
+ export const PHI_ACCOUNTING_CUSTOMER_FILE_ACCESS = {
9
+ access: "roles",
10
+ providerId: PHI_CORE_ROLE_PROVIDER_ID,
11
+ allowedRoleFlags: PhiBaseRole.Maintainer | PhiBaseRole.Accountant,
12
+ };
@@ -35,7 +35,7 @@ export const PHI_ACCOUNTING_RUNTIME_DATA_PROVIDER_DESCRIPTORS = [
35
35
  kind: "table",
36
36
  executionMode: "live",
37
37
  authoringMode: "none",
38
- title: "Products",
38
+ title: "Product directory",
39
39
  description: "The Site's product directory: every supplier's products, their terms and their state.",
40
40
  resources: [
41
41
  {
@@ -19,3 +19,17 @@ export declare const PHI_ACCOUNTING_PRODUCTS_PAGE_PRESET_KEY = "accounting-produ
19
19
  export declare const PHI_ACCOUNTING_PRODUCTS_PAGE_LAYOUT_IDS: Readonly<Record<"layoutTerms" | "layoutTermsFooter", import("@phis/contracts/cms").PhiCmsInstanceId>>;
20
20
  export declare const PHI_ACCOUNTING_PRODUCTS_PAGE_OVERLAY_IDS: Readonly<Record<"overlayTerms", import("@phis/contracts/cms").PhiCmsInstanceId>>;
21
21
  export declare const PHI_ACCOUNTING_PRODUCTS_PAGE_WIDGET_IDS: Readonly<Record<"widgetTable" | "widgetTerms" | "widgetTermsNote" | "widgetTermsCommands", import("@phis/contracts/cms").PhiCmsInstanceId>>;
22
+ /**
23
+ * Staff's customer file on one member (phis-server `GET /api/site/members/{userId}/file`), a Page of the
24
+ * Accounting Area beside the product directory.
25
+ */
26
+ export declare const PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET_KEY = "accounting-customer-file-page";
27
+ /**
28
+ * The person and their addresses, the file and its note dialog, the conversations with the one chosen and
29
+ * its Reply dialog -- every one named in a route by another.
30
+ */
31
+ export declare const PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_IDS: {
32
+ widgets: Readonly<Record<"widgetConversation" | "widgetReplyForm" | "widgetReplyCommands" | "widgetPerson" | "widgetAddresses" | "widgetFile" | "widgetThreads" | "widgetNoteForm" | "widgetNoteCommands", import("@phis/contracts/cms").PhiCmsInstanceId>>;
33
+ overlays: Readonly<Record<"overlayReply" | "overlayNote", import("@phis/contracts/cms").PhiCmsInstanceId>>;
34
+ layouts: Readonly<Record<"layoutReply" | "layoutReplyFooter" | "layoutNote" | "layoutNoteFooter", import("@phis/contracts/cms").PhiCmsInstanceId>>;
35
+ };
@@ -27,3 +27,37 @@ const PHI_ACCOUNTING_PRODUCTS_PAGE_PRESET = {
27
27
  export const PHI_ACCOUNTING_PRODUCTS_PAGE_LAYOUT_IDS = createPhiPresetCmsInstanceIdMap(PHI_ACCOUNTING_PRODUCTS_PAGE_PRESET, ["layoutTerms", "layoutTermsFooter"]);
28
28
  export const PHI_ACCOUNTING_PRODUCTS_PAGE_OVERLAY_IDS = createPhiPresetCmsInstanceIdMap(PHI_ACCOUNTING_PRODUCTS_PAGE_PRESET, ["overlayTerms"]);
29
29
  export const PHI_ACCOUNTING_PRODUCTS_PAGE_WIDGET_IDS = createPhiPresetCmsInstanceIdMap(PHI_ACCOUNTING_PRODUCTS_PAGE_PRESET, ["widgetTable", "widgetTerms", "widgetTermsNote", "widgetTermsCommands"]);
30
+ /**
31
+ * Staff's customer file on one member (phis-server `GET /api/site/members/{userId}/file`), a Page of the
32
+ * Accounting Area beside the product directory.
33
+ */
34
+ export const PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET_KEY = "accounting-customer-file-page";
35
+ const PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET = {
36
+ domain: "page",
37
+ ownerModuleId: PHI_ACCOUNTING_RUNTIME_MODULE_ID,
38
+ presetKey: PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET_KEY,
39
+ };
40
+ /**
41
+ * The person and their addresses, the file and its note dialog, the conversations with the one chosen and
42
+ * its Reply dialog -- every one named in a route by another.
43
+ */
44
+ export const PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_IDS = {
45
+ widgets: createPhiPresetCmsInstanceIdMap(PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET, [
46
+ "widgetPerson",
47
+ "widgetAddresses",
48
+ "widgetFile",
49
+ "widgetThreads",
50
+ "widgetConversation",
51
+ "widgetNoteForm",
52
+ "widgetNoteCommands",
53
+ "widgetReplyForm",
54
+ "widgetReplyCommands",
55
+ ]),
56
+ overlays: createPhiPresetCmsInstanceIdMap(PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET, ["overlayNote", "overlayReply"]),
57
+ layouts: createPhiPresetCmsInstanceIdMap(PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET, [
58
+ "layoutNote",
59
+ "layoutNoteFooter",
60
+ "layoutReply",
61
+ "layoutReplyFooter",
62
+ ]),
63
+ };
@@ -2,11 +2,12 @@ import { buildPhiAreaRootRoutePresetDescriptor } from "../area-root-route";
2
2
  import { buildPhiSidebarRoutePresetDescriptor } from "../sidebar-route";
3
3
  import { PhiCmsRegionType } from "../../../constants/phi-cms";
4
4
  import { PHI_DEFAULT_PUB_AREA_COMPOSITION_NODE_KEYS } from "../preset-contracts/pub-area";
5
- import { PHI_ACCOUNTING_PRODUCTS_PAGE_PRESET_KEY, PHI_ACCOUNTING_RUNTIME_MODULE_ID } from "./ids";
5
+ import { PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET_KEY, PHI_ACCOUNTING_PRODUCTS_PAGE_PRESET_KEY, PHI_ACCOUNTING_RUNTIME_MODULE_ID, } from "./ids";
6
+ import { PHI_ACCOUNTING_CUSTOMER_FILE_ACCESS } from "./customer-file-access";
6
7
  /*
7
- * What the Accounting base Module brings: the Site shell for its Area, the Area root, and the Site's
8
- * product directory. The root lands on the first sidebar entry a viewer can see -- the Dashboard
9
- * Module's where it is on, the directory where it is not.
8
+ * What the Accounting base Module brings: the Site shell for its Area, the Area root, the Site's
9
+ * product directory and staff's customer file. The root lands on the first sidebar entry a viewer can see -- the Dashboard
10
+ * Module's where it is on, the customer file where it is not (the Module's entries stand in preset-key order).
10
11
  */
11
12
  export const PHI_ACCOUNTING_RUNTIME_MODULE_AREA_SHELLS = [
12
13
  {
@@ -56,11 +57,37 @@ export const PHI_ACCOUNTING_RUNTIME_MODULE_ROUTES = [
56
57
  anchor: "main",
57
58
  ownerModuleId: PHI_ACCOUNTING_RUNTIME_MODULE_ID,
58
59
  presetKey: PHI_ACCOUNTING_PRODUCTS_PAGE_PRESET_KEY,
59
- title: "Products",
60
+ title: "Product directory",
60
61
  path: "/products",
61
62
  itemKey: "@phis/ui/modules/accounting/nav/accounting/products",
62
63
  icon: "antd:appstore",
63
64
  loadTree: ({ page, runtime }) => import("./trees/phi-default-accounting-products-page-tree")
64
65
  .then((module) => module.buildPhiDefaultAccountingProductsPageTree({ page, runtime })),
65
66
  }),
67
+ /*
68
+ * Staff's customer file on one member, for the holders of `accounting`, whom the Area admits anyway:
69
+ * the entry states the access as the Page and Core's route do. A Supporter's file is the Support
70
+ * Module's own Page over the same Core route, not this one.
71
+ */
72
+ withPhiNavigationAccess(buildPhiSidebarRoutePresetDescriptor({
73
+ area: "accounting",
74
+ anchor: "main",
75
+ ownerModuleId: PHI_ACCOUNTING_RUNTIME_MODULE_ID,
76
+ presetKey: PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET_KEY,
77
+ title: "Customer file",
78
+ path: "/customer-file",
79
+ itemKey: "@phis/ui/modules/accounting/nav/accounting/customer-file",
80
+ icon: "antd:idcard",
81
+ loadTree: ({ page, runtime }) => import("./trees/phi-default-accounting-customer-file-page-tree")
82
+ .then((module) => module.buildPhiDefaultAccountingCustomerFilePageTree({ page, runtime })),
83
+ }), PHI_ACCOUNTING_CUSTOMER_FILE_ACCESS),
66
84
  ];
85
+ function withPhiNavigationAccess(descriptor, accessPolicy) {
86
+ return {
87
+ ...descriptor,
88
+ navigation: descriptor.navigation?.map((injection) => ({
89
+ ...injection,
90
+ item: { ...injection.item, accessPolicy },
91
+ })),
92
+ };
93
+ }
@@ -0,0 +1,78 @@
1
+ import "server-only";
2
+ import { type PhiGlobalTranslatorOptions } from "../../../../gateway/tr";
3
+ export declare function getPhiAccountingCustomerFilePageLabels(options: PhiGlobalTranslatorOptions): Promise<{
4
+ title: string;
5
+ description: string;
6
+ notStaff: string;
7
+ person: {
8
+ title: string;
9
+ label: string;
10
+ picker: string;
11
+ pickerHint: string;
12
+ empty: string;
13
+ footer: string;
14
+ columns: {
15
+ displayName: string;
16
+ name: string;
17
+ company: string;
18
+ email: string;
19
+ phone: string;
20
+ mobile: string;
21
+ };
22
+ };
23
+ addresses: {
24
+ title: string;
25
+ label: string;
26
+ empty: string;
27
+ purposes: {
28
+ billing: string;
29
+ shipping: string;
30
+ defaultBilling: string;
31
+ defaultShipping: string;
32
+ };
33
+ };
34
+ threads: {
35
+ title: string;
36
+ label: string;
37
+ empty: string;
38
+ emptyHint: string;
39
+ footer: string;
40
+ columns: {
41
+ subject: string;
42
+ kind: string;
43
+ state: string;
44
+ activity: string;
45
+ };
46
+ kinds: {
47
+ direct: string;
48
+ group: string;
49
+ crossGroup: string;
50
+ support: string;
51
+ };
52
+ states: {
53
+ unread: string;
54
+ open: string;
55
+ archived: string;
56
+ locked: string;
57
+ };
58
+ };
59
+ file: {
60
+ title: string;
61
+ label: string;
62
+ empty: string;
63
+ add: string;
64
+ };
65
+ note: {
66
+ title: string;
67
+ save: string;
68
+ };
69
+ conversation: {
70
+ label: string;
71
+ empty: string;
72
+ };
73
+ ownFile: string;
74
+ reply: {
75
+ title: string;
76
+ send: string;
77
+ };
78
+ }>;
@@ -0,0 +1,136 @@
1
+ import "server-only";
2
+ import { PHI_TR_CTX_WEB_UI_LABEL } from "../../../../gateway/tr";
3
+ import { definePhiRuntimeModuleLabelSet, definePhiMessageLabel, getPhiLabelSet } from "../../../../gateway/label-set";
4
+ import { PHI_ACCOUNTING_RUNTIME_MODULE_IDENTITY } from "../ids";
5
+ /**
6
+ * What the customer file in the Accounting Area says: the member picker, the person's details, their
7
+ * addresses, their file with its note dialog, the conversations they are in with the Reply dialog. The conversation words
8
+ * are its own rather than the conversations Page's, since a Module does not read another's Label Set.
9
+ */
10
+ const PHI_CUSTOMER_FILE_PAGE_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_ACCOUNTING_RUNTIME_MODULE_IDENTITY, {
11
+ key: "preset:accounting-customer-file-page",
12
+ ctx: PHI_TR_CTX_WEB_UI_LABEL,
13
+ labels: {
14
+ title: "Customer file",
15
+ description: definePhiMessageLabel("One member of the site: how to reach them, where they are, their file and their conversations."),
16
+ not_staff: definePhiMessageLabel("The customer file is for accounting."),
17
+ person_title: "Customer",
18
+ person_label: "customer",
19
+ person_picker: "Member",
20
+ person_picker_hint: definePhiMessageLabel("Search by name, e-mail address or telephone number."),
21
+ person_empty: definePhiMessageLabel("Choose a member to open their file."),
22
+ own_file: definePhiMessageLabel("This is your own record; it is not shown here."),
23
+ person_footer: definePhiMessageLabel("Member no. %1. Opening a file is written to the access log."),
24
+ // Core pages the conversations without a count: what this page holds, and which page it is.
25
+ threads_footer: "%1 on page %2",
26
+ column_display_name: "Shown as",
27
+ column_name: "Name",
28
+ column_company: "Company",
29
+ column_email: "E-mail",
30
+ column_phone: "Business phone",
31
+ column_mobile: "Mobile",
32
+ addresses_title: "Addresses",
33
+ addresses_label: "customer addresses",
34
+ addresses_empty: definePhiMessageLabel("No address on file."),
35
+ purpose_billing: "Billing",
36
+ purpose_shipping: "Shipping",
37
+ purpose_default_billing: "Default billing",
38
+ purpose_default_shipping: "Default shipping",
39
+ file_title: "File",
40
+ file_label: "customer file entries",
41
+ file_empty: definePhiMessageLabel("Choose a member to read their file."),
42
+ note_add: "Add note",
43
+ note_title: "Internal note",
44
+ note_save: "Add to file",
45
+ threads_title: "Conversations",
46
+ threads_label: "customer conversations",
47
+ threads_empty: definePhiMessageLabel("No conversations to show."),
48
+ threads_empty_hint: definePhiMessageLabel("Choose a member above: the conversations they are in that you may see are listed here."),
49
+ conversation_empty: definePhiMessageLabel("Choose a conversation to read."),
50
+ conversation_label: "customer conversation",
51
+ kind_direct: "Direct",
52
+ kind_group: "Group",
53
+ kind_cross_group: "Between groups",
54
+ kind_support: "Support",
55
+ column_subject: "Subject",
56
+ column_kind: "Kind",
57
+ column_state: "State",
58
+ column_activity: "Last activity",
59
+ state_unread: "New",
60
+ state_open: { text: "Open", ctx: "Web UI label, state" },
61
+ state_archived: "Archived",
62
+ state_locked: "Locked",
63
+ reply_title: "Reply",
64
+ reply_send_label: "Send",
65
+ },
66
+ });
67
+ export async function getPhiAccountingCustomerFilePageLabels(options) {
68
+ const labels = await getPhiLabelSet(options, PHI_CUSTOMER_FILE_PAGE_LABEL_SET);
69
+ return {
70
+ title: labels.title,
71
+ description: labels.description,
72
+ notStaff: labels.not_staff,
73
+ person: {
74
+ title: labels.person_title,
75
+ label: labels.person_label,
76
+ picker: labels.person_picker,
77
+ pickerHint: labels.person_picker_hint,
78
+ empty: labels.person_empty,
79
+ footer: labels.person_footer,
80
+ columns: {
81
+ displayName: labels.column_display_name,
82
+ name: labels.column_name,
83
+ company: labels.column_company,
84
+ email: labels.column_email,
85
+ phone: labels.column_phone,
86
+ mobile: labels.column_mobile,
87
+ },
88
+ },
89
+ addresses: {
90
+ title: labels.addresses_title,
91
+ label: labels.addresses_label,
92
+ empty: labels.addresses_empty,
93
+ purposes: {
94
+ billing: labels.purpose_billing,
95
+ shipping: labels.purpose_shipping,
96
+ defaultBilling: labels.purpose_default_billing,
97
+ defaultShipping: labels.purpose_default_shipping,
98
+ },
99
+ },
100
+ threads: {
101
+ title: labels.threads_title,
102
+ label: labels.threads_label,
103
+ empty: labels.threads_empty,
104
+ emptyHint: labels.threads_empty_hint,
105
+ footer: labels.threads_footer,
106
+ columns: {
107
+ subject: labels.column_subject,
108
+ kind: labels.column_kind,
109
+ state: labels.column_state,
110
+ activity: labels.column_activity,
111
+ },
112
+ kinds: {
113
+ direct: labels.kind_direct,
114
+ group: labels.kind_group,
115
+ crossGroup: labels.kind_cross_group,
116
+ support: labels.kind_support,
117
+ },
118
+ states: {
119
+ unread: labels.state_unread,
120
+ open: labels.state_open,
121
+ archived: labels.state_archived,
122
+ locked: labels.state_locked,
123
+ },
124
+ },
125
+ file: {
126
+ title: labels.file_title,
127
+ label: labels.file_label,
128
+ empty: labels.file_empty,
129
+ add: labels.note_add,
130
+ },
131
+ note: { title: labels.note_title, save: labels.note_save },
132
+ conversation: { label: labels.conversation_label, empty: labels.conversation_empty },
133
+ ownFile: labels.own_file,
134
+ reply: { title: labels.reply_title, send: labels.reply_send_label },
135
+ };
136
+ }
@@ -10,9 +10,9 @@ const PHI_ACCOUNTING_PRODUCTS_PAGE_LABEL_SET = definePhiRuntimeModuleLabelSet(PH
10
10
  key: "preset:accounting-products-page",
11
11
  ctx: PHI_TR_CTX_WEB_UI_LABEL,
12
12
  labels: {
13
- page_title: "Products",
13
+ page_title: "Product directory",
14
14
  page_description: definePhiMessageLabel("Every product the Site's Add-ons supply: release their terms, lock and unlock them."),
15
- widget_label: "products",
15
+ widget_label: "product directory",
16
16
  column_picture: "Picture",
17
17
  column_title: "Title",
18
18
  column_id: "ID",
@@ -0,0 +1,29 @@
1
+ import type { PhiCmsPageNode, PhiResolvedCmsPageTree } from "../../../../types/cms";
2
+ import type { PhiBlockRuntime } from "../../../../types";
3
+ /**
4
+ * Staff's customer file on one member (phis-server `GET /api/site/members/{userId}/file`): who they are and
5
+ * how to reach them, where they live, their file and the conversations they are in.
6
+ *
7
+ * A Page of the Accounting Module, beside the product directory, built from what the conversations Page
8
+ * already is and bound by Foundation names only (`constants/customer-file.ts`,
9
+ * `constants/threads-controller-address.ts`): the Table and Collection Providers and the Conversations
10
+ * Controller are the conversations Module's, which is active in the Accounting Area by default and has to
11
+ * be for this Page to read anything. The person Table's filter is Core's member picker
12
+ * (the `site-members` options with Core's search, which matches names, e-mail addresses and telephone
13
+ * numbers); its query goes to the conversations Table and to the Conversations Controller, so one choice
14
+ * fills the Page with one request: the Controller hands the member to the addresses tiles as binding params
15
+ * (Core's address renderer, read-only), joins the Tables' read for the file's id and hands it to the file
16
+ * panel, a conversation reader whose "Add note" opens Core's Reply Form
17
+ * in a dialog of its own (every message of a file is internal). The conversations Table lists the person's
18
+ * conversations, the file not among them, and choosing a row is the conversations Page's choreography
19
+ * unchanged: the Controller makes the selection a thread, the conversation reader below reads it, and its
20
+ * Reply opens the Reply dialog with the internal note offered.
21
+ *
22
+ * The Page is for the holders of `accounting` (`PHI_ACCOUNTING_CUSTOMER_FILE_ACCESS`), who read every
23
+ * field, the addresses included. A viewer the Area admits without it is told so in the Page and nothing is
24
+ * read for them; a Supporter's file is the Support Module's Page over the same route.
25
+ */
26
+ export declare function buildPhiDefaultAccountingCustomerFilePageTree({ page, runtime, }: {
27
+ page: PhiCmsPageNode;
28
+ runtime: PhiBlockRuntime;
29
+ }): Promise<PhiResolvedCmsPageTree>;