@phis/ui 0.7.8 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/components/controls/phi-address-control.d.ts +23 -0
  2. package/components/controls/phi-address-control.js +43 -0
  3. package/components/controls/phi-color-control.d.ts +3 -1
  4. package/components/controls/phi-color-control.js +2 -2
  5. package/components/controls/phi-country-select-control.d.ts +22 -0
  6. package/components/controls/phi-country-select-control.js +16 -0
  7. package/components/controls/phi-dialog-control.d.ts +1 -1
  8. package/components/controls/phi-drawer-control-adapter.d.ts +1 -1
  9. package/components/controls/phi-drawer-control-adapter.js +5 -3
  10. package/components/controls/phi-drawer-control.d.ts +7 -5
  11. package/components/controls/phi-float-button-control.d.ts +8 -1
  12. package/components/controls/phi-float-button-control.js +19 -3
  13. package/components/controls/phi-form-control.js +52 -8
  14. package/components/controls/phi-modal-control-adapter.d.ts +1 -1
  15. package/components/controls/phi-modal-control-adapter.js +14 -37
  16. package/components/controls/phi-modal-control.d.ts +5 -5
  17. package/components/controls/phi-options-provider.d.ts +1 -0
  18. package/components/controls/phi-options-provider.js +1 -0
  19. package/components/controls/phi-overlay-control-contract.d.ts +52 -17
  20. package/components/controls/phi-overlay-control-contract.js +55 -30
  21. package/components/controls/phi-reveal-once-dialog-control.d.ts +21 -0
  22. package/components/controls/phi-reveal-once-dialog-control.js +52 -0
  23. package/components/controls/phi-reveal-once-dialog-labels.d.ts +10 -0
  24. package/components/controls/phi-reveal-once-dialog-labels.js +5 -0
  25. package/components/forms/flags-field.d.ts +22 -0
  26. package/components/forms/flags-field.js +58 -0
  27. package/components/forms/form-option-flags.d.ts +20 -0
  28. package/components/forms/form-option-flags.js +38 -0
  29. package/components/forms/form-provider-contract.d.ts +23 -0
  30. package/components/forms/form-provider-contract.js +36 -0
  31. package/components/forms/form-provider-registry.d.ts +5 -1
  32. package/components/forms/shared-form-provider-registry.js +13 -0
  33. package/components/forms/structured-field-labels.d.ts +24 -0
  34. package/components/forms/structured-field-labels.js +43 -0
  35. package/components/forms/structured-form-field-controls.d.ts +12 -0
  36. package/components/forms/structured-form-field-controls.js +65 -0
  37. package/components/overlays/phi-overlay-container-client.js +2 -2
  38. package/components/regions/phi-cms-region-shell.js +2 -2
  39. package/components/regions/presets/content-entry-editor-page-tree.js +12 -3
  40. package/components/regions/presets/phi-settings-page-shell-tree.d.ts +6 -2
  41. package/components/regions/presets/phi-settings-page-shell-tree.js +1 -1
  42. package/components/root/phi-root-theme-resolver.js +3 -0
  43. package/components/shell/phi-antd-icon.d.ts +1 -8
  44. package/components/shell/phi-antd-icon.js +1 -227
  45. package/components/shell/phi-icon-names.d.ts +19 -0
  46. package/components/shell/phi-icon-names.js +264 -0
  47. package/components/shell/phi-icon.d.ts +2 -11
  48. package/components/shell/phi-icon.js +4 -32
  49. package/components/widgets/client/shared/phi-command-buttons.d.ts +13 -2
  50. package/components/widgets/client/shared/phi-command-buttons.js +10 -4
  51. package/components/widgets/client/shared/phi-rendered-value.js +27 -3
  52. package/components/widgets/client/shared/phi-table-provider-refusal.d.ts +13 -0
  53. package/components/widgets/client/shared/phi-table-provider-refusal.js +13 -0
  54. package/components/widgets/config/background.d.ts +3 -2
  55. package/components/widgets/config/choice-shared.d.ts +10 -1
  56. package/components/widgets/config/choice-shared.js +8 -2
  57. package/components/widgets/label-sets/admin-locales.js +1 -1
  58. package/components/widgets/label-sets/admin-users.d.ts +2 -5
  59. package/components/widgets/label-sets/admin-users.js +4 -10
  60. package/components/widgets/label-sets/effects.js +2 -4
  61. package/components/widgets/label-sets/profile.d.ts +13 -0
  62. package/components/widgets/label-sets/profile.js +28 -0
  63. package/components/widgets/label-sets/search-results.js +2 -4
  64. package/components/widgets/label-sets/table.js +9 -0
  65. package/components/widgets/label-types/effects.d.ts +3 -2
  66. package/components/widgets/label-types/effects.js +1 -2
  67. package/components/widgets/label-types/search-results.d.ts +2 -2
  68. package/components/widgets/label-types/search-results.js +1 -2
  69. package/components/widgets/label-types/table.d.ts +3 -0
  70. package/components/widgets/label-types/table.js +2 -0
  71. package/components/widgets/server/builder-chrome.d.ts +4 -1
  72. package/components/widgets/server/builder-chrome.js +2 -2
  73. package/components/widgets/shared/markdown-body-client.d.ts +26 -0
  74. package/components/widgets/shared/markdown-body-client.js +31 -1
  75. package/components/widgets/shared/markdown-render.d.ts +10 -2
  76. package/components/widgets/shared/markdown-render.js +35 -13
  77. package/constants/countries.d.ts +9 -0
  78. package/constants/countries.js +28 -0
  79. package/constants/customer-file.d.ts +25 -0
  80. package/constants/customer-file.js +26 -0
  81. package/constants/record-field-kinds.d.ts +15 -0
  82. package/constants/record-field-kinds.js +13 -0
  83. package/constants/runtime-module-ownership.js +12 -0
  84. package/constants/runtime-render-client-types.d.ts +5 -0
  85. package/constants/runtime-render-client-types.js +5 -0
  86. package/{plugins/runtime-modules/threads/controller/address.js → constants/threads-controller-address.js} +1 -1
  87. package/constants.d.ts +1 -0
  88. package/constants.js +2 -0
  89. package/gateway/form-handler-request.d.ts +22 -0
  90. package/gateway/form-handler-request.js +40 -0
  91. package/gateway/label-set.d.ts +15 -2
  92. package/gateway/label-set.js +60 -22
  93. package/gateway/site-form-route.js +11 -2
  94. package/helpers/address-field.d.ts +43 -0
  95. package/helpers/address-field.js +68 -0
  96. package/helpers/cms-dialog.d.ts +5 -20
  97. package/helpers/cms-dialog.js +8 -13
  98. package/helpers/cms-page-catalog.d.ts +10 -0
  99. package/helpers/cms-page-catalog.js +19 -0
  100. package/helpers/cms-preset-nodes.d.ts +4 -4
  101. package/helpers/cms-preset-nodes.js +1 -1
  102. package/helpers/cms-region-keys.d.ts +1 -1
  103. package/helpers/country-names.d.ts +12 -0
  104. package/helpers/country-names.js +14 -0
  105. package/helpers/phi-metadata.d.ts +33 -1
  106. package/helpers/phi-metadata.js +62 -1
  107. package/helpers/preset-table-check.d.ts +34 -0
  108. package/helpers/preset-table-check.js +124 -0
  109. package/helpers/preset-text-source-check.d.ts +4 -1
  110. package/helpers/preset-text-source-check.js +6 -1
  111. package/helpers/preset-tree-contract-check.d.ts +3 -2
  112. package/helpers/preset-tree-contract-check.js +30 -5
  113. package/helpers/public-route-claims.d.ts +9 -1
  114. package/helpers/public-route-claims.js +23 -3
  115. package/helpers/record-fields.d.ts +1 -5
  116. package/helpers/record-fields.js +15 -6
  117. package/helpers/route-address-check.d.ts +22 -2
  118. package/helpers/route-address-check.js +29 -8
  119. package/helpers/site-address-row.d.ts +23 -0
  120. package/helpers/site-address-row.js +36 -0
  121. package/helpers/surface-style.d.ts +8 -1
  122. package/helpers/surface-style.js +12 -2
  123. package/helpers/thread-inbox-row.d.ts +20 -0
  124. package/helpers/thread-inbox-row.js +26 -0
  125. package/helpers/translation-format.d.ts +26 -0
  126. package/helpers/translation-format.js +31 -0
  127. package/module-labels.d.ts +1 -1
  128. package/module-labels.js +1 -1
  129. package/module-page-check.d.ts +1 -0
  130. package/module-page-check.js +1 -0
  131. package/module-records.d.ts +2 -2
  132. package/module-records.js +1 -0
  133. package/next/area-route.js +34 -1
  134. package/next/root-route.js +4 -5
  135. package/package.json +2 -2
  136. package/plugins/runtime-modules/accounting/customer-file-access.d.ts +11 -0
  137. package/plugins/runtime-modules/accounting/customer-file-access.js +12 -0
  138. package/plugins/runtime-modules/accounting/data-providers.js +1 -1
  139. package/plugins/runtime-modules/accounting/ids.d.ts +11 -0
  140. package/plugins/runtime-modules/accounting/ids.js +23 -0
  141. package/plugins/runtime-modules/accounting/presets.js +32 -5
  142. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.d.ts +66 -0
  143. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +122 -0
  144. package/plugins/runtime-modules/accounting/trees/accounting-products-label-set.js +2 -2
  145. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +26 -0
  146. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +381 -0
  147. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-products-page-tree.js +4 -0
  148. package/plugins/runtime-modules/app/client-data-providers.d.ts +7 -0
  149. package/plugins/runtime-modules/app/client-data-providers.js +9 -0
  150. package/plugins/runtime-modules/app/data-providers.d.ts +98 -0
  151. package/plugins/runtime-modules/app/data-providers.js +80 -0
  152. package/plugins/runtime-modules/app/definition.d.ts +131 -0
  153. package/plugins/runtime-modules/app/definition.js +2 -0
  154. package/plugins/runtime-modules/app/forms.d.ts +46 -1
  155. package/plugins/runtime-modules/app/forms.js +195 -1
  156. package/plugins/runtime-modules/app/ids.d.ts +7 -0
  157. package/plugins/runtime-modules/app/ids.js +8 -0
  158. package/plugins/runtime-modules/app/module.d.ts +131 -0
  159. package/plugins/runtime-modules/app/services/addresses-table.d.ts +135 -0
  160. package/plugins/runtime-modules/app/services/addresses-table.js +101 -0
  161. package/plugins/runtime-modules/app/trees/account-addresses-panel.d.ts +17 -0
  162. package/plugins/runtime-modules/app/trees/account-addresses-panel.js +179 -0
  163. package/plugins/runtime-modules/app/trees/addresses-label-set.d.ts +62 -0
  164. package/plugins/runtime-modules/app/trees/addresses-label-set.js +108 -0
  165. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.js +27 -2
  166. package/plugins/runtime-modules/app/trees/profile-label-set.d.ts +1 -0
  167. package/plugins/runtime-modules/app/trees/profile-label-set.js +3 -0
  168. package/plugins/runtime-modules/asset/presets.d.ts +4 -0
  169. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +4 -2
  170. package/plugins/runtime-modules/auth/trees/phi-auth-area-overlay-tree.server.js +4 -2
  171. package/plugins/runtime-modules/auth/trees/phi-default-admin-auth-settings-page-tree.js +2 -2
  172. package/plugins/runtime-modules/auth/widgets/logout/client.d.ts +1 -1
  173. package/plugins/runtime-modules/auth/widgets/logout/client.js +2 -2
  174. package/plugins/runtime-modules/auth/widgets/security/client.d.ts +5 -1
  175. package/plugins/runtime-modules/auth/widgets/security/client.js +12 -10
  176. package/plugins/runtime-modules/avatar/overlay-tree.server.js +1 -1
  177. package/plugins/runtime-modules/blog/presets.d.ts +4 -0
  178. package/plugins/runtime-modules/builder/clients/inspector-image-field.d.ts +2 -1
  179. package/plugins/runtime-modules/builder/clients/inspector-image-field.js +3 -2
  180. package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.d.ts +23 -0
  181. package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.js +38 -0
  182. package/plugins/runtime-modules/builder/clients/mode-switch.d.ts +4 -1
  183. package/plugins/runtime-modules/builder/clients/mode-switch.js +2 -15
  184. package/plugins/runtime-modules/builder/clients/pages-workspace.js +2 -0
  185. package/plugins/runtime-modules/builder/clients/runtime-module-authoring-boundary.js +2 -1
  186. package/plugins/runtime-modules/builder/controller/draft-status-controller.js +28 -1
  187. package/plugins/runtime-modules/builder/developer-workspace-types.d.ts +5 -0
  188. package/plugins/runtime-modules/builder/page-presets.server.d.ts +7 -0
  189. package/plugins/runtime-modules/builder/page-presets.server.js +10 -1
  190. package/plugins/runtime-modules/builder/persistence.js +4 -0
  191. package/plugins/runtime-modules/builder/public-route-collisions.js +8 -3
  192. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +3 -1
  193. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +33 -6
  194. package/plugins/runtime-modules/builder/widgets/chrome/config.d.ts +6 -4
  195. package/plugins/runtime-modules/builder/widgets/chrome/config.js +11 -1
  196. package/plugins/runtime-modules/builder/widgets/inspector-header/authoring.d.ts +2 -2
  197. package/plugins/runtime-modules/builder/widgets/inspector-header/plugin.d.ts +2 -2
  198. package/plugins/runtime-modules/builder/widgets/mode-switch/plugin.js +1 -1
  199. package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +2 -2
  200. package/plugins/runtime-modules/client-manifests/app.js +3 -0
  201. package/plugins/runtime-modules/client-manifests/builder.js +10 -0
  202. package/plugins/runtime-modules/content-entry-routes.d.ts +4 -0
  203. package/plugins/runtime-modules/contracts.js +31 -1
  204. package/plugins/runtime-modules/core/definition.d.ts +23 -0
  205. package/plugins/runtime-modules/core/form-providers.d.ts +23 -0
  206. package/plugins/runtime-modules/core/messaging/thread-inbox-table.d.ts +0 -17
  207. package/plugins/runtime-modules/core/messaging/thread-inbox-table.js +2 -23
  208. package/plugins/runtime-modules/core/widgets/card/config.d.ts +0 -1
  209. package/plugins/runtime-modules/core/widgets/card/config.js +0 -1
  210. package/plugins/runtime-modules/core/widgets/card/editor.js +1 -1
  211. package/plugins/runtime-modules/core/widgets/command-toolbar/client.js +3 -0
  212. package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +316 -1
  213. package/plugins/runtime-modules/core/widgets/command-toolbar/config.js +4 -4
  214. package/plugins/runtime-modules/core/widgets/dimension/config.d.ts +1 -1
  215. package/plugins/runtime-modules/core/widgets/float-button/client.js +4 -1
  216. package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +326 -3
  217. package/plugins/runtime-modules/core/widgets/float-button/config.js +5 -2
  218. package/plugins/runtime-modules/core/widgets/header-navigation/client.js +1 -1
  219. package/plugins/runtime-modules/core/widgets/length/config.d.ts +1 -1
  220. package/plugins/runtime-modules/core/widgets/markdown/plugin.js +20 -7
  221. package/plugins/runtime-modules/core/widgets/markdown/server.d.ts +6 -2
  222. package/plugins/runtime-modules/core/widgets/markdown/server.js +2 -2
  223. package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.d.ts +12 -0
  224. package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.js +68 -0
  225. package/plugins/runtime-modules/core/widgets/number-input/config.d.ts +1 -1
  226. package/plugins/runtime-modules/core/widgets/simple-text/config.js +1 -1
  227. package/plugins/runtime-modules/core/widgets/simple-text/plugin.js +2 -1
  228. package/plugins/runtime-modules/core/widgets/table/client.js +20 -5
  229. package/plugins/runtime-modules/core/widgets/table/config.js +6 -0
  230. package/plugins/runtime-modules/core/widgets/table/reader-query.d.ts +17 -0
  231. package/plugins/runtime-modules/core/widgets/table/reader-query.js +33 -0
  232. package/plugins/runtime-modules/dashboard/trees/dashboard-cards-page-tree.js +3 -1
  233. package/plugins/runtime-modules/descriptor-compiler.d.ts +19 -3
  234. package/plugins/runtime-modules/descriptor-compiler.js +44 -16
  235. package/plugins/runtime-modules/editor/presets.d.ts +4 -0
  236. package/plugins/runtime-modules/editor/trees/phi-default-editor-releases-page-tree.js +3 -1
  237. package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +5 -1
  238. package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +5 -1
  239. package/plugins/runtime-modules/localization/presets.d.ts +4 -0
  240. package/plugins/runtime-modules/localization/trees/phi-default-admin-locales-page-tree.js +3 -1
  241. package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +4 -2
  242. package/plugins/runtime-modules/news/presets.d.ts +4 -0
  243. package/plugins/runtime-modules/observability/trees/phi-default-admin-logs-page-tree.js +6 -2
  244. package/plugins/runtime-modules/resolver.js +17 -0
  245. package/plugins/runtime-modules/revisions/controller/client.js +13 -11
  246. package/plugins/runtime-modules/revisions/controller/draft-context-target.d.ts +25 -0
  247. package/plugins/runtime-modules/revisions/controller/draft-context-target.js +33 -0
  248. package/plugins/runtime-modules/revisions/presets.d.ts +4 -0
  249. package/plugins/runtime-modules/revisions/services/table.js +13 -4
  250. package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +3 -1
  251. package/plugins/runtime-modules/search/widgets/search-results/client.js +4 -2
  252. package/plugins/runtime-modules/theme/presets.d.ts +4 -0
  253. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +76 -4
  254. package/plugins/runtime-modules/theme/widgets/brand-controls/config.d.ts +3 -2
  255. package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +2 -2
  256. package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +19 -7
  257. package/plugins/runtime-modules/threads/client-data-providers.js +5 -0
  258. package/plugins/runtime-modules/threads/controller/definition.js +1 -1
  259. package/plugins/runtime-modules/threads/data-providers.d.ts +115 -2
  260. package/plugins/runtime-modules/threads/data-providers.js +85 -0
  261. package/plugins/runtime-modules/threads/definition.d.ts +115 -2
  262. package/plugins/runtime-modules/threads/definition.js +1 -1
  263. package/plugins/runtime-modules/threads/ids.d.ts +2 -0
  264. package/plugins/runtime-modules/threads/ids.js +3 -0
  265. package/plugins/runtime-modules/threads/services/customer-file-table.d.ts +192 -0
  266. package/plugins/runtime-modules/threads/services/customer-file-table.js +164 -0
  267. package/plugins/runtime-modules/threads/trees/phi-default-threads-page-tree.js +5 -3
  268. package/plugins/runtime-modules/user-management/client-data-providers.js +5 -0
  269. package/plugins/runtime-modules/user-management/data-providers.d.ts +159 -0
  270. package/plugins/runtime-modules/user-management/data-providers.js +101 -3
  271. package/plugins/runtime-modules/user-management/definition.d.ts +159 -0
  272. package/plugins/runtime-modules/user-management/ids.d.ts +9 -0
  273. package/plugins/runtime-modules/user-management/ids.js +9 -0
  274. package/plugins/runtime-modules/user-management/presets.js +17 -1
  275. package/plugins/runtime-modules/user-management/services/users-access-table.d.ts +378 -0
  276. package/plugins/runtime-modules/user-management/services/users-access-table.js +132 -0
  277. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.d.ts +86 -0
  278. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.js +118 -0
  279. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.d.ts +20 -0
  280. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.js +166 -0
  281. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +19 -18
  282. package/server-helpers/cms-page-record.d.ts +9 -1
  283. package/server-helpers/cms-page-record.js +11 -1
  284. package/server-helpers/cms-request.js +8 -5
  285. package/server-helpers/link-preview-image.d.ts +30 -0
  286. package/server-helpers/link-preview-image.js +57 -0
  287. package/server-helpers/search-text.js +3 -0
  288. package/server-helpers.d.ts +1 -1
  289. package/server-helpers.js +1 -1
  290. package/styles/shell.css +30 -6
  291. package/theme/phi-theme-composition.js +9 -0
  292. package/theme/phi-theme-inverse-ground.d.ts +39 -0
  293. package/theme/phi-theme-inverse-ground.js +103 -0
  294. package/theme/phi-theme-tokens.d.ts +2 -1
  295. package/theme/phi-theme-tokens.js +2 -0
  296. package/types/cms-module-descriptors.d.ts +14 -0
  297. package/types/cms-overlay.d.ts +13 -6
  298. package/types/cms-overlay.js +6 -22
  299. package/types/cms-plugins.d.ts +14 -2
  300. package/types/cms.d.ts +10 -0
  301. package/types/core-widget-placements.d.ts +3 -3
  302. package/types/link-preview.d.ts +19 -0
  303. package/types/link-preview.js +19 -0
  304. package/types/record-provider.d.ts +22 -1
  305. package/types/site-theme.d.ts +27 -0
  306. package/types/table-embed.d.ts +48 -0
  307. package/types/table-embed.js +1 -0
  308. package/types/table-widget.d.ts +14 -0
  309. package/types/widget-runtime.d.ts +3 -0
  310. package/types.d.ts +1 -0
  311. /package/{plugins/runtime-modules/threads/controller/address.d.ts → constants/threads-controller-address.d.ts} +0 -0
@@ -165,4 +165,163 @@ export declare const PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS: ({
165
165
  summaryFields?: undefined;
166
166
  actions?: undefined;
167
167
  })[];
168
+ } | {
169
+ key: `${string}/${string}`;
170
+ ownerModuleId: "@phis/ui/modules/user-management";
171
+ kind: "table";
172
+ executionMode: "live";
173
+ authoringMode: "none";
174
+ title: string;
175
+ description: string;
176
+ resources: ({
177
+ resourceKey: "addons";
178
+ title: string;
179
+ rowIdentityPath: string;
180
+ fields: ({
181
+ key: "fields" | "background" | "granted" | "effective" | "awaiting";
182
+ title: "fields" | "background" | "granted" | "effective" | "awaiting";
183
+ type: "enum[]";
184
+ options: {
185
+ value: "name" | "email" | "address" | "phone";
186
+ label: "name" | "email" | "address" | "phone";
187
+ }[];
188
+ } | {
189
+ key: string;
190
+ title: string;
191
+ type: "string";
192
+ required: true;
193
+ } | {
194
+ key: string;
195
+ title: string;
196
+ type: "datetime";
197
+ required?: undefined;
198
+ } | {
199
+ key: string;
200
+ title: string;
201
+ type: "number";
202
+ required?: undefined;
203
+ } | {
204
+ key: string;
205
+ title: string;
206
+ type: "boolean";
207
+ required?: undefined;
208
+ })[];
209
+ query: {
210
+ search: false;
211
+ filterFields: never[];
212
+ sorting: "none";
213
+ pagination: "none";
214
+ total?: undefined;
215
+ };
216
+ actions: ({
217
+ key: string;
218
+ title: string;
219
+ scope: "row";
220
+ intent: "write";
221
+ confirmation: "required";
222
+ disabledWhen: {
223
+ source: "row";
224
+ valuePath: string;
225
+ operator: "falsy";
226
+ };
227
+ } | {
228
+ key: string;
229
+ title: string;
230
+ scope: "row";
231
+ intent: "destructive";
232
+ confirmation: "required";
233
+ disabledWhen: {
234
+ source: "row";
235
+ valuePath: string;
236
+ operator: "falsy";
237
+ };
238
+ })[];
239
+ } | {
240
+ resourceKey: "retention";
241
+ title: string;
242
+ rowIdentityPath: string;
243
+ fields: ({
244
+ key: string;
245
+ title: string;
246
+ type: "string";
247
+ required: true;
248
+ mutable?: undefined;
249
+ constraints?: undefined;
250
+ } | {
251
+ key: string;
252
+ title: string;
253
+ type: "number";
254
+ mutable: true;
255
+ constraints: {
256
+ min: number;
257
+ max: number;
258
+ step: number;
259
+ precision: number;
260
+ };
261
+ required?: undefined;
262
+ })[];
263
+ query: {
264
+ search: false;
265
+ filterFields: never[];
266
+ sorting: "none";
267
+ pagination: "none";
268
+ total?: undefined;
269
+ };
270
+ actions?: undefined;
271
+ } | {
272
+ resourceKey: "log";
273
+ title: string;
274
+ rowIdentityPath: string;
275
+ fields: ({
276
+ key: string;
277
+ title: string;
278
+ type: "string";
279
+ required: true;
280
+ options?: undefined;
281
+ } | {
282
+ key: string;
283
+ title: string;
284
+ type: "datetime";
285
+ required?: undefined;
286
+ options?: undefined;
287
+ } | {
288
+ key: string;
289
+ title: string;
290
+ type: "string";
291
+ required?: undefined;
292
+ options?: undefined;
293
+ } | {
294
+ key: string;
295
+ title: string;
296
+ type: "enum";
297
+ options: {
298
+ value: string;
299
+ label: string;
300
+ }[];
301
+ required?: undefined;
302
+ } | {
303
+ key: string;
304
+ title: string;
305
+ type: "json";
306
+ required?: undefined;
307
+ options?: undefined;
308
+ } | {
309
+ key: string;
310
+ title: string;
311
+ type: "enum[]";
312
+ options: {
313
+ value: "name" | "email" | "address" | "phone";
314
+ label: "name" | "email" | "address" | "phone";
315
+ }[];
316
+ required?: undefined;
317
+ })[];
318
+ query: {
319
+ search: false;
320
+ filterFields: string[];
321
+ sorting: "none";
322
+ pagination: "offset";
323
+ total: false;
324
+ };
325
+ actions?: undefined;
326
+ })[];
168
327
  })[];
@@ -1,4 +1,5 @@
1
- import { PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS } from "./ids";
1
+ import { PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS, PHI_USER_MANAGEMENT_USERS_ACCESS_RESOURCE_KEYS } from "./ids";
2
+ import { PHIS_USER_FIELDS } from "@phis/contracts/users";
2
3
  import { PHI_USER_MANAGEMENT_RUNTIME_MODULE_ID } from "./ids";
3
4
  import { createPhiUserManagementControllerAddress } from "../../../plugins/runtime-modules/user-management/controller/address";
4
5
  export const PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS = [
@@ -61,7 +62,6 @@ export const PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS = [
61
62
  { key: "lastLoginAt", title: "Last login", type: "datetime" },
62
63
  { key: "createdAt", title: "Created", type: "datetime" },
63
64
  { key: "self", title: "Current user", type: "boolean" },
64
- { key: "medusaCustomerId", title: "Medusa customer", type: "string" },
65
65
  ],
66
66
  query: {
67
67
  search: true,
@@ -76,7 +76,6 @@ export const PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS = [
76
76
  disabledWhen: { match: "any", conditions: [
77
77
  { source: "controller", controllerAddress: createPhiUserManagementControllerAddress(), valuePath: "permissions.readOnly", operator: "truthy" },
78
78
  { source: "row", valuePath: "self", operator: "truthy" },
79
- { source: "row", valuePath: "medusaCustomerId", operator: "truthy" },
80
79
  ] },
81
80
  intent: "destructive",
82
81
  confirmation: "required",
@@ -103,4 +102,103 @@ export const PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS = [
103
102
  },
104
103
  ],
105
104
  },
105
+ /*
106
+ * What this Site lets Add-ons read of people with nobody acting (`users:v1` background access), how
107
+ * long it keeps the access log, and the log itself (phis-server `/api/site/admin/users-access`, Site
108
+ * Admin only; Core refuses everybody else whatever a Table offers). A grant is the Admin's decision per
109
+ * Add-on and Site, so the Table grants what the manifest asks, or withdraws it; it never widens it.
110
+ */
111
+ {
112
+ key: PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS.usersAccess,
113
+ ownerModuleId: PHI_USER_MANAGEMENT_RUNTIME_MODULE_ID,
114
+ kind: "table",
115
+ executionMode: "live",
116
+ authoringMode: "none",
117
+ title: "People data access",
118
+ description: "Which Add-ons read people in the background, the access log and how long it is kept.",
119
+ resources: [
120
+ {
121
+ resourceKey: PHI_USER_MANAGEMENT_USERS_ACCESS_RESOURCE_KEYS.addons,
122
+ title: "Add-ons reading people",
123
+ rowIdentityPath: "addonId",
124
+ fields: [
125
+ { key: "addonId", title: "Add-on", type: "string", required: true },
126
+ ...["fields", "background", "granted", "effective", "awaiting"].map((key) => ({
127
+ key,
128
+ title: key,
129
+ type: "enum[]",
130
+ options: PHIS_USER_FIELDS.map((value) => ({ value, label: value })),
131
+ })),
132
+ { key: "grantedAt", title: "Granted", type: "datetime" },
133
+ { key: "grantedByUserId", title: "Granted by", type: "number" },
134
+ // What the two acts apply to: something asked and not granted, and a grant to withdraw.
135
+ { key: "hasAwaiting", title: "Fields awaiting a grant", type: "boolean" },
136
+ { key: "hasGrant", title: "Granted", type: "boolean" },
137
+ ],
138
+ query: { search: false, filterFields: [], sorting: "none", pagination: "none" },
139
+ actions: [
140
+ {
141
+ key: "grant",
142
+ title: "Grant what is asked",
143
+ scope: "row",
144
+ intent: "write",
145
+ confirmation: "required",
146
+ disabledWhen: { source: "row", valuePath: "hasAwaiting", operator: "falsy" },
147
+ },
148
+ {
149
+ key: "revoke",
150
+ title: "Withdraw",
151
+ scope: "row",
152
+ intent: "destructive",
153
+ confirmation: "required",
154
+ disabledWhen: { source: "row", valuePath: "hasGrant", operator: "falsy" },
155
+ },
156
+ ],
157
+ },
158
+ {
159
+ // One row, so the number is edited where it is read, as a quota is on the Media settings.
160
+ resourceKey: PHI_USER_MANAGEMENT_USERS_ACCESS_RESOURCE_KEYS.retention,
161
+ title: "Access log retention",
162
+ rowIdentityPath: "id",
163
+ fields: [
164
+ { key: "id", title: "ID", type: "string", required: true },
165
+ { key: "days", title: "Days kept", type: "number", mutable: true, constraints: { min: 1, max: 3650, step: 1, precision: 0 } },
166
+ ],
167
+ query: { search: false, filterFields: [], sorting: "none", pagination: "none" },
168
+ },
169
+ {
170
+ resourceKey: PHI_USER_MANAGEMENT_USERS_ACCESS_RESOURCE_KEYS.log,
171
+ title: "Access log",
172
+ rowIdentityPath: "key",
173
+ fields: [
174
+ { key: "key", title: "Entry", type: "string", required: true },
175
+ { key: "at", title: "At", type: "datetime" },
176
+ { key: "addonId", title: "Add-on", type: "string" },
177
+ { key: "actor", title: "Acting", type: "string" },
178
+ {
179
+ key: "road",
180
+ title: "Road",
181
+ type: "enum",
182
+ options: ["staff", "self", "background", "checkout"].map((value) => ({ value, label: value })),
183
+ },
184
+ {
185
+ key: "operation",
186
+ title: "Operation",
187
+ type: "enum",
188
+ options: ["describe", "addresses", "createAddress", "fileOf", "customerFile"].map((value) => ({ value, label: value })),
189
+ },
190
+ { key: "subjects", title: "Subjects", type: "json" },
191
+ { key: "addressIds", title: "Addresses", type: "json" },
192
+ {
193
+ key: "fields",
194
+ title: "Fields",
195
+ type: "enum[]",
196
+ options: PHIS_USER_FIELDS.map((value) => ({ value, label: value })),
197
+ },
198
+ ],
199
+ // Newest first and no count: Core pages the log and says nothing of how long it is.
200
+ query: { search: false, filterFields: ["subject", "addonId"], sorting: "none", pagination: "offset", total: false },
201
+ },
202
+ ],
203
+ },
106
204
  ];
@@ -193,6 +193,165 @@ export declare const PHI_USER_MANAGEMENT_RUNTIME_MODULE_DEFINITION: {
193
193
  summaryFields?: undefined;
194
194
  actions?: undefined;
195
195
  })[];
196
+ } | {
197
+ key: `${string}/${string}`;
198
+ ownerModuleId: "@phis/ui/modules/user-management";
199
+ kind: "table";
200
+ executionMode: "live";
201
+ authoringMode: "none";
202
+ title: string;
203
+ description: string;
204
+ resources: ({
205
+ resourceKey: "addons";
206
+ title: string;
207
+ rowIdentityPath: string;
208
+ fields: ({
209
+ key: "fields" | "background" | "granted" | "effective" | "awaiting";
210
+ title: "fields" | "background" | "granted" | "effective" | "awaiting";
211
+ type: "enum[]";
212
+ options: {
213
+ value: "name" | "email" | "address" | "phone";
214
+ label: "name" | "email" | "address" | "phone";
215
+ }[];
216
+ } | {
217
+ key: string;
218
+ title: string;
219
+ type: "string";
220
+ required: true;
221
+ } | {
222
+ key: string;
223
+ title: string;
224
+ type: "datetime";
225
+ required?: undefined;
226
+ } | {
227
+ key: string;
228
+ title: string;
229
+ type: "number";
230
+ required?: undefined;
231
+ } | {
232
+ key: string;
233
+ title: string;
234
+ type: "boolean";
235
+ required?: undefined;
236
+ })[];
237
+ query: {
238
+ search: false;
239
+ filterFields: never[];
240
+ sorting: "none";
241
+ pagination: "none";
242
+ total?: undefined;
243
+ };
244
+ actions: ({
245
+ key: string;
246
+ title: string;
247
+ scope: "row";
248
+ intent: "write";
249
+ confirmation: "required";
250
+ disabledWhen: {
251
+ source: "row";
252
+ valuePath: string;
253
+ operator: "falsy";
254
+ };
255
+ } | {
256
+ key: string;
257
+ title: string;
258
+ scope: "row";
259
+ intent: "destructive";
260
+ confirmation: "required";
261
+ disabledWhen: {
262
+ source: "row";
263
+ valuePath: string;
264
+ operator: "falsy";
265
+ };
266
+ })[];
267
+ } | {
268
+ resourceKey: "retention";
269
+ title: string;
270
+ rowIdentityPath: string;
271
+ fields: ({
272
+ key: string;
273
+ title: string;
274
+ type: "string";
275
+ required: true;
276
+ mutable?: undefined;
277
+ constraints?: undefined;
278
+ } | {
279
+ key: string;
280
+ title: string;
281
+ type: "number";
282
+ mutable: true;
283
+ constraints: {
284
+ min: number;
285
+ max: number;
286
+ step: number;
287
+ precision: number;
288
+ };
289
+ required?: undefined;
290
+ })[];
291
+ query: {
292
+ search: false;
293
+ filterFields: never[];
294
+ sorting: "none";
295
+ pagination: "none";
296
+ total?: undefined;
297
+ };
298
+ actions?: undefined;
299
+ } | {
300
+ resourceKey: "log";
301
+ title: string;
302
+ rowIdentityPath: string;
303
+ fields: ({
304
+ key: string;
305
+ title: string;
306
+ type: "string";
307
+ required: true;
308
+ options?: undefined;
309
+ } | {
310
+ key: string;
311
+ title: string;
312
+ type: "datetime";
313
+ required?: undefined;
314
+ options?: undefined;
315
+ } | {
316
+ key: string;
317
+ title: string;
318
+ type: "string";
319
+ required?: undefined;
320
+ options?: undefined;
321
+ } | {
322
+ key: string;
323
+ title: string;
324
+ type: "enum";
325
+ options: {
326
+ value: string;
327
+ label: string;
328
+ }[];
329
+ required?: undefined;
330
+ } | {
331
+ key: string;
332
+ title: string;
333
+ type: "json";
334
+ required?: undefined;
335
+ options?: undefined;
336
+ } | {
337
+ key: string;
338
+ title: string;
339
+ type: "enum[]";
340
+ options: {
341
+ value: "name" | "email" | "address" | "phone";
342
+ label: "name" | "email" | "address" | "phone";
343
+ }[];
344
+ required?: undefined;
345
+ })[];
346
+ query: {
347
+ search: false;
348
+ filterFields: string[];
349
+ sorting: "none";
350
+ pagination: "offset";
351
+ total: false;
352
+ };
353
+ actions?: undefined;
354
+ })[];
196
355
  })[];
197
356
  moduleId: "@phis/ui/modules/user-management";
198
357
  };
@@ -12,4 +12,13 @@ export declare const PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS: {
12
12
  readonly table: `${string}/${string}`;
13
13
  readonly addonRoleOptions: `${string}/${string}`;
14
14
  readonly addonRoleChoiceOptions: `${string}/${string}`;
15
+ /** What the Site lets Add-ons read of people (`users:v1`): the grants, the log and how long it is kept. */
16
+ readonly usersAccess: `${string}/${string}`;
15
17
  };
18
+ /** The three resources of the people-data access Provider. */
19
+ export declare const PHI_USER_MANAGEMENT_USERS_ACCESS_RESOURCE_KEYS: {
20
+ readonly addons: "addons";
21
+ readonly retention: "retention";
22
+ readonly log: "log";
23
+ };
24
+ export declare const PHI_USER_MANAGEMENT_USERS_ACCESS_PAGE_PRESET_KEY = "admin-users-access-page";
@@ -14,4 +14,13 @@ export const PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS = {
14
14
  table: createPhiSharedRuntimeDataProviderKey("tables", "user-management"),
15
15
  addonRoleOptions: createPhiSharedRuntimeDataProviderKey("options", "user-management-addon-roles"),
16
16
  addonRoleChoiceOptions: createPhiSharedRuntimeDataProviderKey("options", "user-management-addon-role-choices"),
17
+ /** What the Site lets Add-ons read of people (`users:v1`): the grants, the log and how long it is kept. */
18
+ usersAccess: createPhiSharedRuntimeDataProviderKey("tables", "user-management-users-access"),
17
19
  };
20
+ /** The three resources of the people-data access Provider. */
21
+ export const PHI_USER_MANAGEMENT_USERS_ACCESS_RESOURCE_KEYS = {
22
+ addons: "addons",
23
+ retention: "retention",
24
+ log: "log",
25
+ };
26
+ export const PHI_USER_MANAGEMENT_USERS_ACCESS_PAGE_PRESET_KEY = "admin-users-access-page";
@@ -1,5 +1,5 @@
1
1
  import { buildPhiSidebarRoutePresetDescriptor } from "../sidebar-route";
2
- import { PHI_USER_MANAGEMENT_RUNTIME_MODULE_ID } from "./ids";
2
+ import { PHI_USER_MANAGEMENT_RUNTIME_MODULE_ID, PHI_USER_MANAGEMENT_USERS_ACCESS_PAGE_PRESET_KEY } from "./ids";
3
3
  export const PHI_USER_MANAGEMENT_RUNTIME_MODULE_ROUTES = [
4
4
  buildPhiSidebarRoutePresetDescriptor({
5
5
  area: "admin",
@@ -18,4 +18,20 @@ export const PHI_USER_MANAGEMENT_RUNTIME_MODULE_ROUTES = [
18
18
  loadTree: ({ page, runtime }) => import("./trees/phi-default-admin-users-page-tree")
19
19
  .then((module) => module.buildPhiDefaultAdminUsersPageTree({ page, runtime })),
20
20
  }),
21
+ /*
22
+ * What Add-ons may read of people, in the Admin's Settings: the entry is a Site Admin's, as the routes
23
+ * behind it are (`/api/site/admin/users-access`). Beside Users, because it is about the same people.
24
+ */
25
+ buildPhiSidebarRoutePresetDescriptor({
26
+ area: "admin",
27
+ anchor: "settings",
28
+ ownerModuleId: PHI_USER_MANAGEMENT_RUNTIME_MODULE_ID,
29
+ presetKey: PHI_USER_MANAGEMENT_USERS_ACCESS_PAGE_PRESET_KEY,
30
+ title: "People data",
31
+ path: "/settings/people-data",
32
+ itemKey: "@phis/ui/modules/user-management/nav/admin/settings/people-data",
33
+ icon: "antd:safety-certificate",
34
+ loadTree: ({ page, runtime }) => import("./trees/phi-default-admin-users-access-page-tree")
35
+ .then((module) => module.buildPhiDefaultAdminUsersAccessPageTree({ page, runtime })),
36
+ }),
21
37
  ];