@phis/ui 0.8.0 → 0.8.2

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 (304) hide show
  1. package/README.md +9 -2
  2. package/components/cms/phi-cms-layout-renderer.js +15 -7
  3. package/components/cms/phi-cms-render-diagnostic-client.d.ts +3 -1
  4. package/components/cms/phi-cms-render-diagnostic-client.js +4 -3
  5. package/components/cms/phi-cms-render-diagnostic.d.ts +8 -2
  6. package/components/cms/phi-cms-render-diagnostic.js +12 -2
  7. package/components/cms/phi-cms-render-error-boundary.d.ts +2 -0
  8. package/components/cms/phi-cms-render-error-boundary.js +1 -1
  9. package/components/cms/phi-cms-root-layout.js +3 -1
  10. package/components/controls/phi-media-picker-control.d.ts +9 -0
  11. package/components/controls/phi-media-picker-control.js +1 -1
  12. package/components/controls/phi-popover-control.js +4 -1
  13. package/components/controls/phi-table-control.d.ts +7 -1
  14. package/components/controls/phi-table-control.js +26 -11
  15. package/components/forms/form-descriptor-field-check.d.ts +18 -0
  16. package/components/forms/form-descriptor-field-check.js +41 -0
  17. package/components/forms/form-descriptor-runtime-client.js +11 -10
  18. package/components/forms/form-record-source.d.ts +38 -0
  19. package/components/forms/form-record-source.js +48 -0
  20. package/components/forms/shared-form-descriptors.d.ts +0 -34
  21. package/components/forms/shared-form-descriptors.js +0 -6
  22. package/components/forms/shared-form-ids.d.ts +1 -1
  23. package/components/forms/shared-form-ids.js +1 -1
  24. package/components/media/media-settings-labels.d.ts +1 -0
  25. package/components/media/media-settings-labels.js +2 -0
  26. package/components/media/media-upload-flow.d.ts +62 -5
  27. package/components/media/media-upload-flow.js +62 -24
  28. package/components/media/phi-area-upload-widget.d.ts +44 -1
  29. package/components/media/phi-area-upload-widget.js +32 -7
  30. package/components/media/phi-media-picker-binding.d.ts +41 -33
  31. package/components/media/phi-media-picker-binding.js +2 -1
  32. package/components/media/phi-media-upload.d.ts +10 -3
  33. package/components/media/phi-media-upload.js +11 -8
  34. package/components/media/use-media-library-add-picker.d.ts +33 -32
  35. package/components/overlays/phi-overlay-container-client.js +11 -9
  36. package/components/regions/presets/phi-settings-page-shell-tree.d.ts +7 -0
  37. package/components/regions/presets/phi-settings-page-shell-tree.js +3 -3
  38. package/components/shell/phi-icon-names.d.ts +3 -0
  39. package/components/shell/phi-icon-names.js +3 -0
  40. package/components/shell/phi-icon.d.ts +5 -7
  41. package/components/shell/phi-icon.js +8 -21
  42. package/components/shell/phi-widget-icon.js +1 -0
  43. package/components/tables/client/phi-table-binding-params.d.ts +24 -0
  44. package/components/tables/client/phi-table-binding-params.js +39 -0
  45. package/components/tables/client/phi-table-binding.d.ts +1 -3
  46. package/components/tables/client/phi-table-binding.js +5 -9
  47. package/components/widgets/client/html-editor-link-node.d.ts +12 -0
  48. package/components/widgets/client/html-editor-link-node.js +60 -0
  49. package/components/widgets/client/html-editor.js +10 -6
  50. package/components/widgets/client/shared/phi-button-icons.d.ts +6 -4
  51. package/components/widgets/client/shared/phi-button-icons.js +8 -12
  52. package/components/widgets/client/shared/phi-collection-binding-params.d.ts +8 -0
  53. package/components/widgets/client/shared/phi-collection-binding-params.js +13 -0
  54. package/components/widgets/client/shared/phi-collection-provider.d.ts +11 -1
  55. package/components/widgets/client/shared/phi-collection-provider.js +5 -0
  56. package/components/widgets/client/shared/phi-collection-view-binding.d.ts +1 -0
  57. package/components/widgets/client/shared/phi-collection-view-binding.js +33 -26
  58. package/components/widgets/client/shared/phi-command-buttons.d.ts +16 -0
  59. package/components/widgets/client/shared/phi-command-buttons.js +9 -1
  60. package/components/widgets/label-sets/admin-users.d.ts +1 -0
  61. package/components/widgets/label-sets/admin-users.js +2 -0
  62. package/components/widgets/label-sets/builder-modules.js +4 -0
  63. package/components/widgets/label-sets/profile.d.ts +0 -16
  64. package/components/widgets/label-sets/profile.js +0 -37
  65. package/components/widgets/label-sets/registration.d.ts +0 -1
  66. package/components/widgets/label-sets/registration.js +0 -2
  67. package/components/widgets/label-sets/revisions.js +2 -0
  68. package/components/widgets/label-sets/signals.js +2 -0
  69. package/components/widgets/label-types/builder-modules.d.ts +4 -0
  70. package/components/widgets/label-types/builder-modules.js +2 -0
  71. package/components/widgets/label-types/revisions.d.ts +2 -0
  72. package/components/widgets/label-types/revisions.js +2 -1
  73. package/components/widgets/label-types/signals.d.ts +2 -0
  74. package/components/widgets/label-types/signals.js +1 -0
  75. package/components/widgets/shared/widget-failure-audience.d.ts +7 -0
  76. package/components/widgets/shared/widget-failure-audience.js +21 -0
  77. package/components/widgets/shared/widget-failure-client.js +5 -2
  78. package/components/widgets/shared/widget-failure-notice-client.d.ts +6 -0
  79. package/components/widgets/shared/widget-failure-notice-client.js +10 -0
  80. package/components/widgets/shared/widget-failure-notice.d.ts +6 -0
  81. package/components/widgets/shared/widget-failure-notice.js +17 -0
  82. package/components/widgets/shared/widget-failure-staff.d.ts +3 -0
  83. package/components/widgets/shared/widget-failure-staff.js +18 -0
  84. package/components/widgets/shared/widget-failure.d.ts +9 -6
  85. package/components/widgets/shared/widget-failure.js +0 -9
  86. package/components/widgets/shared/widget-failure.server.d.ts +4 -2
  87. package/components/widgets/shared/widget-failure.server.js +8 -3
  88. package/constants/cms-widget-types.d.ts +1 -0
  89. package/constants/cms-widget-types.js +3 -0
  90. package/constants/customer-file.d.ts +12 -3
  91. package/constants/customer-file.js +12 -3
  92. package/constants/runtime-module-ownership.js +5 -3
  93. package/constants/site-address.d.ts +9 -0
  94. package/constants/site-address.js +10 -0
  95. package/constants/table-loading.d.ts +14 -0
  96. package/constants/table-loading.js +14 -0
  97. package/constants.d.ts +2 -1
  98. package/constants.js +3 -1
  99. package/gateway/site-cms-write-validation.js +19 -3
  100. package/gateway/site-proxy.d.ts +12 -0
  101. package/gateway/site-proxy.js +20 -0
  102. package/helpers/announced-action.d.ts +17 -0
  103. package/helpers/announced-action.js +29 -0
  104. package/helpers/phi-metadata.d.ts +0 -8
  105. package/helpers/phi-metadata.js +1 -10
  106. package/helpers/phi-site-description.d.ts +11 -0
  107. package/helpers/phi-site-description.js +13 -0
  108. package/helpers/preset-form-check.d.ts +14 -0
  109. package/helpers/preset-form-check.js +12 -0
  110. package/helpers/preset-table-check.d.ts +19 -15
  111. package/helpers/preset-table-check.js +33 -39
  112. package/helpers/record-widget-binding.d.ts +10 -0
  113. package/helpers/record-widget-binding.js +35 -0
  114. package/helpers/record-widget.d.ts +1 -10
  115. package/helpers/record-widget.js +4 -33
  116. package/helpers/table-widget-binding.d.ts +12 -0
  117. package/helpers/table-widget-binding.js +296 -0
  118. package/helpers/tree-widget-binding.d.ts +19 -0
  119. package/helpers/tree-widget-binding.js +72 -0
  120. package/helpers/typed-confirmation.d.ts +9 -0
  121. package/helpers/typed-confirmation.js +13 -0
  122. package/helpers/widget-binding-check.d.ts +22 -0
  123. package/helpers/widget-binding-check.js +91 -0
  124. package/module-page-check.d.ts +2 -0
  125. package/module-page-check.js +2 -0
  126. package/net/phi-next-proxy.d.ts +7 -0
  127. package/net/phi-next-proxy.js +1 -1
  128. package/next/root-route.js +2 -1
  129. package/package.json +27 -14
  130. package/plugins/runtime-modules/accounting/ids.d.ts +7 -4
  131. package/plugins/runtime-modules/accounting/ids.js +14 -3
  132. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.d.ts +21 -9
  133. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +29 -15
  134. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +11 -8
  135. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +206 -137
  136. package/plugins/runtime-modules/app/client-data-providers.js +1 -1
  137. package/plugins/runtime-modules/app/data-providers.d.ts +14 -69
  138. package/plugins/runtime-modules/app/data-providers.js +19 -54
  139. package/plugins/runtime-modules/app/definition.d.ts +8 -80
  140. package/plugins/runtime-modules/app/forms.d.ts +1 -16
  141. package/plugins/runtime-modules/app/forms.js +0 -59
  142. package/plugins/runtime-modules/app/ids.d.ts +2 -1
  143. package/plugins/runtime-modules/app/ids.js +3 -2
  144. package/plugins/runtime-modules/app/module.d.ts +8 -80
  145. package/plugins/runtime-modules/app/services/addresses-collection.d.ts +59 -0
  146. package/plugins/runtime-modules/app/services/{addresses-table.js → addresses-collection.js} +23 -19
  147. package/plugins/runtime-modules/app/trees/account-addresses-panel.d.ts +10 -6
  148. package/plugins/runtime-modules/app/trees/account-addresses-panel.js +37 -73
  149. package/plugins/runtime-modules/app/trees/addresses-label-set.d.ts +0 -5
  150. package/plugins/runtime-modules/app/trees/addresses-label-set.js +2 -6
  151. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.d.ts +1 -2
  152. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.js +1 -17
  153. package/plugins/runtime-modules/app/trees/profile-label-set.d.ts +0 -2
  154. package/plugins/runtime-modules/app/trees/profile-label-set.js +2 -14
  155. package/plugins/runtime-modules/area-contributions/admin.d.ts +1 -1
  156. package/plugins/runtime-modules/area-contributions/admin.js +2 -0
  157. package/plugins/runtime-modules/asset/trees/phi-default-admin-media-settings-page-tree.js +5 -0
  158. package/plugins/runtime-modules/avatar/addresses.d.ts +1 -1
  159. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +16 -6
  160. package/plugins/runtime-modules/builder/clients/inspector-image-field.js +3 -1
  161. package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +3 -1
  162. package/plugins/runtime-modules/builder/controller/signal-wiring-controller.js +5 -1
  163. package/plugins/runtime-modules/builder/signal-wiring-options.js +9 -2
  164. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +5 -0
  165. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +14 -1
  166. package/plugins/runtime-modules/cdn/authoring-widgets.d.ts +3 -0
  167. package/plugins/runtime-modules/cdn/authoring-widgets.js +7 -0
  168. package/plugins/runtime-modules/cdn/authoring.d.ts +1 -0
  169. package/plugins/runtime-modules/cdn/authoring.js +8 -0
  170. package/plugins/runtime-modules/cdn/bytes.d.ts +5 -0
  171. package/plugins/runtime-modules/cdn/bytes.js +17 -0
  172. package/plugins/runtime-modules/cdn/client-data-providers.d.ts +7 -0
  173. package/plugins/runtime-modules/cdn/client-data-providers.js +9 -0
  174. package/plugins/runtime-modules/cdn/data-providers.d.ts +134 -0
  175. package/plugins/runtime-modules/cdn/data-providers.js +117 -0
  176. package/plugins/runtime-modules/cdn/definition.d.ts +140 -0
  177. package/plugins/runtime-modules/cdn/definition.js +23 -0
  178. package/plugins/runtime-modules/cdn/ids.d.ts +18 -0
  179. package/plugins/runtime-modules/cdn/ids.js +20 -0
  180. package/plugins/runtime-modules/cdn/module.d.ts +131 -0
  181. package/plugins/runtime-modules/cdn/module.js +4 -0
  182. package/plugins/runtime-modules/cdn/platform.d.ts +25 -0
  183. package/plugins/runtime-modules/cdn/platform.js +73 -0
  184. package/plugins/runtime-modules/cdn/presets.d.ts +2 -0
  185. package/plugins/runtime-modules/cdn/presets.js +20 -0
  186. package/plugins/runtime-modules/cdn/server.d.ts +1 -0
  187. package/plugins/runtime-modules/cdn/server.js +14 -0
  188. package/plugins/runtime-modules/cdn/services/table.d.ts +11 -0
  189. package/plugins/runtime-modules/cdn/services/table.js +296 -0
  190. package/plugins/runtime-modules/cdn/services/upload.d.ts +20 -0
  191. package/plugins/runtime-modules/cdn/services/upload.js +146 -0
  192. package/plugins/runtime-modules/cdn/table-params.d.ts +10 -0
  193. package/plugins/runtime-modules/cdn/table-params.js +10 -0
  194. package/plugins/runtime-modules/cdn/trees/admin-cdn-label-set.d.ts +95 -0
  195. package/plugins/runtime-modules/cdn/trees/admin-cdn-label-set.js +156 -0
  196. package/plugins/runtime-modules/cdn/trees/phi-default-admin-cdn-page-tree.d.ts +18 -0
  197. package/plugins/runtime-modules/cdn/trees/phi-default-admin-cdn-page-tree.js +479 -0
  198. package/plugins/runtime-modules/cdn/widgets/upload/client.d.ts +12 -0
  199. package/plugins/runtime-modules/cdn/widgets/upload/client.js +138 -0
  200. package/plugins/runtime-modules/cdn/widgets/upload/config.d.ts +29 -0
  201. package/plugins/runtime-modules/cdn/widgets/upload/config.js +43 -0
  202. package/plugins/runtime-modules/cdn/widgets/upload/label-types.d.ts +24 -0
  203. package/plugins/runtime-modules/cdn/widgets/upload/label-types.js +1 -0
  204. package/plugins/runtime-modules/cdn/widgets/upload/labels.d.ts +4 -0
  205. package/plugins/runtime-modules/cdn/widgets/upload/labels.js +72 -0
  206. package/plugins/runtime-modules/cdn/widgets/upload/plugin.d.ts +3 -0
  207. package/plugins/runtime-modules/cdn/widgets/upload/plugin.js +7 -0
  208. package/plugins/runtime-modules/cdn/widgets/upload/server.d.ts +8 -0
  209. package/plugins/runtime-modules/cdn/widgets/upload/server.js +17 -0
  210. package/plugins/runtime-modules/cdn/widgets.d.ts +2 -0
  211. package/plugins/runtime-modules/cdn/widgets.js +13 -0
  212. package/plugins/runtime-modules/client-authoring-providers/admin.d.ts +1 -1
  213. package/plugins/runtime-modules/client-authoring-providers/admin.js +6 -0
  214. package/plugins/runtime-modules/client-manifests/admin.js +11 -1
  215. package/plugins/runtime-modules/client-manifests/common.js +6 -0
  216. package/plugins/runtime-modules/core/widgets/card/config.d.ts +1 -1
  217. package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +1 -1
  218. package/plugins/runtime-modules/core/widgets/collection-view/client.js +5 -2
  219. package/plugins/runtime-modules/core/widgets/collection-view/config.js +8 -0
  220. package/plugins/runtime-modules/core/widgets/collection-view/site-address-binding.d.ts +55 -0
  221. package/plugins/runtime-modules/core/widgets/collection-view/site-address-binding.js +175 -0
  222. package/plugins/runtime-modules/core/widgets/collection-view/site-address-tiles.d.ts +48 -0
  223. package/plugins/runtime-modules/core/widgets/collection-view/site-address-tiles.js +67 -0
  224. package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +1 -1
  225. package/plugins/runtime-modules/core/widgets/description/config.d.ts +1 -1
  226. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +1 -1
  227. package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +1 -1
  228. package/plugins/runtime-modules/core/widgets/form/config.d.ts +1 -1
  229. package/plugins/runtime-modules/core/widgets/form/config.js +14 -1
  230. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +1 -1
  231. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +1 -1
  232. package/plugins/runtime-modules/core/widgets/record/client.js +2 -6
  233. package/plugins/runtime-modules/core/widgets/result/config.d.ts +1 -1
  234. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +1 -1
  235. package/plugins/runtime-modules/core/widgets/table/client.js +36 -52
  236. package/plugins/runtime-modules/core/widgets/table/config.d.ts +3 -3
  237. package/plugins/runtime-modules/core/widgets/table/config.js +3 -0
  238. package/plugins/runtime-modules/core/widgets/thread-conversation/client.js +2 -2
  239. package/plugins/runtime-modules/core/widgets/thread-conversation/config.d.ts +6 -2
  240. package/plugins/runtime-modules/core/widgets/thread-conversation/config.js +6 -1
  241. package/plugins/runtime-modules/core/widgets/thread-widget-config.d.ts +10 -0
  242. package/plugins/runtime-modules/core/widgets/thread-widget-config.js +6 -0
  243. package/plugins/runtime-modules/core/widgets/tree/client.js +6 -6
  244. package/plugins/runtime-modules/localization/trees/editor-translations-widget-label-set.d.ts +2 -0
  245. package/plugins/runtime-modules/localization/trees/editor-translations-widget-label-set.js +2 -0
  246. package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +5 -0
  247. package/plugins/runtime-modules/revisions/controller/binding.d.ts +37 -0
  248. package/plugins/runtime-modules/revisions/controller/binding.js +75 -0
  249. package/plugins/runtime-modules/revisions/controller/client.d.ts +5 -0
  250. package/plugins/runtime-modules/revisions/controller/client.js +74 -50
  251. package/plugins/runtime-modules/revisions/controller/definition.d.ts +5 -0
  252. package/plugins/runtime-modules/revisions/controller/definition.js +10 -0
  253. package/plugins/runtime-modules/revisions/forms.js +1 -1
  254. package/plugins/runtime-modules/revisions/page-ids.d.ts +1 -1
  255. package/plugins/runtime-modules/revisions/page-ids.js +4 -1
  256. package/plugins/runtime-modules/revisions/services/options.js +14 -4
  257. package/plugins/runtime-modules/revisions/services/table.js +41 -21
  258. package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +76 -3
  259. package/plugins/runtime-modules/theme/controller/runtime.js +14 -2
  260. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +39 -13
  261. package/plugins/runtime-modules/threads/client-data-providers.js +5 -0
  262. package/plugins/runtime-modules/threads/controller/client.js +62 -2
  263. package/plugins/runtime-modules/threads/controller/definition.js +48 -0
  264. package/plugins/runtime-modules/threads/data-providers.d.ts +22 -37
  265. package/plugins/runtime-modules/threads/data-providers.js +35 -24
  266. package/plugins/runtime-modules/threads/definition.d.ts +22 -37
  267. package/plugins/runtime-modules/threads/ids.d.ts +2 -0
  268. package/plugins/runtime-modules/threads/ids.js +2 -0
  269. package/plugins/runtime-modules/threads/services/customer-file-addresses.d.ts +30 -0
  270. package/plugins/runtime-modules/threads/services/customer-file-addresses.js +59 -0
  271. package/plugins/runtime-modules/threads/services/customer-file-read.d.ts +22 -0
  272. package/plugins/runtime-modules/threads/services/customer-file-read.js +101 -0
  273. package/plugins/runtime-modules/threads/services/customer-file-table.d.ts +14 -80
  274. package/plugins/runtime-modules/threads/services/customer-file-table.js +27 -112
  275. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.d.ts +4 -0
  276. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.js +4 -0
  277. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.js +15 -0
  278. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +5 -0
  279. package/server-helpers/runtime.js +0 -1
  280. package/styles/controls.css +4 -2
  281. package/styles/layout.css +7 -0
  282. package/theme/phi-antd-token-resolver.d.ts +8 -0
  283. package/theme/phi-antd-token-resolver.js +10 -0
  284. package/theme/phi-theme-color.d.ts +19 -0
  285. package/theme/phi-theme-color.js +42 -0
  286. package/theme/phi-theme-gradients.js +4 -22
  287. package/theme/phi-theme-palette-defaults.d.ts +16 -0
  288. package/theme/phi-theme-palette-defaults.js +103 -0
  289. package/types/cms-plugins.d.ts +6 -1
  290. package/types/collection-provider.d.ts +27 -0
  291. package/types/collection-signal-values.d.ts +2 -0
  292. package/types/collection-signal-values.js +23 -0
  293. package/types/collection-view-widget.d.ts +9 -0
  294. package/types/core-widget-placements.d.ts +6 -0
  295. package/types/signals.d.ts +2 -0
  296. package/types/signals.js +2 -0
  297. package/types/table-widget.d.ts +17 -3
  298. package/types/table-widget.js +0 -282
  299. package/types/tree-widget.d.ts +0 -1
  300. package/types/tree-widget.js +0 -60
  301. package/types/widget-runtime.d.ts +0 -1
  302. package/types.d.ts +1 -1
  303. package/types.js +1 -1
  304. package/plugins/runtime-modules/app/services/addresses-table.d.ts +0 -135
@@ -0,0 +1,72 @@
1
+ /**
2
+ * A Tree's config against the resource its Provider declares: the node fields it shows and edits, its
3
+ * binding tools, search, every Provider action in its scope with the confirmation the resource asks for,
4
+ * and drag and drop (TREES.md).
5
+ *
6
+ * Checked where a config is made, as the Table's is (`helpers/table-widget-binding.ts`): a package's
7
+ * preset tests (`checkPhiPresetTables`), `pnpm verify` and the Builder's save, never in the browser or
8
+ * the render of a request. A live Tree trusts the config it is handed.
9
+ */
10
+ export function validatePhiTreeWidgetBinding(config, resource) {
11
+ const errors = [];
12
+ const node = config.presentation?.node;
13
+ const features = config.features ?? {};
14
+ const fieldKeys = new Set(resource.fields.map((field) => field.key));
15
+ for (const key of [
16
+ node?.titleFieldKey,
17
+ node?.descriptionFieldKey,
18
+ node?.iconFieldKey,
19
+ ].filter((value) => Boolean(value))) {
20
+ if (!fieldKeys.has(key))
21
+ errors.push(`Tree presentation references undeclared field "${key}".`);
22
+ }
23
+ for (const tool of features.tools?.bindingFields ?? []) {
24
+ if (!resource.bindingFields?.some((field) => field.key === tool.key)) {
25
+ errors.push(`Tree binding tool references undeclared field "${tool.key}".`);
26
+ }
27
+ }
28
+ if (features.search?.enabled && !resource.query.search) {
29
+ errors.push("Tree search requires Provider query search capability.");
30
+ }
31
+ if (features.editing?.enabled) {
32
+ for (const key of [
33
+ node?.titleEditor?.enabled ? node.titleFieldKey : null,
34
+ node?.iconEditor?.enabled ? node.iconFieldKey : null,
35
+ ].filter((value) => Boolean(value))) {
36
+ if (!resource.fields.find((field) => field.key === key)?.mutable) {
37
+ errors.push(`Tree editor requires mutable Provider field "${key}".`);
38
+ }
39
+ }
40
+ }
41
+ const providerActions = new Map(resource.actions?.map((action) => [action.key, action]) ?? []);
42
+ for (const [scope, actions] of [
43
+ ["resource", features.actions?.toolbar ?? []],
44
+ ["node", features.actions?.node ?? []],
45
+ ["selection", features.actions?.selection ?? []],
46
+ ]) {
47
+ for (const action of actions) {
48
+ const capability = providerActions.get(action.key);
49
+ if (action.execution === "provider" && !capability) {
50
+ errors.push(`Tree action references undeclared Provider capability "${action.key}".`);
51
+ }
52
+ else if (action.execution === "provider" && capability?.scope !== scope) {
53
+ errors.push(`Tree action "${action.key}" requires Provider scope "${scope}".`);
54
+ }
55
+ else if (action.execution === "provider" && capability?.confirmation === "required" && !action.confirm) {
56
+ errors.push(`Tree action "${action.key}" requires confirmation presentation.`);
57
+ }
58
+ }
59
+ }
60
+ const dndMode = features.dnd?.mode ?? "none";
61
+ if ((dndMode === "source" || dndMode === "source-reorder") && !resource.dragSources?.length) {
62
+ errors.push("Tree source DnD requires a declared Provider drag source.");
63
+ }
64
+ const payloadType = features.dnd?.payloadType;
65
+ if (payloadType && !resource.dragSources?.some((source) => source.payloadType === payloadType)) {
66
+ errors.push(`Tree DnD references undeclared payload type "${payloadType}".`);
67
+ }
68
+ if ((dndMode === "reorder" || dndMode === "source-reorder") && resource.nodeOrdering !== "tree") {
69
+ errors.push("Tree reorder DnD requires Provider nodeOrdering \"tree\".");
70
+ }
71
+ return errors;
72
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Whether what somebody typed to confirm an act is the word they were asked for.
3
+ *
4
+ * A threshold against reflex, not a password: the word is shown to them to type (or copy), so its case
5
+ * and the spaces a copy brings along around it are not what is being checked. Asked to write "app" out,
6
+ * "App" or " app " was refused -- the person had done exactly what was asked and was told it was wrong.
7
+ * Every type-to-confirm in this package compares through here, so they all accept the same answers.
8
+ */
9
+ export declare function matchesPhiTypedConfirmation(typed: unknown, expected: string): boolean;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Whether what somebody typed to confirm an act is the word they were asked for.
3
+ *
4
+ * A threshold against reflex, not a password: the word is shown to them to type (or copy), so its case
5
+ * and the spaces a copy brings along around it are not what is being checked. Asked to write "app" out,
6
+ * "App" or " app " was refused -- the person had done exactly what was asked and was told it was wrong.
7
+ * Every type-to-confirm in this package compares through here, so they all accept the same answers.
8
+ */
9
+ export function matchesPhiTypedConfirmation(typed, expected) {
10
+ const word = expected.trim();
11
+ return typeof typed === "string" && word.length > 0 &&
12
+ typed.trim().toLocaleLowerCase("en") === word.toLocaleLowerCase("en");
13
+ }
@@ -0,0 +1,22 @@
1
+ import type { PhiCmsConfigField } from "../types/cms-plugins";
2
+ /** A data Provider as its Module declares it: the key a Widget binds to and the resources it offers. */
3
+ export type PhiBindingCheckProvider = {
4
+ key: string;
5
+ kind?: string;
6
+ resources?: readonly unknown[];
7
+ };
8
+ /**
9
+ * What a Table, a Tree or a record Widget's config breaks of the resource it is bound to, as messages; an
10
+ * empty list for any other Widget, for one without a source, and for one bound to a Provider not among
11
+ * `providers` -- a Provider whose Module is not there is the Area's state, not the config's. `config` is
12
+ * the config the Widget reads: a preset's as it states it, or what the Widget's own `parseConfig` made
13
+ * of a stored one.
14
+ */
15
+ export declare function checkPhiWidgetBinding(widgetType: string, config: Readonly<Record<string, unknown>>, providers: ReadonlyMap<string, PhiBindingCheckProvider>): string[];
16
+ /**
17
+ * Every icon a Widget's config names in a field its Inspector offers as an icon (`type: "icon"`, in a
18
+ * collection's entries too) that `PhiIcon` does not know: a Button's, a Collection View action's, a
19
+ * Card's. A live Widget no longer looks a name up before it draws it, so an unknown one is refused where
20
+ * the author chose it, by the Builder's save.
21
+ */
22
+ export declare function checkPhiWidgetConfigIcons(fields: readonly PhiCmsConfigField[] | undefined, config: Readonly<Record<string, unknown>>): string[];
@@ -0,0 +1,91 @@
1
+ import { PhiCmsWidgetType } from "../constants/cms-widget-types";
2
+ import { isPhiIconNameKnown } from "../components/shell/phi-icon-names";
3
+ import { readPhiDotPath } from "./dot-path";
4
+ import { isPhiRecord } from "./is-record";
5
+ import { validatePhiRecordWidgetBinding } from "./record-widget-binding";
6
+ import { validatePhiTableWidgetBinding } from "./table-widget-binding";
7
+ import { validatePhiTreeWidgetBinding } from "./tree-widget-binding";
8
+ function findResource(provider, resourceKey) {
9
+ return provider.resources?.find((candidate) => candidate.resourceKey === resourceKey);
10
+ }
11
+ function readSource(config) {
12
+ const source = config.source;
13
+ return isPhiRecord(source) && typeof source.providerKey === "string" ? source : null;
14
+ }
15
+ /** The icons a Table's actions and binding tools draw: those shown with an icon, named and unknown. */
16
+ function checkTableIcons(config) {
17
+ const findings = [];
18
+ const actions = [
19
+ ...(config.features?.actions?.toolbar ?? []),
20
+ ...(config.features?.actions?.row ?? []),
21
+ ...(config.features?.actions?.bulk ?? []),
22
+ ];
23
+ for (const action of actions) {
24
+ if (action.display !== "label" && action.icon && !isPhiIconNameKnown(action.icon.trim())) {
25
+ findings.push(`Table action "${action.key}" names the icon "${action.icon}", which PhiIcon does not know.`);
26
+ }
27
+ }
28
+ for (const tool of config.features?.tools?.bindingFields ?? []) {
29
+ if (tool.create?.display !== "label" && tool.create?.icon && !isPhiIconNameKnown(tool.create.icon.trim())) {
30
+ findings.push(`Table binding field "${tool.key}" names the create icon "${tool.create.icon}", which PhiIcon does not know.`);
31
+ }
32
+ }
33
+ return findings;
34
+ }
35
+ /**
36
+ * What a Table, a Tree or a record Widget's config breaks of the resource it is bound to, as messages; an
37
+ * empty list for any other Widget, for one without a source, and for one bound to a Provider not among
38
+ * `providers` -- a Provider whose Module is not there is the Area's state, not the config's. `config` is
39
+ * the config the Widget reads: a preset's as it states it, or what the Widget's own `parseConfig` made
40
+ * of a stored one.
41
+ */
42
+ export function checkPhiWidgetBinding(widgetType, config, providers) {
43
+ if (widgetType !== PhiCmsWidgetType.Table &&
44
+ widgetType !== PhiCmsWidgetType.Tree &&
45
+ widgetType !== PhiCmsWidgetType.Record) {
46
+ return [];
47
+ }
48
+ const source = readSource(config);
49
+ const provider = source ? providers.get(source.providerKey) : undefined;
50
+ if (!source || !provider)
51
+ return [];
52
+ const kind = widgetType === PhiCmsWidgetType.Table ? "Table" : widgetType === PhiCmsWidgetType.Tree ? "Tree" : "Record";
53
+ const missing = `${kind} is bound to resource "${String(source.resourceKey)}", which "${provider.key}" does not declare.`;
54
+ if (widgetType === PhiCmsWidgetType.Tree) {
55
+ const resource = findResource(provider, source.resourceKey);
56
+ return resource ? validatePhiTreeWidgetBinding(config, resource) : [missing];
57
+ }
58
+ const resource = findResource(provider, source.resourceKey);
59
+ if (!resource)
60
+ return [missing];
61
+ if (widgetType === PhiCmsWidgetType.Record) {
62
+ return validatePhiRecordWidgetBinding(config, resource);
63
+ }
64
+ const table = config;
65
+ return [...validatePhiTableWidgetBinding(table, resource), ...checkTableIcons(table)];
66
+ }
67
+ function checkFieldIcons(fields, value, where, findings) {
68
+ for (const field of fields) {
69
+ const fieldValue = readPhiDotPath(value, field.key);
70
+ if (field.type === "icon") {
71
+ const name = typeof fieldValue === "string" ? fieldValue.trim() : "";
72
+ if (name && !isPhiIconNameKnown(name)) {
73
+ findings.push(`${where}${field.key} names the icon "${name}", which PhiIcon does not know.`);
74
+ }
75
+ }
76
+ else if (field.type === "collection" && Array.isArray(fieldValue)) {
77
+ fieldValue.forEach((item, index) => checkFieldIcons(field.itemFields, item, `${where}${field.key}[${index}].`, findings));
78
+ }
79
+ }
80
+ }
81
+ /**
82
+ * Every icon a Widget's config names in a field its Inspector offers as an icon (`type: "icon"`, in a
83
+ * collection's entries too) that `PhiIcon` does not know: a Button's, a Collection View action's, a
84
+ * Card's. A live Widget no longer looks a name up before it draws it, so an unknown one is refused where
85
+ * the author chose it, by the Builder's save.
86
+ */
87
+ export function checkPhiWidgetConfigIcons(fields, config) {
88
+ const findings = [];
89
+ checkFieldIcons(fields ?? [], config, "", findings);
90
+ return findings;
91
+ }
@@ -15,8 +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";
20
21
  export { checkPhiEmbeddableTables, checkPhiPresetTables } from "./helpers/preset-table-check";
21
22
  export { checkPhiPresetTreeContract, type PhiPresetTreeContractFinding } from "./helpers/preset-tree-contract-check";
23
+ export { validatePhiTreeWidgetBinding } from "./helpers/tree-widget-binding";
22
24
  export { checkPhiRouteAddresses, type PhiRouteAddressFinding, type PhiRouteAddressSubject } from "./helpers/route-address-check";
@@ -15,8 +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";
20
21
  export { checkPhiEmbeddableTables, checkPhiPresetTables } from "./helpers/preset-table-check";
21
22
  export { checkPhiPresetTreeContract } from "./helpers/preset-tree-contract-check";
23
+ export { validatePhiTreeWidgetBinding } from "./helpers/tree-widget-binding";
22
24
  export { checkPhiRouteAddresses } from "./helpers/route-address-check";
@@ -19,6 +19,13 @@ export type PhiNextProxyConfig = {
19
19
  tags?: string[];
20
20
  };
21
21
  };
22
+ /**
23
+ * A request that may take longer than `timeoutMs` because its body is large, answered `null`: it is
24
+ * bounded by the browser alone -- aborted when the browser goes away (`request.signal`) -- and not
25
+ * by the clock. Every request this does not name keeps `timeoutMs`. A door names only what it must:
26
+ * a part of a CDN upload is 16 MiB on whatever link the person has, and eight seconds cut it.
27
+ */
28
+ unboundedRequest?: (request: NextRequest, path: PhiProxyPath) => boolean;
22
29
  };
23
30
  export type PhiNextProxyHandler = (request: NextRequest, context: PhiNextProxyRouteContext) => Promise<Response>;
24
31
  export type PhiNextProxyHandlers = {
@@ -84,7 +84,7 @@ async function proxyRequest(request, path, config) {
84
84
  ...(hasBody ? { body: request.body, duplex: "half" } : {}),
85
85
  ...(config.buildFetchInit?.(request, path) ?? { cache: "no-store" }),
86
86
  redirect: "manual",
87
- signal: AbortSignal.timeout(config.timeoutMs),
87
+ signal: config.unboundedRequest?.(request, path) ? request.signal : AbortSignal.timeout(config.timeoutMs),
88
88
  });
89
89
  const durationMs = Date.now() - startedAt;
90
90
  if (durationMs >= config.timeoutMs / 2 && targetResponse.ok) {
@@ -9,7 +9,8 @@ import { collectPhiThemeDescriptorContributions } from "../plugins/runtime-modul
9
9
  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
- import { buildPhiRootMetadata, resolvePhiSiteDescription } from "../helpers/phi-metadata";
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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phis/ui",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -501,7 +501,7 @@
501
501
  "peerDependencies": {
502
502
  "@ant-design/icons": "^6.3.2",
503
503
  "antd": "^6.7.1",
504
- "next": "^16.2.11",
504
+ "next": "^16.4.6",
505
505
  "react": "^19.2.8",
506
506
  "react-dom": "^19.2.8"
507
507
  },
@@ -512,24 +512,37 @@
512
512
  "@dnd-kit/core": "^6.3.1",
513
513
  "@dnd-kit/sortable": "^10.0.0",
514
514
  "@dnd-kit/utilities": "^3.2.2",
515
- "@iconify/react": "^6.0.2",
516
- "@lexical/history": "0.50.0",
517
- "@lexical/html": "0.50.0",
518
- "@lexical/link": "0.50.0",
519
- "@lexical/list": "0.50.0",
520
- "@lexical/react": "0.50.0",
521
- "@lexical/rich-text": "0.50.0",
522
- "@lexical/selection": "0.50.0",
523
- "@lexical/utils": "0.50.0",
524
- "@phis/contracts": "^0.8.11",
515
+ "@iconify/react": "^6.0.4",
516
+ "@lexical/history": "0.53.0",
517
+ "@lexical/html": "0.53.0",
518
+ "@lexical/link": "0.53.0",
519
+ "@lexical/list": "0.53.0",
520
+ "@lexical/react": "0.53.0",
521
+ "@lexical/rich-text": "0.53.0",
522
+ "@lexical/selection": "0.53.0",
523
+ "@lexical/utils": "0.53.0",
524
+ "@phis/contracts": "^0.8.12",
525
525
  "dayjs": "^1.11.23",
526
526
  "dom-serializer": "^2.0.0",
527
527
  "htmlparser2": "^10.1.0",
528
- "lexical": "0.50.0",
528
+ "lexical": "0.53.0",
529
529
  "remark-gfm": "^4.0.1",
530
530
  "remark-parse": "^11.0.0",
531
- "sanitize-html": "2.17.7",
531
+ "sanitize-html": "2.18.2",
532
532
  "server-only": "^0.0.1",
533
533
  "unified": "^11.0.5"
534
+ },
535
+ "phis": {
536
+ "testedWith": {
537
+ "@ant-design/icons": "6.3.4",
538
+ "@types/node": "26.6.6",
539
+ "@types/react": "19.3.0",
540
+ "@types/react-dom": "19.3.0",
541
+ "antd": "6.7.2",
542
+ "next": "16.4.6",
543
+ "react": "19.3.1",
544
+ "react-dom": "19.3.1",
545
+ "typescript": "6.0.3"
546
+ }
534
547
  }
535
548
  }
@@ -24,9 +24,12 @@ export declare const PHI_ACCOUNTING_PRODUCTS_PAGE_WIDGET_IDS: Readonly<Record<"w
24
24
  * Accounting Area beside the product directory.
25
25
  */
26
26
  export declare const PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET_KEY = "accounting-customer-file-page";
27
- /** The three Tables, the conversation, and the Reply dialog with its Form -- every one named in a route by another. */
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
+ */
28
31
  export declare const PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_IDS: {
29
- widgets: Readonly<Record<"widgetConversation" | "widgetReplyForm" | "widgetReplyCommands" | "widgetPerson" | "widgetAddresses" | "widgetThreads", import("@phis/contracts/cms").PhiCmsInstanceId>>;
30
- overlays: Readonly<Record<"overlayReply", import("@phis/contracts/cms").PhiCmsInstanceId>>;
31
- layouts: Readonly<Record<"layoutReply" | "layoutReplyFooter", import("@phis/contracts/cms").PhiCmsInstanceId>>;
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>>;
32
35
  };
@@ -37,16 +37,27 @@ const PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET = {
37
37
  ownerModuleId: PHI_ACCOUNTING_RUNTIME_MODULE_ID,
38
38
  presetKey: PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET_KEY,
39
39
  };
40
- /** The three Tables, the conversation, and the Reply dialog with its Form -- every one named in a route by another. */
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
+ */
41
44
  export const PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_IDS = {
42
45
  widgets: createPhiPresetCmsInstanceIdMap(PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET, [
43
46
  "widgetPerson",
44
47
  "widgetAddresses",
48
+ "widgetFile",
45
49
  "widgetThreads",
46
50
  "widgetConversation",
51
+ "widgetNoteForm",
52
+ "widgetNoteCommands",
47
53
  "widgetReplyForm",
48
54
  "widgetReplyCommands",
49
55
  ]),
50
- overlays: createPhiPresetCmsInstanceIdMap(PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET, ["overlayReply"]),
51
- layouts: createPhiPresetCmsInstanceIdMap(PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET, ["layoutReply", "layoutReplyFooter"]),
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
+ ]),
52
63
  };
@@ -10,6 +10,7 @@ export declare function getPhiAccountingCustomerFilePageLabels(options: PhiGloba
10
10
  picker: string;
11
11
  pickerHint: string;
12
12
  empty: string;
13
+ footer: string;
13
14
  columns: {
14
15
  displayName: string;
15
16
  name: string;
@@ -23,11 +24,6 @@ export declare function getPhiAccountingCustomerFilePageLabels(options: PhiGloba
23
24
  title: string;
24
25
  label: string;
25
26
  empty: string;
26
- columns: {
27
- name: string;
28
- address: string;
29
- purposes: string;
30
- };
31
27
  purposes: {
32
28
  billing: string;
33
29
  shipping: string;
@@ -39,6 +35,8 @@ export declare function getPhiAccountingCustomerFilePageLabels(options: PhiGloba
39
35
  title: string;
40
36
  label: string;
41
37
  empty: string;
38
+ emptyHint: string;
39
+ footer: string;
42
40
  columns: {
43
41
  subject: string;
44
42
  kind: string;
@@ -46,7 +44,6 @@ export declare function getPhiAccountingCustomerFilePageLabels(options: PhiGloba
46
44
  activity: string;
47
45
  };
48
46
  kinds: {
49
- file: string;
50
47
  direct: string;
51
48
  group: string;
52
49
  crossGroup: string;
@@ -59,8 +56,23 @@ export declare function getPhiAccountingCustomerFilePageLabels(options: PhiGloba
59
56
  locked: string;
60
57
  };
61
58
  };
62
- fileSubject: string;
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
+ };
63
73
  ownFile: string;
64
- noteLabel: string;
65
- replySendLabel: string;
74
+ reply: {
75
+ title: string;
76
+ send: string;
77
+ };
66
78
  }>;
@@ -4,7 +4,7 @@ import { definePhiRuntimeModuleLabelSet, definePhiMessageLabel, getPhiLabelSet }
4
4
  import { PHI_ACCOUNTING_RUNTIME_MODULE_IDENTITY } from "../ids";
5
5
  /**
6
6
  * What the customer file in the Accounting Area says: the member picker, the person's details, their
7
- * addresses, the file and the conversations they are in, and the Reply dialog. The conversation words
7
+ * addresses, their file with its note dialog, the conversations they are in with the Reply dialog. The conversation words
8
8
  * are its own rather than the conversations Page's, since a Module does not read another's Label Set.
9
9
  */
10
10
  const PHI_CUSTOMER_FILE_PAGE_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_ACCOUNTING_RUNTIME_MODULE_IDENTITY, {
@@ -20,6 +20,9 @@ const PHI_CUSTOMER_FILE_PAGE_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_ACCO
20
20
  person_picker_hint: definePhiMessageLabel("Search by name, e-mail address or telephone number."),
21
21
  person_empty: definePhiMessageLabel("Choose a member to open their file."),
22
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",
23
26
  column_display_name: "Shown as",
24
27
  column_name: "Name",
25
28
  column_company: "Company",
@@ -29,18 +32,22 @@ const PHI_CUSTOMER_FILE_PAGE_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_ACCO
29
32
  addresses_title: "Addresses",
30
33
  addresses_label: "customer addresses",
31
34
  addresses_empty: definePhiMessageLabel("No address on file."),
32
- column_address_name: "Name",
33
- column_address: "Address",
34
- column_purposes: "Used for",
35
35
  purpose_billing: "Billing",
36
36
  purpose_shipping: "Shipping",
37
37
  purpose_default_billing: "Default billing",
38
38
  purpose_default_shipping: "Default shipping",
39
- threads_title: "File and conversations",
40
- threads_label: "customer threads",
41
- threads_empty: definePhiMessageLabel("Choose a member to see their file and the conversations they are in."),
42
- file_subject: "Customer file",
43
- kind_file: "File",
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",
44
51
  kind_direct: "Direct",
45
52
  kind_group: "Group",
46
53
  kind_cross_group: "Between groups",
@@ -53,7 +60,7 @@ const PHI_CUSTOMER_FILE_PAGE_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_ACCO
53
60
  state_open: { text: "Open", ctx: "Web UI label, state" },
54
61
  state_archived: "Archived",
55
62
  state_locked: "Locked",
56
- note_label: "Internal note",
63
+ reply_title: "Reply",
57
64
  reply_send_label: "Send",
58
65
  },
59
66
  });
@@ -69,6 +76,7 @@ export async function getPhiAccountingCustomerFilePageLabels(options) {
69
76
  picker: labels.person_picker,
70
77
  pickerHint: labels.person_picker_hint,
71
78
  empty: labels.person_empty,
79
+ footer: labels.person_footer,
72
80
  columns: {
73
81
  displayName: labels.column_display_name,
74
82
  name: labels.column_name,
@@ -82,7 +90,6 @@ export async function getPhiAccountingCustomerFilePageLabels(options) {
82
90
  title: labels.addresses_title,
83
91
  label: labels.addresses_label,
84
92
  empty: labels.addresses_empty,
85
- columns: { name: labels.column_address_name, address: labels.column_address, purposes: labels.column_purposes },
86
93
  purposes: {
87
94
  billing: labels.purpose_billing,
88
95
  shipping: labels.purpose_shipping,
@@ -94,6 +101,8 @@ export async function getPhiAccountingCustomerFilePageLabels(options) {
94
101
  title: labels.threads_title,
95
102
  label: labels.threads_label,
96
103
  empty: labels.threads_empty,
104
+ emptyHint: labels.threads_empty_hint,
105
+ footer: labels.threads_footer,
97
106
  columns: {
98
107
  subject: labels.column_subject,
99
108
  kind: labels.column_kind,
@@ -101,7 +110,6 @@ export async function getPhiAccountingCustomerFilePageLabels(options) {
101
110
  activity: labels.column_activity,
102
111
  },
103
112
  kinds: {
104
- file: labels.kind_file,
105
113
  direct: labels.kind_direct,
106
114
  group: labels.kind_group,
107
115
  crossGroup: labels.kind_cross_group,
@@ -114,9 +122,15 @@ export async function getPhiAccountingCustomerFilePageLabels(options) {
114
122
  locked: labels.state_locked,
115
123
  },
116
124
  },
117
- fileSubject: labels.file_subject,
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 },
118
133
  ownFile: labels.own_file,
119
- noteLabel: labels.note_label,
120
- replySendLabel: labels.reply_send_label,
134
+ reply: { title: labels.reply_title, send: labels.reply_send_label },
121
135
  };
122
136
  }
@@ -6,15 +6,18 @@ import type { PhiBlockRuntime } from "../../../../types";
6
6
  *
7
7
  * A Page of the Accounting Module, beside the product directory, built from what the conversations Page
8
8
  * already is and bound by Foundation names only (`constants/customer-file.ts`,
9
- * `constants/threads-controller-address.ts`): the Table Provider and the Conversations Controller are the
10
- * conversations Module's, which is active in the Accounting Area by default and has to be for this Page
11
- * to read anything. The person Table's filter is Core's member picker
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
12
  * (the `site-members` options with Core's search, which matches names, e-mail addresses and telephone
13
- * numbers); its query goes to the addresses and the threads Tables, so one choice fills all three. The
14
- * threads Table lists the person's file first, and choosing a row is the conversations Page's choreography
15
- * unchanged: the Conversations Controller makes the selection a thread, the conversation reads it, and its
16
- * Reply opens Core's Reply Form in a dialog -- with the internal note offered, which is every message of a
17
- * file anyway.
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.
18
21
  *
19
22
  * The Page is for the holders of `accounting` (`PHI_ACCOUNTING_CUSTOMER_FILE_ACCESS`), who read every
20
23
  * field, the addresses included. A viewer the Area admits without it is told so in the Page and nothing is