@phis/ui 0.7.7 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (344) hide show
  1. package/components/controls/phi-address-control.d.ts +23 -0
  2. package/components/controls/phi-address-control.js +43 -0
  3. package/components/controls/phi-color-control.d.ts +3 -1
  4. package/components/controls/phi-color-control.js +2 -2
  5. package/components/controls/phi-country-select-control.d.ts +22 -0
  6. package/components/controls/phi-country-select-control.js +16 -0
  7. package/components/controls/phi-dialog-control.d.ts +1 -1
  8. package/components/controls/phi-drawer-control-adapter.d.ts +1 -1
  9. package/components/controls/phi-drawer-control-adapter.js +5 -3
  10. package/components/controls/phi-drawer-control.d.ts +7 -5
  11. package/components/controls/phi-float-button-control.d.ts +8 -1
  12. package/components/controls/phi-float-button-control.js +19 -3
  13. package/components/controls/phi-form-control.js +64 -9
  14. package/components/controls/phi-modal-control-adapter.d.ts +1 -1
  15. package/components/controls/phi-modal-control-adapter.js +14 -37
  16. package/components/controls/phi-modal-control.d.ts +5 -5
  17. package/components/controls/phi-options-provider.d.ts +1 -0
  18. package/components/controls/phi-options-provider.js +1 -0
  19. package/components/controls/phi-overlay-control-contract.d.ts +52 -17
  20. package/components/controls/phi-overlay-control-contract.js +55 -30
  21. package/components/controls/phi-reveal-once-dialog-control.d.ts +21 -0
  22. package/components/controls/phi-reveal-once-dialog-control.js +52 -0
  23. package/components/controls/phi-reveal-once-dialog-labels.d.ts +10 -0
  24. package/components/controls/phi-reveal-once-dialog-labels.js +5 -0
  25. package/components/forms/extended-form-field-controls.d.ts +1 -1
  26. package/components/forms/extended-form-field-controls.js +23 -7
  27. package/components/forms/flags-field.d.ts +22 -0
  28. package/components/forms/flags-field.js +58 -0
  29. package/components/forms/form-option-flags.d.ts +20 -0
  30. package/components/forms/form-option-flags.js +38 -0
  31. package/components/forms/form-provider-contract.d.ts +28 -0
  32. package/components/forms/form-provider-contract.js +45 -2
  33. package/components/forms/form-provider-registry.d.ts +11 -1
  34. package/components/forms/money-field-currency-key.d.ts +6 -0
  35. package/components/forms/money-field-currency-key.js +14 -0
  36. package/components/forms/money-field.d.ts +26 -3
  37. package/components/forms/money-field.js +54 -4
  38. package/components/forms/shared-form-provider-registry.js +13 -0
  39. package/components/forms/structured-field-labels.d.ts +24 -0
  40. package/components/forms/structured-field-labels.js +43 -0
  41. package/components/forms/structured-form-field-controls.d.ts +12 -0
  42. package/components/forms/structured-form-field-controls.js +65 -0
  43. package/components/overlays/phi-overlay-container-client.js +2 -2
  44. package/components/regions/phi-cms-region-shell.js +2 -2
  45. package/components/regions/presets/content-entry-editor-page-tree.js +12 -3
  46. package/components/regions/presets/navigation-redirect.d.ts +4 -1
  47. package/components/regions/presets/navigation-redirect.js +6 -3
  48. package/components/regions/presets/phi-settings-page-shell-tree.d.ts +6 -2
  49. package/components/regions/presets/phi-settings-page-shell-tree.js +1 -1
  50. package/components/root/phi-root-theme-resolver.js +3 -0
  51. package/components/shell/phi-antd-icon.d.ts +1 -8
  52. package/components/shell/phi-antd-icon.js +1 -227
  53. package/components/shell/phi-icon-names.d.ts +19 -0
  54. package/components/shell/phi-icon-names.js +264 -0
  55. package/components/shell/phi-icon.d.ts +2 -11
  56. package/components/shell/phi-icon.js +4 -32
  57. package/components/widgets/client/shared/phi-command-buttons.d.ts +13 -2
  58. package/components/widgets/client/shared/phi-command-buttons.js +10 -4
  59. package/components/widgets/client/shared/phi-rendered-value.js +32 -6
  60. package/components/widgets/client/shared/phi-table-provider-refusal.d.ts +13 -0
  61. package/components/widgets/client/shared/phi-table-provider-refusal.js +13 -0
  62. package/components/widgets/config/background.d.ts +3 -2
  63. package/components/widgets/config/choice-shared.d.ts +10 -1
  64. package/components/widgets/config/choice-shared.js +8 -2
  65. package/components/widgets/label-sets/admin-locales.js +1 -1
  66. package/components/widgets/label-sets/admin-users.d.ts +2 -5
  67. package/components/widgets/label-sets/admin-users.js +4 -10
  68. package/components/widgets/label-sets/effects.js +2 -4
  69. package/components/widgets/label-sets/profile.d.ts +13 -0
  70. package/components/widgets/label-sets/profile.js +28 -0
  71. package/components/widgets/label-sets/search-results.js +2 -4
  72. package/components/widgets/label-sets/table.js +9 -0
  73. package/components/widgets/label-types/effects.d.ts +3 -2
  74. package/components/widgets/label-types/effects.js +1 -2
  75. package/components/widgets/label-types/search-results.d.ts +2 -2
  76. package/components/widgets/label-types/search-results.js +1 -2
  77. package/components/widgets/label-types/table.d.ts +3 -0
  78. package/components/widgets/label-types/table.js +2 -0
  79. package/components/widgets/server/builder-chrome.d.ts +4 -1
  80. package/components/widgets/server/builder-chrome.js +2 -2
  81. package/components/widgets/shared/markdown-body-client.d.ts +26 -0
  82. package/components/widgets/shared/markdown-body-client.js +31 -1
  83. package/components/widgets/shared/markdown-render.d.ts +10 -2
  84. package/components/widgets/shared/markdown-render.js +35 -13
  85. package/constants/countries.d.ts +9 -0
  86. package/constants/countries.js +28 -0
  87. package/constants/customer-file.d.ts +25 -0
  88. package/constants/customer-file.js +26 -0
  89. package/constants/record-field-kinds.d.ts +15 -0
  90. package/constants/record-field-kinds.js +13 -0
  91. package/constants/runtime-module-ownership.js +12 -0
  92. package/constants/runtime-render-client-types.d.ts +5 -0
  93. package/constants/runtime-render-client-types.js +5 -0
  94. package/{plugins/runtime-modules/threads/controller/address.js → constants/threads-controller-address.js} +1 -1
  95. package/constants.d.ts +1 -0
  96. package/constants.js +2 -0
  97. package/gateway/form-handler-request.d.ts +22 -0
  98. package/gateway/form-handler-request.js +40 -0
  99. package/gateway/label-set.d.ts +15 -2
  100. package/gateway/label-set.js +60 -22
  101. package/gateway/site-form-route.js +11 -2
  102. package/helpers/address-field.d.ts +43 -0
  103. package/helpers/address-field.js +68 -0
  104. package/helpers/cms-dialog.d.ts +5 -20
  105. package/helpers/cms-dialog.js +8 -13
  106. package/helpers/cms-page-catalog.d.ts +10 -0
  107. package/helpers/cms-page-catalog.js +19 -0
  108. package/helpers/cms-preset-nodes.d.ts +4 -4
  109. package/helpers/cms-preset-nodes.js +1 -1
  110. package/helpers/cms-region-keys.d.ts +1 -1
  111. package/helpers/country-names.d.ts +12 -0
  112. package/helpers/country-names.js +14 -0
  113. package/helpers/money-amount.d.ts +7 -0
  114. package/helpers/money-amount.js +15 -0
  115. package/helpers/phi-metadata.d.ts +33 -1
  116. package/helpers/phi-metadata.js +62 -1
  117. package/helpers/preset-table-check.d.ts +34 -0
  118. package/helpers/preset-table-check.js +124 -0
  119. package/helpers/preset-text-source-check.d.ts +4 -1
  120. package/helpers/preset-text-source-check.js +6 -1
  121. package/helpers/preset-tree-contract-check.d.ts +3 -2
  122. package/helpers/preset-tree-contract-check.js +30 -5
  123. package/helpers/public-route-claims.d.ts +9 -1
  124. package/helpers/public-route-claims.js +23 -3
  125. package/helpers/record-fields.d.ts +1 -5
  126. package/helpers/record-fields.js +15 -6
  127. package/helpers/route-address-check.d.ts +22 -2
  128. package/helpers/route-address-check.js +29 -8
  129. package/helpers/site-address-row.d.ts +23 -0
  130. package/helpers/site-address-row.js +36 -0
  131. package/helpers/surface-style.d.ts +8 -1
  132. package/helpers/surface-style.js +12 -2
  133. package/helpers/thread-inbox-row.d.ts +20 -0
  134. package/helpers/thread-inbox-row.js +26 -0
  135. package/helpers/translation-format.d.ts +26 -0
  136. package/helpers/translation-format.js +31 -0
  137. package/module-labels.d.ts +1 -1
  138. package/module-labels.js +1 -1
  139. package/module-page-check.d.ts +1 -0
  140. package/module-page-check.js +1 -0
  141. package/module-records.d.ts +2 -2
  142. package/module-records.js +1 -0
  143. package/next/area-route.js +34 -1
  144. package/next/root-route.js +4 -5
  145. package/package.json +2 -2
  146. package/plugins/runtime-modules/accounting/customer-file-access.d.ts +11 -0
  147. package/plugins/runtime-modules/accounting/customer-file-access.js +12 -0
  148. package/plugins/runtime-modules/accounting/data-providers.js +1 -1
  149. package/plugins/runtime-modules/accounting/ids.d.ts +11 -0
  150. package/plugins/runtime-modules/accounting/ids.js +23 -0
  151. package/plugins/runtime-modules/accounting/presets.js +32 -5
  152. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.d.ts +66 -0
  153. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +122 -0
  154. package/plugins/runtime-modules/accounting/trees/accounting-products-label-set.js +2 -2
  155. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +26 -0
  156. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +381 -0
  157. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-products-page-tree.js +4 -0
  158. package/plugins/runtime-modules/app/client-data-providers.d.ts +7 -0
  159. package/plugins/runtime-modules/app/client-data-providers.js +9 -0
  160. package/plugins/runtime-modules/app/data-providers.d.ts +98 -0
  161. package/plugins/runtime-modules/app/data-providers.js +80 -0
  162. package/plugins/runtime-modules/app/definition.d.ts +131 -0
  163. package/plugins/runtime-modules/app/definition.js +2 -0
  164. package/plugins/runtime-modules/app/forms.d.ts +46 -1
  165. package/plugins/runtime-modules/app/forms.js +195 -1
  166. package/plugins/runtime-modules/app/ids.d.ts +7 -0
  167. package/plugins/runtime-modules/app/ids.js +8 -0
  168. package/plugins/runtime-modules/app/module.d.ts +131 -0
  169. package/plugins/runtime-modules/app/presets.js +3 -6
  170. package/plugins/runtime-modules/app/services/addresses-table.d.ts +135 -0
  171. package/plugins/runtime-modules/app/services/addresses-table.js +101 -0
  172. package/plugins/runtime-modules/app/trees/account-addresses-panel.d.ts +17 -0
  173. package/plugins/runtime-modules/app/trees/account-addresses-panel.js +179 -0
  174. package/plugins/runtime-modules/app/trees/addresses-label-set.d.ts +62 -0
  175. package/plugins/runtime-modules/app/trees/addresses-label-set.js +108 -0
  176. package/plugins/runtime-modules/app/trees/phi-default-app-area-preset-tree.d.ts +3 -6
  177. package/plugins/runtime-modules/app/trees/phi-default-app-area-preset-tree.js +4 -7
  178. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.js +27 -2
  179. package/plugins/runtime-modules/app/trees/profile-label-set.d.ts +1 -0
  180. package/plugins/runtime-modules/app/trees/profile-label-set.js +3 -0
  181. package/plugins/runtime-modules/asset/presets.d.ts +4 -0
  182. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +4 -2
  183. package/plugins/runtime-modules/auth/trees/phi-auth-area-overlay-tree.server.js +4 -2
  184. package/plugins/runtime-modules/auth/trees/phi-default-admin-auth-settings-page-tree.js +2 -2
  185. package/plugins/runtime-modules/auth/widgets/logout/client.d.ts +1 -1
  186. package/plugins/runtime-modules/auth/widgets/logout/client.js +2 -2
  187. package/plugins/runtime-modules/auth/widgets/security/client.d.ts +5 -1
  188. package/plugins/runtime-modules/auth/widgets/security/client.js +12 -10
  189. package/plugins/runtime-modules/avatar/overlay-tree.server.js +1 -1
  190. package/plugins/runtime-modules/blog/presets.d.ts +4 -0
  191. package/plugins/runtime-modules/builder/clients/inspector-image-field.d.ts +2 -1
  192. package/plugins/runtime-modules/builder/clients/inspector-image-field.js +3 -2
  193. package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.d.ts +23 -0
  194. package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.js +38 -0
  195. package/plugins/runtime-modules/builder/clients/mode-switch.d.ts +4 -1
  196. package/plugins/runtime-modules/builder/clients/mode-switch.js +2 -15
  197. package/plugins/runtime-modules/builder/clients/pages-workspace.js +2 -0
  198. package/plugins/runtime-modules/builder/clients/runtime-module-authoring-boundary.js +2 -1
  199. package/plugins/runtime-modules/builder/controller/client.d.ts +5 -5
  200. package/plugins/runtime-modules/builder/controller/client.js +2 -1
  201. package/plugins/runtime-modules/builder/controller/definition.d.ts +4 -4
  202. package/plugins/runtime-modules/builder/controller/definition.js +7 -0
  203. package/plugins/runtime-modules/builder/controller/draft-command-controller.d.ts +3 -1
  204. package/plugins/runtime-modules/builder/controller/draft-command-controller.js +2 -1
  205. package/plugins/runtime-modules/builder/controller/draft-status-controller.js +72 -18
  206. package/plugins/runtime-modules/builder/controller/server-definition.d.ts +4 -4
  207. package/plugins/runtime-modules/builder/controller/workspace-controller.d.ts +3 -1
  208. package/plugins/runtime-modules/builder/controller/workspace-controller.js +8 -10
  209. package/plugins/runtime-modules/builder/developer-workspace-store.d.ts +10 -0
  210. package/plugins/runtime-modules/builder/developer-workspace-store.js +35 -1
  211. package/plugins/runtime-modules/builder/developer-workspace-types.d.ts +5 -0
  212. package/plugins/runtime-modules/builder/offered-page-catalog.d.ts +6 -0
  213. package/plugins/runtime-modules/builder/offered-page-catalog.js +35 -6
  214. package/plugins/runtime-modules/builder/page-presets.server.d.ts +7 -0
  215. package/plugins/runtime-modules/builder/page-presets.server.js +10 -1
  216. package/plugins/runtime-modules/builder/persistence.d.ts +4 -1
  217. package/plugins/runtime-modules/builder/persistence.js +14 -3
  218. package/plugins/runtime-modules/builder/public-route-collisions.js +8 -3
  219. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +3 -1
  220. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +33 -6
  221. package/plugins/runtime-modules/builder/widgets/chrome/config.d.ts +6 -4
  222. package/plugins/runtime-modules/builder/widgets/chrome/config.js +11 -1
  223. package/plugins/runtime-modules/builder/widgets/inspector-header/authoring.d.ts +2 -2
  224. package/plugins/runtime-modules/builder/widgets/inspector-header/plugin.d.ts +2 -2
  225. package/plugins/runtime-modules/builder/widgets/mode-switch/plugin.js +1 -1
  226. package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +2 -2
  227. package/plugins/runtime-modules/client-manifests/app.js +3 -0
  228. package/plugins/runtime-modules/client-manifests/builder.js +10 -0
  229. package/plugins/runtime-modules/content-entry-routes.d.ts +4 -0
  230. package/plugins/runtime-modules/contracts.js +31 -1
  231. package/plugins/runtime-modules/core/definition.d.ts +28 -0
  232. package/plugins/runtime-modules/core/form-providers.d.ts +28 -0
  233. package/plugins/runtime-modules/core/messaging/thread-inbox-table.d.ts +0 -17
  234. package/plugins/runtime-modules/core/messaging/thread-inbox-table.js +2 -23
  235. package/plugins/runtime-modules/core/widgets/card/config.d.ts +0 -1
  236. package/plugins/runtime-modules/core/widgets/card/config.js +0 -1
  237. package/plugins/runtime-modules/core/widgets/card/editor.js +1 -1
  238. package/plugins/runtime-modules/core/widgets/command-toolbar/client.js +3 -0
  239. package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +316 -1
  240. package/plugins/runtime-modules/core/widgets/command-toolbar/config.js +4 -4
  241. package/plugins/runtime-modules/core/widgets/dimension/config.d.ts +1 -1
  242. package/plugins/runtime-modules/core/widgets/float-button/client.js +4 -1
  243. package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +326 -3
  244. package/plugins/runtime-modules/core/widgets/float-button/config.js +5 -2
  245. package/plugins/runtime-modules/core/widgets/header-navigation/client.js +1 -1
  246. package/plugins/runtime-modules/core/widgets/length/config.d.ts +1 -1
  247. package/plugins/runtime-modules/core/widgets/markdown/plugin.js +20 -7
  248. package/plugins/runtime-modules/core/widgets/markdown/server.d.ts +6 -2
  249. package/plugins/runtime-modules/core/widgets/markdown/server.js +2 -2
  250. package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.d.ts +12 -0
  251. package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.js +68 -0
  252. package/plugins/runtime-modules/core/widgets/number-input/config.d.ts +1 -1
  253. package/plugins/runtime-modules/core/widgets/simple-text/config.js +1 -1
  254. package/plugins/runtime-modules/core/widgets/simple-text/plugin.js +2 -1
  255. package/plugins/runtime-modules/core/widgets/spacer/client.js +3 -3
  256. package/plugins/runtime-modules/core/widgets/table/client.js +20 -5
  257. package/plugins/runtime-modules/core/widgets/table/config.js +6 -0
  258. package/plugins/runtime-modules/core/widgets/table/reader-query.d.ts +17 -0
  259. package/plugins/runtime-modules/core/widgets/table/reader-query.js +33 -0
  260. package/plugins/runtime-modules/dashboard/trees/dashboard-cards-page-tree.js +3 -1
  261. package/plugins/runtime-modules/descriptor-compiler.d.ts +19 -3
  262. package/plugins/runtime-modules/descriptor-compiler.js +44 -16
  263. package/plugins/runtime-modules/editor/presets.d.ts +4 -0
  264. package/plugins/runtime-modules/editor/trees/phi-default-editor-releases-page-tree.js +3 -1
  265. package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +5 -1
  266. package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +5 -1
  267. package/plugins/runtime-modules/localization/presets.d.ts +4 -0
  268. package/plugins/runtime-modules/localization/trees/phi-default-admin-locales-page-tree.js +3 -1
  269. package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +4 -2
  270. package/plugins/runtime-modules/news/presets.d.ts +4 -0
  271. package/plugins/runtime-modules/observability/trees/phi-default-admin-logs-page-tree.js +6 -2
  272. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +46 -39
  273. package/plugins/runtime-modules/preset-contracts/pub-area.d.ts +1 -1
  274. package/plugins/runtime-modules/preset-contracts/pub-area.js +1 -0
  275. package/plugins/runtime-modules/resolver.js +17 -0
  276. package/plugins/runtime-modules/revisions/controller/client.js +50 -46
  277. package/plugins/runtime-modules/revisions/controller/draft-context-target.d.ts +25 -0
  278. package/plugins/runtime-modules/revisions/controller/draft-context-target.js +33 -0
  279. package/plugins/runtime-modules/revisions/presets.d.ts +4 -0
  280. package/plugins/runtime-modules/revisions/services/table.js +16 -5
  281. package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +3 -1
  282. package/plugins/runtime-modules/search/widgets/search-results/client.js +4 -2
  283. package/plugins/runtime-modules/theme/presets.d.ts +4 -0
  284. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +76 -4
  285. package/plugins/runtime-modules/theme/widgets/brand-controls/config.d.ts +3 -2
  286. package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +2 -2
  287. package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +19 -7
  288. package/plugins/runtime-modules/threads/client-data-providers.js +5 -0
  289. package/plugins/runtime-modules/threads/controller/definition.js +1 -1
  290. package/plugins/runtime-modules/threads/data-providers.d.ts +115 -2
  291. package/plugins/runtime-modules/threads/data-providers.js +85 -0
  292. package/plugins/runtime-modules/threads/definition.d.ts +115 -2
  293. package/plugins/runtime-modules/threads/definition.js +1 -1
  294. package/plugins/runtime-modules/threads/ids.d.ts +2 -0
  295. package/plugins/runtime-modules/threads/ids.js +3 -0
  296. package/plugins/runtime-modules/threads/services/customer-file-table.d.ts +192 -0
  297. package/plugins/runtime-modules/threads/services/customer-file-table.js +164 -0
  298. package/plugins/runtime-modules/threads/trees/phi-default-threads-page-tree.js +5 -3
  299. package/plugins/runtime-modules/user-management/client-data-providers.js +5 -0
  300. package/plugins/runtime-modules/user-management/data-providers.d.ts +159 -0
  301. package/plugins/runtime-modules/user-management/data-providers.js +101 -3
  302. package/plugins/runtime-modules/user-management/definition.d.ts +159 -0
  303. package/plugins/runtime-modules/user-management/ids.d.ts +9 -0
  304. package/plugins/runtime-modules/user-management/ids.js +9 -0
  305. package/plugins/runtime-modules/user-management/presets.js +17 -1
  306. package/plugins/runtime-modules/user-management/services/users-access-table.d.ts +378 -0
  307. package/plugins/runtime-modules/user-management/services/users-access-table.js +132 -0
  308. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.d.ts +86 -0
  309. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.js +118 -0
  310. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.d.ts +20 -0
  311. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.js +166 -0
  312. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +19 -18
  313. package/server-helpers/cms-page-record.d.ts +9 -1
  314. package/server-helpers/cms-page-record.js +11 -1
  315. package/server-helpers/cms-request.js +8 -5
  316. package/server-helpers/link-preview-image.d.ts +30 -0
  317. package/server-helpers/link-preview-image.js +57 -0
  318. package/server-helpers/search-text.js +3 -0
  319. package/server-helpers.d.ts +1 -1
  320. package/server-helpers.js +1 -1
  321. package/styles/builder-scaffold.css +7 -1
  322. package/styles/layout-authoring-scaffold.css +27 -0
  323. package/styles/shell.css +30 -6
  324. package/theme/phi-theme-composition.js +9 -0
  325. package/theme/phi-theme-inverse-ground.d.ts +39 -0
  326. package/theme/phi-theme-inverse-ground.js +103 -0
  327. package/theme/phi-theme-tokens.d.ts +2 -1
  328. package/theme/phi-theme-tokens.js +2 -0
  329. package/types/cms-module-descriptors.d.ts +14 -0
  330. package/types/cms-overlay.d.ts +13 -6
  331. package/types/cms-overlay.js +6 -22
  332. package/types/cms-plugins.d.ts +14 -2
  333. package/types/cms.d.ts +10 -0
  334. package/types/core-widget-placements.d.ts +3 -3
  335. package/types/link-preview.d.ts +19 -0
  336. package/types/link-preview.js +19 -0
  337. package/types/record-provider.d.ts +22 -1
  338. package/types/site-theme.d.ts +27 -0
  339. package/types/table-embed.d.ts +48 -0
  340. package/types/table-embed.js +1 -0
  341. package/types/table-widget.d.ts +14 -0
  342. package/types/widget-runtime.d.ts +3 -0
  343. package/types.d.ts +1 -0
  344. /package/{plugins/runtime-modules/threads/controller/address.d.ts → constants/threads-controller-address.d.ts} +0 -0
@@ -0,0 +1,378 @@
1
+ import { type PhiTableProviderMutationRequest, type PhiTableProviderQueryRequest } from "../../../../types/table-widget";
2
+ /** Core's Site Admin routes for `users:v1` access (phis-server `/api/site/admin/users-access`). */
3
+ export declare const PHI_USERS_ACCESS_PATH = "/api/site/admin/users-access";
4
+ /** One Add-on as the Table reads it: Core's row, with the two marks its acts are offered by. */
5
+ export declare function toPhiUsersAccessAddonRow(row: Record<string, unknown>): {
6
+ addonId: string;
7
+ fields: string[];
8
+ background: string[];
9
+ granted: string[];
10
+ effective: string[];
11
+ awaiting: string[];
12
+ hasAwaiting: boolean;
13
+ hasGrant: boolean;
14
+ };
15
+ /** One entry of the access log as the Table reads it; Core answers no id, so the row's place is its key. */
16
+ export declare function toPhiUsersAccessLogRow(row: Record<string, unknown>, index: number, page: number): {
17
+ key: string;
18
+ actor: string;
19
+ fields: string[];
20
+ };
21
+ /** The log's request: newest first, a page at a time, narrowed by subject and Add-on. */
22
+ export declare function buildPhiUsersAccessLogParams(query: PhiTableProviderQueryRequest["query"]): URLSearchParams;
23
+ declare function queryUsersAccess({ resourceKey, query, signal }: PhiTableProviderQueryRequest): Promise<{
24
+ rows: {
25
+ addonId: string;
26
+ fields: string[];
27
+ background: string[];
28
+ granted: string[];
29
+ effective: string[];
30
+ awaiting: string[];
31
+ hasAwaiting: boolean;
32
+ hasGrant: boolean;
33
+ }[];
34
+ total: number;
35
+ } | {
36
+ rows: {
37
+ id: string;
38
+ days: number;
39
+ }[];
40
+ total: number;
41
+ } | {
42
+ rows: {
43
+ key: string;
44
+ actor: string;
45
+ fields: string[];
46
+ }[];
47
+ total?: undefined;
48
+ }>;
49
+ /** The address of one Add-on's grant; the id is one segment, so its `@` and `/` are encoded. */
50
+ export declare function buildPhiUsersAccessGrantPath(addonId: string): string;
51
+ declare function mutateUsersAccess(request: PhiTableProviderMutationRequest): Promise<{
52
+ status: "rejected";
53
+ invalidation: "none";
54
+ errorCode: string;
55
+ message: string;
56
+ canonicalValue?: undefined;
57
+ } | {
58
+ status: "accepted";
59
+ invalidation: "none";
60
+ canonicalValue: {};
61
+ errorCode?: undefined;
62
+ message?: undefined;
63
+ } | {
64
+ status: "accepted";
65
+ invalidation: "view";
66
+ errorCode?: undefined;
67
+ message?: undefined;
68
+ canonicalValue?: undefined;
69
+ }>;
70
+ export declare const PHI_USER_MANAGEMENT_USERS_ACCESS_TABLE_PROVIDER_REGISTRATION: {
71
+ key: `${string}/${string}`;
72
+ resources: ({
73
+ resourceKey: string;
74
+ title: string;
75
+ rowIdentityPath: string;
76
+ recordRead: true;
77
+ summaryFields: {
78
+ key: string;
79
+ title: string;
80
+ type: "number";
81
+ }[];
82
+ fields: ({
83
+ key: string;
84
+ title: string;
85
+ type: "string";
86
+ required: true;
87
+ mutable?: undefined;
88
+ mutableWhen?: undefined;
89
+ } | {
90
+ key: string;
91
+ title: string;
92
+ type: "boolean";
93
+ mutable: true;
94
+ mutableWhen: {
95
+ match: "all";
96
+ conditions: ({
97
+ source: "controller";
98
+ controllerAddress: `controller:${string}/${string}:${string}`;
99
+ valuePath: string;
100
+ operator: "falsy";
101
+ } | {
102
+ source: "row";
103
+ valuePath: string;
104
+ operator: "falsy";
105
+ controllerAddress?: undefined;
106
+ })[];
107
+ };
108
+ required?: undefined;
109
+ } | {
110
+ key: string;
111
+ title: string;
112
+ type: "string";
113
+ required?: undefined;
114
+ mutable?: undefined;
115
+ mutableWhen?: undefined;
116
+ } | {
117
+ key: string;
118
+ title: string;
119
+ type: "json";
120
+ required?: undefined;
121
+ mutable?: undefined;
122
+ mutableWhen?: undefined;
123
+ } | {
124
+ key: string;
125
+ title: string;
126
+ type: "datetime";
127
+ required?: undefined;
128
+ mutable?: undefined;
129
+ mutableWhen?: undefined;
130
+ } | {
131
+ key: string;
132
+ title: string;
133
+ type: "boolean";
134
+ required?: undefined;
135
+ mutable?: undefined;
136
+ mutableWhen?: undefined;
137
+ })[];
138
+ query: {
139
+ search: true;
140
+ filterFields: string[];
141
+ sorting: "single";
142
+ pagination: "offset";
143
+ total: true;
144
+ };
145
+ actions: ({
146
+ key: string;
147
+ title: string;
148
+ scope: "row";
149
+ disabledWhen: {
150
+ match: "any";
151
+ conditions: ({
152
+ source: "controller";
153
+ controllerAddress: `controller:${string}/${string}:${string}`;
154
+ valuePath: string;
155
+ operator: "truthy";
156
+ } | {
157
+ source: "row";
158
+ valuePath: string;
159
+ operator: "truthy";
160
+ controllerAddress?: undefined;
161
+ })[];
162
+ };
163
+ intent: "destructive";
164
+ confirmation: "required";
165
+ valueType?: undefined;
166
+ } | {
167
+ key: string;
168
+ title: string;
169
+ scope: "resource";
170
+ disabledWhen?: undefined;
171
+ intent?: undefined;
172
+ confirmation?: undefined;
173
+ valueType?: undefined;
174
+ } | {
175
+ key: string;
176
+ title: string;
177
+ scope: "resource";
178
+ valueType: "json";
179
+ disabledWhen?: undefined;
180
+ intent?: undefined;
181
+ confirmation?: undefined;
182
+ } | {
183
+ key: string;
184
+ title: string;
185
+ scope: "row";
186
+ valueType: "json";
187
+ disabledWhen?: undefined;
188
+ intent?: undefined;
189
+ confirmation?: undefined;
190
+ })[];
191
+ } | {
192
+ resourceKey: string;
193
+ title: string;
194
+ rowIdentityPath: string;
195
+ fields: ({
196
+ key: string;
197
+ title: string;
198
+ type: "string";
199
+ required: true;
200
+ } | {
201
+ key: string;
202
+ title: string;
203
+ type: "datetime";
204
+ required?: undefined;
205
+ } | {
206
+ key: string;
207
+ title: string;
208
+ type: "string";
209
+ required?: undefined;
210
+ })[];
211
+ query: {
212
+ filterFields: string[];
213
+ sorting: "none";
214
+ pagination: "none";
215
+ search?: undefined;
216
+ total?: undefined;
217
+ };
218
+ recordRead?: undefined;
219
+ summaryFields?: undefined;
220
+ actions?: undefined;
221
+ })[] | ({
222
+ resourceKey: "addons";
223
+ title: string;
224
+ rowIdentityPath: string;
225
+ fields: ({
226
+ key: "fields" | "background" | "granted" | "effective" | "awaiting";
227
+ title: "fields" | "background" | "granted" | "effective" | "awaiting";
228
+ type: "enum[]";
229
+ options: {
230
+ value: "name" | "email" | "address" | "phone";
231
+ label: "name" | "email" | "address" | "phone";
232
+ }[];
233
+ } | {
234
+ key: string;
235
+ title: string;
236
+ type: "string";
237
+ required: true;
238
+ } | {
239
+ key: string;
240
+ title: string;
241
+ type: "datetime";
242
+ required?: undefined;
243
+ } | {
244
+ key: string;
245
+ title: string;
246
+ type: "number";
247
+ required?: undefined;
248
+ } | {
249
+ key: string;
250
+ title: string;
251
+ type: "boolean";
252
+ required?: undefined;
253
+ })[];
254
+ query: {
255
+ search: false;
256
+ filterFields: never[];
257
+ sorting: "none";
258
+ pagination: "none";
259
+ total?: undefined;
260
+ };
261
+ actions: ({
262
+ key: string;
263
+ title: string;
264
+ scope: "row";
265
+ intent: "write";
266
+ confirmation: "required";
267
+ disabledWhen: {
268
+ source: "row";
269
+ valuePath: string;
270
+ operator: "falsy";
271
+ };
272
+ } | {
273
+ key: string;
274
+ title: string;
275
+ scope: "row";
276
+ intent: "destructive";
277
+ confirmation: "required";
278
+ disabledWhen: {
279
+ source: "row";
280
+ valuePath: string;
281
+ operator: "falsy";
282
+ };
283
+ })[];
284
+ } | {
285
+ resourceKey: "retention";
286
+ title: string;
287
+ rowIdentityPath: string;
288
+ fields: ({
289
+ key: string;
290
+ title: string;
291
+ type: "string";
292
+ required: true;
293
+ mutable?: undefined;
294
+ constraints?: undefined;
295
+ } | {
296
+ key: string;
297
+ title: string;
298
+ type: "number";
299
+ mutable: true;
300
+ constraints: {
301
+ min: number;
302
+ max: number;
303
+ step: number;
304
+ precision: number;
305
+ };
306
+ required?: undefined;
307
+ })[];
308
+ query: {
309
+ search: false;
310
+ filterFields: never[];
311
+ sorting: "none";
312
+ pagination: "none";
313
+ total?: undefined;
314
+ };
315
+ actions?: undefined;
316
+ } | {
317
+ resourceKey: "log";
318
+ title: string;
319
+ rowIdentityPath: string;
320
+ fields: ({
321
+ key: string;
322
+ title: string;
323
+ type: "string";
324
+ required: true;
325
+ options?: undefined;
326
+ } | {
327
+ key: string;
328
+ title: string;
329
+ type: "datetime";
330
+ required?: undefined;
331
+ options?: undefined;
332
+ } | {
333
+ key: string;
334
+ title: string;
335
+ type: "string";
336
+ required?: undefined;
337
+ options?: undefined;
338
+ } | {
339
+ key: string;
340
+ title: string;
341
+ type: "enum";
342
+ options: {
343
+ value: string;
344
+ label: string;
345
+ }[];
346
+ required?: undefined;
347
+ } | {
348
+ key: string;
349
+ title: string;
350
+ type: "json";
351
+ required?: undefined;
352
+ options?: undefined;
353
+ } | {
354
+ key: string;
355
+ title: string;
356
+ type: "enum[]";
357
+ options: {
358
+ value: "name" | "email" | "address" | "phone";
359
+ label: "name" | "email" | "address" | "phone";
360
+ }[];
361
+ required?: undefined;
362
+ })[];
363
+ query: {
364
+ search: false;
365
+ filterFields: string[];
366
+ sorting: "none";
367
+ pagination: "offset";
368
+ total: false;
369
+ };
370
+ actions?: undefined;
371
+ })[];
372
+ query: typeof queryUsersAccess;
373
+ mutate: typeof mutateUsersAccess;
374
+ };
375
+ export declare const PhiUserManagementUsersAccessTableProviderClient: import("react").ComponentType<{
376
+ children: import("react").ReactNode;
377
+ }>;
378
+ export {};
@@ -0,0 +1,132 @@
1
+ "use client";
2
+ import { isPhiRecord } from "../../../../helpers/is-record";
3
+ import { buildPhiTablePageParams, createPhiTableProviderRequestInit, readPhiTableRows, readPhiTableStringFilter, } from "../../../../components/widgets/client/shared/phi-table-provider-request";
4
+ import { readPhiTableProviderResponse, } from "../../../../components/widgets/client/shared/phi-table-provider-response";
5
+ import { createPhiTableProviderClient, } from "../../../../components/widgets/client/shared/phi-table-provider";
6
+ import { PhiTableProviderError, } from "../../../../types/table-widget";
7
+ import { PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS } from "../data-providers";
8
+ import { PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS, PHI_USER_MANAGEMENT_USERS_ACCESS_RESOURCE_KEYS as RESOURCES, } from "../ids";
9
+ /** Core's Site Admin routes for `users:v1` access (phis-server `/api/site/admin/users-access`). */
10
+ export const PHI_USERS_ACCESS_PATH = "/api/site/admin/users-access";
11
+ const RESPONSE_OPTIONS = { subject: "People data access" };
12
+ const RETENTION_ROW_ID = "retention";
13
+ // The Page names the same size; the route takes up to 100.
14
+ const LOG_PAGE_SIZE = 25;
15
+ function readFields(value) {
16
+ return Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : [];
17
+ }
18
+ /** One Add-on as the Table reads it: Core's row, with the two marks its acts are offered by. */
19
+ export function toPhiUsersAccessAddonRow(row) {
20
+ const awaiting = readFields(row.awaiting);
21
+ const granted = readFields(row.granted);
22
+ return {
23
+ ...row,
24
+ addonId: typeof row.addonId === "string" ? row.addonId : "",
25
+ fields: readFields(row.fields),
26
+ background: readFields(row.background),
27
+ granted,
28
+ effective: readFields(row.effective),
29
+ awaiting,
30
+ hasAwaiting: awaiting.length > 0,
31
+ hasGrant: granted.length > 0,
32
+ };
33
+ }
34
+ /** One entry of the access log as the Table reads it; Core answers no id, so the row's place is its key. */
35
+ export function toPhiUsersAccessLogRow(row, index, page) {
36
+ const actor = isPhiRecord(row.actor) && typeof row.actor.displayName === "string" ? row.actor.displayName : "";
37
+ return {
38
+ ...row,
39
+ key: `${page}:${index}:${typeof row.at === "string" ? row.at : ""}`,
40
+ actor,
41
+ fields: readFields(row.fields),
42
+ };
43
+ }
44
+ /** What the grant of an Add-on asks for: everything its manifest asks in the background, as the Table last read it. */
45
+ const backgroundAsked = new Map();
46
+ async function readAccess(signal) {
47
+ return readPhiTableProviderResponse(await fetch(PHI_USERS_ACCESS_PATH, createPhiTableProviderRequestInit(signal)), RESPONSE_OPTIONS);
48
+ }
49
+ /** The log's request: newest first, a page at a time, narrowed by subject and Add-on. */
50
+ export function buildPhiUsersAccessLogParams(query) {
51
+ const params = buildPhiTablePageParams(query, LOG_PAGE_SIZE);
52
+ const subject = readPhiTableStringFilter(query, "subject");
53
+ if (subject)
54
+ params.set("subject", subject);
55
+ const addonId = readPhiTableStringFilter(query, "addonId");
56
+ if (addonId)
57
+ params.set("addonId", addonId);
58
+ return params;
59
+ }
60
+ async function queryUsersAccess({ resourceKey, query, signal }) {
61
+ if (resourceKey === RESOURCES.addons) {
62
+ const rows = readPhiTableRows((await readAccess(signal))?.addons).map(toPhiUsersAccessAddonRow);
63
+ backgroundAsked.clear();
64
+ for (const row of rows) {
65
+ if (row.addonId)
66
+ backgroundAsked.set(row.addonId, row.background);
67
+ }
68
+ return { rows, total: rows.length };
69
+ }
70
+ if (resourceKey === RESOURCES.retention) {
71
+ const days = (await readAccess(signal))?.retentionDays;
72
+ if (typeof days !== "number" || !Number.isSafeInteger(days)) {
73
+ throw new PhiTableProviderError("invalid-response", "The access log retention is invalid.");
74
+ }
75
+ return { rows: [{ id: RETENTION_ROW_ID, days }], total: 1 };
76
+ }
77
+ if (resourceKey === RESOURCES.log) {
78
+ const params = buildPhiUsersAccessLogParams(query);
79
+ const result = await readPhiTableProviderResponse(await fetch(`${PHI_USERS_ACCESS_PATH}/log?${params}`, createPhiTableProviderRequestInit(signal)), RESPONSE_OPTIONS);
80
+ const page = Number(params.get("page")) || 1;
81
+ return { rows: readPhiTableRows(result?.items).map((row, index) => toPhiUsersAccessLogRow(row, index, page)) };
82
+ }
83
+ throw new PhiTableProviderError("resource-not-found", `Unknown people data access resource "${resourceKey}".`);
84
+ }
85
+ /** The address of one Add-on's grant; the id is one segment, so its `@` and `/` are encoded. */
86
+ export function buildPhiUsersAccessGrantPath(addonId) {
87
+ return `${PHI_USERS_ACCESS_PATH}/${encodeURIComponent(addonId)}`;
88
+ }
89
+ async function mutateUsersAccess(request) {
90
+ const init = createPhiTableProviderRequestInit(request.signal);
91
+ const json = (body) => ({
92
+ ...init,
93
+ headers: { ...init.headers, "content-type": "application/json" },
94
+ body: JSON.stringify(body),
95
+ });
96
+ if (request.resourceKey === RESOURCES.retention && request.kind === "field" && request.fieldKey === "days") {
97
+ const days = request.proposedValue;
98
+ if (typeof days !== "number" || !Number.isSafeInteger(days) || days < 1 || days > 3650) {
99
+ return { status: "rejected", invalidation: "none", errorCode: "invalid-field-value", message: "A whole number of days from 1 to 3650." };
100
+ }
101
+ const result = await readPhiTableProviderResponse(await fetch(`${PHI_USERS_ACCESS_PATH}/retention`, { ...json({ days }), method: "PUT" }), RESPONSE_OPTIONS);
102
+ return { status: "accepted", invalidation: "none", canonicalValue: result?.retentionDays ?? days };
103
+ }
104
+ if (request.resourceKey === RESOURCES.addons && request.kind === "action") {
105
+ const addonId = typeof request.rowIdentity === "string" ? request.rowIdentity : "";
106
+ if (!addonId)
107
+ throw new PhiTableProviderError("invalid-query", "An Add-on id is required.");
108
+ if (request.actionKey === "grant") {
109
+ const fields = backgroundAsked.get(addonId) ?? [];
110
+ if (fields.length === 0)
111
+ throw new PhiTableProviderError("invalid-query", `${addonId} asks for nothing in the background.`);
112
+ await readPhiTableProviderResponse(await fetch(buildPhiUsersAccessGrantPath(addonId), { ...json({ fields }), method: "PUT" }), RESPONSE_OPTIONS);
113
+ }
114
+ else if (request.actionKey === "revoke") {
115
+ await readPhiTableProviderResponse(await fetch(buildPhiUsersAccessGrantPath(addonId), { ...init, method: "DELETE" }), RESPONSE_OPTIONS);
116
+ }
117
+ else {
118
+ throw new PhiTableProviderError("action-not-supported", `Unsupported people data access action "${request.actionKey}".`);
119
+ }
120
+ return { status: "accepted", invalidation: "view" };
121
+ }
122
+ throw new PhiTableProviderError("mutation-not-supported", "This people data access change is not offered.");
123
+ }
124
+ const resources = PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS
125
+ .find((descriptor) => descriptor.key === PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS.usersAccess)?.resources ?? [];
126
+ export const PHI_USER_MANAGEMENT_USERS_ACCESS_TABLE_PROVIDER_REGISTRATION = {
127
+ key: PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS.usersAccess,
128
+ resources,
129
+ query: queryUsersAccess,
130
+ mutate: mutateUsersAccess,
131
+ };
132
+ export const PhiUserManagementUsersAccessTableProviderClient = createPhiTableProviderClient(PHI_USER_MANAGEMENT_USERS_ACCESS_TABLE_PROVIDER_REGISTRATION);
@@ -0,0 +1,86 @@
1
+ import "server-only";
2
+ import { type PhiGlobalTranslatorOptions } from "../../../../gateway/tr";
3
+ export declare function getPhiAdminUsersAccessLabels(options: PhiGlobalTranslatorOptions): Promise<{
4
+ pageTitle: string;
5
+ pageDescription: string;
6
+ panels: {
7
+ background: {
8
+ title: string;
9
+ description: string;
10
+ };
11
+ retention: {
12
+ title: string;
13
+ description: string;
14
+ };
15
+ log: {
16
+ title: string;
17
+ description: string;
18
+ };
19
+ };
20
+ widgets: {
21
+ addons: string;
22
+ retention: string;
23
+ log: string;
24
+ };
25
+ columns: {
26
+ addon: string;
27
+ fields: string;
28
+ background: string;
29
+ granted: string;
30
+ awaiting: string;
31
+ grantedAt: string;
32
+ days: string;
33
+ at: string;
34
+ actor: string;
35
+ road: string;
36
+ operation: string;
37
+ subjects: string;
38
+ logFields: string;
39
+ };
40
+ daysUnit: string;
41
+ fields: {
42
+ name: string;
43
+ email: string;
44
+ phone: string;
45
+ address: string;
46
+ };
47
+ roads: {
48
+ staff: string;
49
+ self: string;
50
+ background: string;
51
+ checkout: string;
52
+ };
53
+ operations: {
54
+ describe: string;
55
+ addresses: string;
56
+ createAddress: string;
57
+ fileOf: string;
58
+ customerFile: string;
59
+ };
60
+ nobody: string;
61
+ actions: {
62
+ grant: string;
63
+ revoke: string;
64
+ };
65
+ grant: {
66
+ title: string;
67
+ text: string;
68
+ ok: string;
69
+ };
70
+ revoke: {
71
+ title: string;
72
+ text: string;
73
+ ok: string;
74
+ };
75
+ cancel: string;
76
+ empty: {
77
+ addons: string;
78
+ log: string;
79
+ };
80
+ filters: {
81
+ subject: string;
82
+ subjectPlaceholder: string;
83
+ addon: string;
84
+ addonPlaceholder: string;
85
+ };
86
+ }>;