@phis/ui 0.7.8 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (462) hide show
  1. package/components/cms/phi-cms-layout-renderer.js +15 -7
  2. package/components/cms/phi-cms-render-diagnostic-client.d.ts +3 -1
  3. package/components/cms/phi-cms-render-diagnostic-client.js +4 -3
  4. package/components/cms/phi-cms-render-diagnostic.d.ts +8 -2
  5. package/components/cms/phi-cms-render-diagnostic.js +12 -2
  6. package/components/cms/phi-cms-render-error-boundary.d.ts +2 -0
  7. package/components/cms/phi-cms-render-error-boundary.js +1 -1
  8. package/components/cms/phi-cms-root-layout.js +3 -1
  9. package/components/controls/phi-address-control.d.ts +23 -0
  10. package/components/controls/phi-address-control.js +43 -0
  11. package/components/controls/phi-color-control.d.ts +3 -1
  12. package/components/controls/phi-color-control.js +2 -2
  13. package/components/controls/phi-country-select-control.d.ts +22 -0
  14. package/components/controls/phi-country-select-control.js +16 -0
  15. package/components/controls/phi-dialog-control.d.ts +1 -1
  16. package/components/controls/phi-drawer-control-adapter.d.ts +1 -1
  17. package/components/controls/phi-drawer-control-adapter.js +5 -3
  18. package/components/controls/phi-drawer-control.d.ts +7 -5
  19. package/components/controls/phi-float-button-control.d.ts +8 -1
  20. package/components/controls/phi-float-button-control.js +19 -3
  21. package/components/controls/phi-form-control.js +52 -8
  22. package/components/controls/phi-media-picker-control.d.ts +9 -0
  23. package/components/controls/phi-media-picker-control.js +1 -1
  24. package/components/controls/phi-modal-control-adapter.d.ts +1 -1
  25. package/components/controls/phi-modal-control-adapter.js +14 -37
  26. package/components/controls/phi-modal-control.d.ts +5 -5
  27. package/components/controls/phi-options-provider.d.ts +1 -0
  28. package/components/controls/phi-options-provider.js +1 -0
  29. package/components/controls/phi-overlay-control-contract.d.ts +52 -17
  30. package/components/controls/phi-overlay-control-contract.js +55 -30
  31. package/components/controls/phi-popover-control.js +4 -1
  32. package/components/controls/phi-reveal-once-dialog-control.d.ts +21 -0
  33. package/components/controls/phi-reveal-once-dialog-control.js +52 -0
  34. package/components/controls/phi-reveal-once-dialog-labels.d.ts +10 -0
  35. package/components/controls/phi-reveal-once-dialog-labels.js +5 -0
  36. package/components/controls/phi-table-control.d.ts +7 -1
  37. package/components/controls/phi-table-control.js +23 -8
  38. package/components/forms/flags-field.d.ts +22 -0
  39. package/components/forms/flags-field.js +58 -0
  40. package/components/forms/form-descriptor-field-check.d.ts +18 -0
  41. package/components/forms/form-descriptor-field-check.js +41 -0
  42. package/components/forms/form-descriptor-runtime-client.js +11 -10
  43. package/components/forms/form-option-flags.d.ts +20 -0
  44. package/components/forms/form-option-flags.js +38 -0
  45. package/components/forms/form-provider-contract.d.ts +23 -0
  46. package/components/forms/form-provider-contract.js +36 -0
  47. package/components/forms/form-provider-registry.d.ts +5 -1
  48. package/components/forms/form-record-source.d.ts +38 -0
  49. package/components/forms/form-record-source.js +48 -0
  50. package/components/forms/shared-form-descriptors.d.ts +0 -34
  51. package/components/forms/shared-form-descriptors.js +0 -6
  52. package/components/forms/shared-form-ids.d.ts +1 -1
  53. package/components/forms/shared-form-ids.js +1 -1
  54. package/components/forms/shared-form-provider-registry.js +13 -0
  55. package/components/forms/structured-field-labels.d.ts +24 -0
  56. package/components/forms/structured-field-labels.js +43 -0
  57. package/components/forms/structured-form-field-controls.d.ts +12 -0
  58. package/components/forms/structured-form-field-controls.js +65 -0
  59. package/components/media/media-settings-labels.d.ts +1 -0
  60. package/components/media/media-settings-labels.js +2 -0
  61. package/components/media/phi-media-picker-binding.d.ts +41 -33
  62. package/components/media/phi-media-picker-binding.js +2 -1
  63. package/components/media/use-media-library-add-picker.d.ts +33 -32
  64. package/components/overlays/phi-overlay-container-client.js +13 -11
  65. package/components/regions/phi-cms-region-shell.js +2 -2
  66. package/components/regions/presets/content-entry-editor-page-tree.js +12 -3
  67. package/components/regions/presets/phi-settings-page-shell-tree.d.ts +13 -2
  68. package/components/regions/presets/phi-settings-page-shell-tree.js +4 -4
  69. package/components/root/phi-root-theme-resolver.js +3 -0
  70. package/components/shell/phi-antd-icon.d.ts +1 -8
  71. package/components/shell/phi-antd-icon.js +1 -227
  72. package/components/shell/phi-icon-names.d.ts +22 -0
  73. package/components/shell/phi-icon-names.js +267 -0
  74. package/components/shell/phi-icon.d.ts +4 -15
  75. package/components/shell/phi-icon.js +9 -50
  76. package/components/tables/client/phi-table-binding-params.d.ts +24 -0
  77. package/components/tables/client/phi-table-binding-params.js +39 -0
  78. package/components/tables/client/phi-table-binding.d.ts +1 -3
  79. package/components/tables/client/phi-table-binding.js +5 -9
  80. package/components/widgets/client/shared/phi-button-icons.d.ts +6 -4
  81. package/components/widgets/client/shared/phi-button-icons.js +8 -12
  82. package/components/widgets/client/shared/phi-collection-binding-params.d.ts +8 -0
  83. package/components/widgets/client/shared/phi-collection-binding-params.js +13 -0
  84. package/components/widgets/client/shared/phi-collection-provider.d.ts +11 -1
  85. package/components/widgets/client/shared/phi-collection-provider.js +5 -0
  86. package/components/widgets/client/shared/phi-collection-view-binding.d.ts +1 -0
  87. package/components/widgets/client/shared/phi-command-buttons.d.ts +29 -2
  88. package/components/widgets/client/shared/phi-command-buttons.js +19 -5
  89. package/components/widgets/client/shared/phi-rendered-value.js +27 -3
  90. package/components/widgets/client/shared/phi-table-provider-refusal.d.ts +13 -0
  91. package/components/widgets/client/shared/phi-table-provider-refusal.js +13 -0
  92. package/components/widgets/config/background.d.ts +3 -2
  93. package/components/widgets/config/choice-shared.d.ts +10 -1
  94. package/components/widgets/config/choice-shared.js +8 -2
  95. package/components/widgets/label-sets/admin-locales.js +1 -1
  96. package/components/widgets/label-sets/admin-users.d.ts +3 -5
  97. package/components/widgets/label-sets/admin-users.js +6 -10
  98. package/components/widgets/label-sets/builder-modules.js +4 -0
  99. package/components/widgets/label-sets/effects.js +2 -4
  100. package/components/widgets/label-sets/profile.d.ts +13 -16
  101. package/components/widgets/label-sets/profile.js +24 -33
  102. package/components/widgets/label-sets/registration.d.ts +0 -1
  103. package/components/widgets/label-sets/registration.js +0 -2
  104. package/components/widgets/label-sets/revisions.js +2 -0
  105. package/components/widgets/label-sets/search-results.js +2 -4
  106. package/components/widgets/label-sets/signals.js +2 -0
  107. package/components/widgets/label-sets/table.js +9 -0
  108. package/components/widgets/label-types/builder-modules.d.ts +4 -0
  109. package/components/widgets/label-types/builder-modules.js +2 -0
  110. package/components/widgets/label-types/effects.d.ts +3 -2
  111. package/components/widgets/label-types/effects.js +1 -2
  112. package/components/widgets/label-types/revisions.d.ts +2 -0
  113. package/components/widgets/label-types/revisions.js +2 -1
  114. package/components/widgets/label-types/search-results.d.ts +2 -2
  115. package/components/widgets/label-types/search-results.js +1 -2
  116. package/components/widgets/label-types/signals.d.ts +2 -0
  117. package/components/widgets/label-types/signals.js +1 -0
  118. package/components/widgets/label-types/table.d.ts +3 -0
  119. package/components/widgets/label-types/table.js +2 -0
  120. package/components/widgets/server/builder-chrome.d.ts +4 -1
  121. package/components/widgets/server/builder-chrome.js +2 -2
  122. package/components/widgets/shared/markdown-body-client.d.ts +26 -0
  123. package/components/widgets/shared/markdown-body-client.js +31 -1
  124. package/components/widgets/shared/markdown-render.d.ts +10 -2
  125. package/components/widgets/shared/markdown-render.js +35 -13
  126. package/components/widgets/shared/widget-failure-audience.d.ts +7 -0
  127. package/components/widgets/shared/widget-failure-audience.js +21 -0
  128. package/components/widgets/shared/widget-failure-client.js +5 -2
  129. package/components/widgets/shared/widget-failure-notice-client.d.ts +6 -0
  130. package/components/widgets/shared/widget-failure-notice-client.js +10 -0
  131. package/components/widgets/shared/widget-failure-notice.d.ts +6 -0
  132. package/components/widgets/shared/widget-failure-notice.js +17 -0
  133. package/components/widgets/shared/widget-failure-staff.d.ts +3 -0
  134. package/components/widgets/shared/widget-failure-staff.js +18 -0
  135. package/components/widgets/shared/widget-failure.d.ts +9 -6
  136. package/components/widgets/shared/widget-failure.js +0 -9
  137. package/components/widgets/shared/widget-failure.server.d.ts +4 -2
  138. package/components/widgets/shared/widget-failure.server.js +8 -3
  139. package/constants/countries.d.ts +9 -0
  140. package/constants/countries.js +28 -0
  141. package/constants/customer-file.d.ts +34 -0
  142. package/constants/customer-file.js +35 -0
  143. package/constants/record-field-kinds.d.ts +15 -0
  144. package/constants/record-field-kinds.js +13 -0
  145. package/constants/runtime-module-ownership.js +15 -2
  146. package/constants/runtime-render-client-types.d.ts +5 -0
  147. package/constants/runtime-render-client-types.js +5 -0
  148. package/constants/site-address.d.ts +9 -0
  149. package/constants/site-address.js +10 -0
  150. package/constants/table-loading.d.ts +14 -0
  151. package/constants/table-loading.js +14 -0
  152. package/{plugins/runtime-modules/threads/controller/address.js → constants/threads-controller-address.js} +1 -1
  153. package/constants.d.ts +2 -0
  154. package/constants.js +4 -0
  155. package/gateway/form-handler-request.d.ts +22 -0
  156. package/gateway/form-handler-request.js +40 -0
  157. package/gateway/label-set.d.ts +15 -2
  158. package/gateway/label-set.js +60 -22
  159. package/gateway/site-cms-write-validation.js +19 -3
  160. package/gateway/site-form-route.js +11 -2
  161. package/helpers/address-field.d.ts +43 -0
  162. package/helpers/address-field.js +68 -0
  163. package/helpers/announced-action.d.ts +17 -0
  164. package/helpers/announced-action.js +29 -0
  165. package/helpers/cms-dialog.d.ts +5 -20
  166. package/helpers/cms-dialog.js +8 -13
  167. package/helpers/cms-page-catalog.d.ts +10 -0
  168. package/helpers/cms-page-catalog.js +19 -0
  169. package/helpers/cms-preset-nodes.d.ts +4 -4
  170. package/helpers/cms-preset-nodes.js +1 -1
  171. package/helpers/cms-region-keys.d.ts +1 -1
  172. package/helpers/country-names.d.ts +12 -0
  173. package/helpers/country-names.js +14 -0
  174. package/helpers/phi-metadata.d.ts +25 -1
  175. package/helpers/phi-metadata.js +53 -1
  176. package/helpers/phi-site-description.d.ts +11 -0
  177. package/helpers/phi-site-description.js +13 -0
  178. package/helpers/preset-form-check.d.ts +14 -0
  179. package/helpers/preset-form-check.js +12 -0
  180. package/helpers/preset-table-check.d.ts +38 -0
  181. package/helpers/preset-table-check.js +118 -0
  182. package/helpers/preset-text-source-check.d.ts +4 -1
  183. package/helpers/preset-text-source-check.js +6 -1
  184. package/helpers/preset-tree-contract-check.d.ts +3 -2
  185. package/helpers/preset-tree-contract-check.js +30 -5
  186. package/helpers/public-route-claims.d.ts +9 -1
  187. package/helpers/public-route-claims.js +23 -3
  188. package/helpers/record-fields.d.ts +1 -5
  189. package/helpers/record-fields.js +15 -6
  190. package/helpers/record-widget-binding.d.ts +10 -0
  191. package/helpers/record-widget-binding.js +35 -0
  192. package/helpers/record-widget.d.ts +1 -10
  193. package/helpers/record-widget.js +4 -33
  194. package/helpers/route-address-check.d.ts +22 -2
  195. package/helpers/route-address-check.js +29 -8
  196. package/helpers/site-address-row.d.ts +23 -0
  197. package/helpers/site-address-row.js +36 -0
  198. package/helpers/surface-style.d.ts +8 -1
  199. package/helpers/surface-style.js +12 -2
  200. package/helpers/table-widget-binding.d.ts +12 -0
  201. package/helpers/table-widget-binding.js +296 -0
  202. package/helpers/thread-inbox-row.d.ts +20 -0
  203. package/helpers/thread-inbox-row.js +26 -0
  204. package/helpers/translation-format.d.ts +26 -0
  205. package/helpers/translation-format.js +31 -0
  206. package/helpers/tree-widget-binding.d.ts +19 -0
  207. package/helpers/tree-widget-binding.js +72 -0
  208. package/helpers/typed-confirmation.d.ts +9 -0
  209. package/helpers/typed-confirmation.js +13 -0
  210. package/helpers/widget-binding-check.d.ts +22 -0
  211. package/helpers/widget-binding-check.js +91 -0
  212. package/module-labels.d.ts +1 -1
  213. package/module-labels.js +1 -1
  214. package/module-page-check.d.ts +3 -0
  215. package/module-page-check.js +3 -0
  216. package/module-records.d.ts +2 -2
  217. package/module-records.js +1 -0
  218. package/next/area-route.js +34 -1
  219. package/next/root-route.js +4 -4
  220. package/package.json +2 -2
  221. package/plugins/runtime-modules/accounting/customer-file-access.d.ts +11 -0
  222. package/plugins/runtime-modules/accounting/customer-file-access.js +12 -0
  223. package/plugins/runtime-modules/accounting/data-providers.js +1 -1
  224. package/plugins/runtime-modules/accounting/ids.d.ts +14 -0
  225. package/plugins/runtime-modules/accounting/ids.js +34 -0
  226. package/plugins/runtime-modules/accounting/presets.js +32 -5
  227. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.d.ts +78 -0
  228. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +136 -0
  229. package/plugins/runtime-modules/accounting/trees/accounting-products-label-set.js +2 -2
  230. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +29 -0
  231. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +450 -0
  232. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-products-page-tree.js +4 -0
  233. package/plugins/runtime-modules/app/client-data-providers.d.ts +7 -0
  234. package/plugins/runtime-modules/app/client-data-providers.js +9 -0
  235. package/plugins/runtime-modules/app/data-providers.d.ts +43 -0
  236. package/plugins/runtime-modules/app/data-providers.js +45 -0
  237. package/plugins/runtime-modules/app/definition.d.ts +60 -1
  238. package/plugins/runtime-modules/app/definition.js +2 -0
  239. package/plugins/runtime-modules/app/forms.d.ts +33 -3
  240. package/plugins/runtime-modules/app/forms.js +166 -31
  241. package/plugins/runtime-modules/app/ids.d.ts +8 -0
  242. package/plugins/runtime-modules/app/ids.js +9 -0
  243. package/plugins/runtime-modules/app/module.d.ts +60 -1
  244. package/plugins/runtime-modules/app/services/addresses-collection.d.ts +59 -0
  245. package/plugins/runtime-modules/app/services/addresses-collection.js +105 -0
  246. package/plugins/runtime-modules/app/trees/account-addresses-panel.d.ts +21 -0
  247. package/plugins/runtime-modules/app/trees/account-addresses-panel.js +143 -0
  248. package/plugins/runtime-modules/app/trees/addresses-label-set.d.ts +57 -0
  249. package/plugins/runtime-modules/app/trees/addresses-label-set.js +104 -0
  250. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.d.ts +1 -2
  251. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.js +28 -19
  252. package/plugins/runtime-modules/app/trees/profile-label-set.d.ts +1 -2
  253. package/plugins/runtime-modules/app/trees/profile-label-set.js +5 -14
  254. package/plugins/runtime-modules/asset/presets.d.ts +4 -0
  255. package/plugins/runtime-modules/asset/trees/phi-default-admin-media-settings-page-tree.js +5 -0
  256. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +4 -2
  257. package/plugins/runtime-modules/auth/trees/phi-auth-area-overlay-tree.server.js +4 -2
  258. package/plugins/runtime-modules/auth/trees/phi-default-admin-auth-settings-page-tree.js +2 -2
  259. package/plugins/runtime-modules/auth/widgets/logout/client.d.ts +1 -1
  260. package/plugins/runtime-modules/auth/widgets/logout/client.js +2 -2
  261. package/plugins/runtime-modules/auth/widgets/security/client.d.ts +5 -1
  262. package/plugins/runtime-modules/auth/widgets/security/client.js +12 -10
  263. package/plugins/runtime-modules/avatar/overlay-tree.server.js +1 -1
  264. package/plugins/runtime-modules/blog/presets.d.ts +4 -0
  265. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +16 -6
  266. package/plugins/runtime-modules/builder/clients/inspector-image-field.d.ts +2 -1
  267. package/plugins/runtime-modules/builder/clients/inspector-image-field.js +6 -3
  268. package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +3 -1
  269. package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.d.ts +23 -0
  270. package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.js +38 -0
  271. package/plugins/runtime-modules/builder/clients/mode-switch.d.ts +4 -1
  272. package/plugins/runtime-modules/builder/clients/mode-switch.js +2 -15
  273. package/plugins/runtime-modules/builder/clients/pages-workspace.js +2 -0
  274. package/plugins/runtime-modules/builder/clients/runtime-module-authoring-boundary.js +2 -1
  275. package/plugins/runtime-modules/builder/controller/draft-status-controller.js +28 -1
  276. package/plugins/runtime-modules/builder/controller/signal-wiring-controller.js +5 -1
  277. package/plugins/runtime-modules/builder/developer-workspace-types.d.ts +5 -0
  278. package/plugins/runtime-modules/builder/page-presets.server.d.ts +7 -0
  279. package/plugins/runtime-modules/builder/page-presets.server.js +10 -1
  280. package/plugins/runtime-modules/builder/persistence.js +4 -0
  281. package/plugins/runtime-modules/builder/public-route-collisions.js +8 -3
  282. package/plugins/runtime-modules/builder/signal-wiring-options.js +9 -2
  283. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +8 -1
  284. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +47 -7
  285. package/plugins/runtime-modules/builder/widgets/chrome/config.d.ts +6 -4
  286. package/plugins/runtime-modules/builder/widgets/chrome/config.js +11 -1
  287. package/plugins/runtime-modules/builder/widgets/inspector-header/authoring.d.ts +2 -2
  288. package/plugins/runtime-modules/builder/widgets/inspector-header/plugin.d.ts +2 -2
  289. package/plugins/runtime-modules/builder/widgets/mode-switch/plugin.js +1 -1
  290. package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +2 -2
  291. package/plugins/runtime-modules/client-manifests/app.js +3 -0
  292. package/plugins/runtime-modules/client-manifests/builder.js +10 -0
  293. package/plugins/runtime-modules/client-manifests/common.js +6 -0
  294. package/plugins/runtime-modules/content-entry-routes.d.ts +4 -0
  295. package/plugins/runtime-modules/contracts.js +31 -1
  296. package/plugins/runtime-modules/core/definition.d.ts +23 -0
  297. package/plugins/runtime-modules/core/form-providers.d.ts +23 -0
  298. package/plugins/runtime-modules/core/messaging/thread-inbox-table.d.ts +0 -17
  299. package/plugins/runtime-modules/core/messaging/thread-inbox-table.js +2 -23
  300. package/plugins/runtime-modules/core/widgets/card/config.d.ts +1 -2
  301. package/plugins/runtime-modules/core/widgets/card/config.js +0 -1
  302. package/plugins/runtime-modules/core/widgets/card/editor.js +1 -1
  303. package/plugins/runtime-modules/core/widgets/collection-view/client.js +5 -2
  304. package/plugins/runtime-modules/core/widgets/collection-view/config.js +8 -0
  305. package/plugins/runtime-modules/core/widgets/collection-view/site-address-binding.d.ts +55 -0
  306. package/plugins/runtime-modules/core/widgets/collection-view/site-address-binding.js +173 -0
  307. package/plugins/runtime-modules/core/widgets/collection-view/site-address-tiles.d.ts +48 -0
  308. package/plugins/runtime-modules/core/widgets/collection-view/site-address-tiles.js +67 -0
  309. package/plugins/runtime-modules/core/widgets/command-toolbar/client.js +3 -0
  310. package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +316 -1
  311. package/plugins/runtime-modules/core/widgets/command-toolbar/config.js +4 -4
  312. package/plugins/runtime-modules/core/widgets/description/config.d.ts +1 -1
  313. package/plugins/runtime-modules/core/widgets/dimension/config.d.ts +1 -1
  314. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +1 -1
  315. package/plugins/runtime-modules/core/widgets/float-button/client.js +4 -1
  316. package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +326 -3
  317. package/plugins/runtime-modules/core/widgets/float-button/config.js +5 -2
  318. package/plugins/runtime-modules/core/widgets/form/config.d.ts +1 -1
  319. package/plugins/runtime-modules/core/widgets/form/config.js +14 -1
  320. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +1 -1
  321. package/plugins/runtime-modules/core/widgets/header-navigation/client.js +1 -1
  322. package/plugins/runtime-modules/core/widgets/length/config.d.ts +1 -1
  323. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +1 -1
  324. package/plugins/runtime-modules/core/widgets/markdown/plugin.js +20 -7
  325. package/plugins/runtime-modules/core/widgets/markdown/server.d.ts +6 -2
  326. package/plugins/runtime-modules/core/widgets/markdown/server.js +2 -2
  327. package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.d.ts +12 -0
  328. package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.js +68 -0
  329. package/plugins/runtime-modules/core/widgets/number-input/config.d.ts +1 -1
  330. package/plugins/runtime-modules/core/widgets/record/client.js +2 -6
  331. package/plugins/runtime-modules/core/widgets/result/config.d.ts +1 -1
  332. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +1 -1
  333. package/plugins/runtime-modules/core/widgets/simple-text/config.js +1 -1
  334. package/plugins/runtime-modules/core/widgets/simple-text/plugin.js +2 -1
  335. package/plugins/runtime-modules/core/widgets/table/client.js +48 -51
  336. package/plugins/runtime-modules/core/widgets/table/config.d.ts +3 -3
  337. package/plugins/runtime-modules/core/widgets/table/config.js +9 -0
  338. package/plugins/runtime-modules/core/widgets/table/reader-query.d.ts +17 -0
  339. package/plugins/runtime-modules/core/widgets/table/reader-query.js +33 -0
  340. package/plugins/runtime-modules/core/widgets/thread-conversation/client.js +2 -2
  341. package/plugins/runtime-modules/core/widgets/thread-conversation/config.d.ts +6 -2
  342. package/plugins/runtime-modules/core/widgets/thread-conversation/config.js +6 -1
  343. package/plugins/runtime-modules/core/widgets/thread-widget-config.d.ts +10 -0
  344. package/plugins/runtime-modules/core/widgets/thread-widget-config.js +6 -0
  345. package/plugins/runtime-modules/core/widgets/tree/client.js +6 -6
  346. package/plugins/runtime-modules/dashboard/trees/dashboard-cards-page-tree.js +3 -1
  347. package/plugins/runtime-modules/descriptor-compiler.d.ts +19 -3
  348. package/plugins/runtime-modules/descriptor-compiler.js +44 -16
  349. package/plugins/runtime-modules/editor/presets.d.ts +4 -0
  350. package/plugins/runtime-modules/editor/trees/phi-default-editor-releases-page-tree.js +3 -1
  351. package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +5 -1
  352. package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +5 -1
  353. package/plugins/runtime-modules/localization/presets.d.ts +4 -0
  354. package/plugins/runtime-modules/localization/trees/editor-translations-widget-label-set.d.ts +2 -0
  355. package/plugins/runtime-modules/localization/trees/editor-translations-widget-label-set.js +2 -0
  356. package/plugins/runtime-modules/localization/trees/phi-default-admin-locales-page-tree.js +3 -1
  357. package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +9 -2
  358. package/plugins/runtime-modules/news/presets.d.ts +4 -0
  359. package/plugins/runtime-modules/observability/trees/phi-default-admin-logs-page-tree.js +6 -2
  360. package/plugins/runtime-modules/resolver.js +17 -0
  361. package/plugins/runtime-modules/revisions/controller/binding.d.ts +37 -0
  362. package/plugins/runtime-modules/revisions/controller/binding.js +75 -0
  363. package/plugins/runtime-modules/revisions/controller/client.d.ts +5 -0
  364. package/plugins/runtime-modules/revisions/controller/client.js +86 -60
  365. package/plugins/runtime-modules/revisions/controller/definition.d.ts +5 -0
  366. package/plugins/runtime-modules/revisions/controller/definition.js +10 -0
  367. package/plugins/runtime-modules/revisions/controller/draft-context-target.d.ts +25 -0
  368. package/plugins/runtime-modules/revisions/controller/draft-context-target.js +33 -0
  369. package/plugins/runtime-modules/revisions/forms.js +1 -1
  370. package/plugins/runtime-modules/revisions/page-ids.d.ts +1 -1
  371. package/plugins/runtime-modules/revisions/page-ids.js +4 -1
  372. package/plugins/runtime-modules/revisions/presets.d.ts +4 -0
  373. package/plugins/runtime-modules/revisions/services/options.js +14 -4
  374. package/plugins/runtime-modules/revisions/services/table.js +54 -25
  375. package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +79 -4
  376. package/plugins/runtime-modules/search/widgets/search-results/client.js +4 -2
  377. package/plugins/runtime-modules/theme/controller/runtime.js +14 -2
  378. package/plugins/runtime-modules/theme/presets.d.ts +4 -0
  379. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +105 -7
  380. package/plugins/runtime-modules/theme/widgets/brand-controls/config.d.ts +3 -2
  381. package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +2 -2
  382. package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +19 -7
  383. package/plugins/runtime-modules/threads/client-data-providers.js +10 -0
  384. package/plugins/runtime-modules/threads/controller/client.js +62 -2
  385. package/plugins/runtime-modules/threads/controller/definition.js +49 -1
  386. package/plugins/runtime-modules/threads/data-providers.d.ts +100 -2
  387. package/plugins/runtime-modules/threads/data-providers.js +96 -0
  388. package/plugins/runtime-modules/threads/definition.d.ts +100 -2
  389. package/plugins/runtime-modules/threads/definition.js +1 -1
  390. package/plugins/runtime-modules/threads/ids.d.ts +4 -0
  391. package/plugins/runtime-modules/threads/ids.js +5 -0
  392. package/plugins/runtime-modules/threads/services/customer-file-addresses.d.ts +30 -0
  393. package/plugins/runtime-modules/threads/services/customer-file-addresses.js +59 -0
  394. package/plugins/runtime-modules/threads/services/customer-file-read.d.ts +22 -0
  395. package/plugins/runtime-modules/threads/services/customer-file-read.js +101 -0
  396. package/plugins/runtime-modules/threads/services/customer-file-table.d.ts +126 -0
  397. package/plugins/runtime-modules/threads/services/customer-file-table.js +79 -0
  398. package/plugins/runtime-modules/threads/trees/phi-default-threads-page-tree.js +5 -3
  399. package/plugins/runtime-modules/user-management/client-data-providers.js +5 -0
  400. package/plugins/runtime-modules/user-management/data-providers.d.ts +159 -0
  401. package/plugins/runtime-modules/user-management/data-providers.js +101 -3
  402. package/plugins/runtime-modules/user-management/definition.d.ts +159 -0
  403. package/plugins/runtime-modules/user-management/ids.d.ts +9 -0
  404. package/plugins/runtime-modules/user-management/ids.js +9 -0
  405. package/plugins/runtime-modules/user-management/presets.js +17 -1
  406. package/plugins/runtime-modules/user-management/services/users-access-table.d.ts +378 -0
  407. package/plugins/runtime-modules/user-management/services/users-access-table.js +132 -0
  408. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.d.ts +90 -0
  409. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.js +122 -0
  410. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.d.ts +20 -0
  411. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.js +181 -0
  412. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +24 -18
  413. package/server-helpers/cms-page-record.d.ts +9 -1
  414. package/server-helpers/cms-page-record.js +11 -1
  415. package/server-helpers/cms-request.js +8 -5
  416. package/server-helpers/link-preview-image.d.ts +30 -0
  417. package/server-helpers/link-preview-image.js +57 -0
  418. package/server-helpers/runtime.js +0 -1
  419. package/server-helpers/search-text.js +3 -0
  420. package/server-helpers.d.ts +1 -1
  421. package/server-helpers.js +1 -1
  422. package/styles/controls.css +4 -2
  423. package/styles/layout.css +7 -0
  424. package/styles/shell.css +30 -6
  425. package/theme/phi-antd-token-resolver.d.ts +8 -0
  426. package/theme/phi-antd-token-resolver.js +10 -0
  427. package/theme/phi-theme-color.d.ts +19 -0
  428. package/theme/phi-theme-color.js +42 -0
  429. package/theme/phi-theme-composition.js +9 -0
  430. package/theme/phi-theme-gradients.js +4 -22
  431. package/theme/phi-theme-inverse-ground.d.ts +39 -0
  432. package/theme/phi-theme-inverse-ground.js +103 -0
  433. package/theme/phi-theme-palette-defaults.d.ts +16 -0
  434. package/theme/phi-theme-palette-defaults.js +103 -0
  435. package/theme/phi-theme-tokens.d.ts +2 -1
  436. package/theme/phi-theme-tokens.js +2 -0
  437. package/types/cms-module-descriptors.d.ts +14 -0
  438. package/types/cms-overlay.d.ts +13 -6
  439. package/types/cms-overlay.js +6 -22
  440. package/types/cms-plugins.d.ts +20 -3
  441. package/types/cms.d.ts +10 -0
  442. package/types/collection-provider.d.ts +27 -0
  443. package/types/collection-signal-values.d.ts +2 -0
  444. package/types/collection-signal-values.js +23 -0
  445. package/types/collection-view-widget.d.ts +9 -0
  446. package/types/core-widget-placements.d.ts +9 -3
  447. package/types/link-preview.d.ts +19 -0
  448. package/types/link-preview.js +19 -0
  449. package/types/record-provider.d.ts +22 -1
  450. package/types/signals.d.ts +2 -0
  451. package/types/signals.js +2 -0
  452. package/types/site-theme.d.ts +27 -0
  453. package/types/table-embed.d.ts +48 -0
  454. package/types/table-embed.js +1 -0
  455. package/types/table-widget.d.ts +29 -1
  456. package/types/table-widget.js +0 -282
  457. package/types/tree-widget.d.ts +0 -1
  458. package/types/tree-widget.js +0 -60
  459. package/types/widget-runtime.d.ts +3 -1
  460. package/types.d.ts +2 -1
  461. package/types.js +1 -1
  462. /package/{plugins/runtime-modules/threads/controller/address.d.ts → constants/threads-controller-address.d.ts} +0 -0
@@ -17,7 +17,7 @@ import { PhiSliderControl } from "./phi-slider-control";
17
17
  import { PhiTextControl } from "./phi-text-control";
18
18
  import { usePhiImmediatePicker } from "./use-phi-immediate-picker";
19
19
  import { PhiIcon } from "../shell/phi-icon";
20
- export function PhiMediaPickerControl({ open, value = null, assets, spaces = [], spaceValue = null, sources = [], sourceValue = "", sourceItems = [], sourceHasMore = false, importingItemId = null, sourceNotice = null, uploadPanel, uploadNotice = null, folders = [], folderValue = "/", query = "", page = 1, pageSize = 20, total = assets.length, minColumnWidth = PHI_MEDIA_PICKER_DEFAULT_COLUMN_WIDTH, loading, disabled, readOnly, placement = "left", showSearchBar = true, showFolderFilter = true, showPagination = true, trigger, isAssetSelectable, labels, getPopupContainer, popupRootClassName, onOpenChange, onQueryChange, onSpaceChange, onSourceChange, onSourceItemSelect, onSourceLoadMore, onFolderChange, onPageChange, onMinColumnWidthChange, onReload, onChange, onCommit, onDiscard, }) {
20
+ export function PhiMediaPickerControl({ open, value = null, assets, spaces = [], spaceValue = null, sources = [], sourceValue = "", sourceItems = [], sourceHasMore = false, importingItemId = null, sourceNotice = null, uploadPanel, uploadNotice = null, folders = [], folderValue = "/", query = "", page = 1, pageSize = 20, total = assets.length, minColumnWidth = PHI_MEDIA_PICKER_DEFAULT_COLUMN_WIDTH, loading, disabled, readOnly, placement = "bottom", showSearchBar = true, showFolderFilter = true, showPagination = true, trigger, isAssetSelectable, labels, getPopupContainer, popupRootClassName, onOpenChange, onQueryChange, onSpaceChange, onSourceChange, onSourceItemSelect, onSourceLoadMore, onFolderChange, onPageChange, onMinColumnWidthChange, onReload, onChange, onCommit, onDiscard, }) {
21
21
  const { token } = usePhiConfig();
22
22
  const locked = disabled || readOnly;
23
23
  const resolvedMinColumnWidth = normalizePhiMediaPickerMinColumnWidth(minColumnWidth);
@@ -1,2 +1,2 @@
1
1
  import type { PhiModalControlProps } from "./phi-modal-control";
2
- export declare function PhiModalControlAdapter({ open, title, header, body, footer, closable, keyboard, mask, mountPolicy, centered, controlSize, size, width, rootClassName, containerStyle, onDismiss, afterOpenChange, panelRef, }: PhiModalControlProps): import("react").JSX.Element;
2
+ export declare function PhiModalControlAdapter({ open, title, header, body, footer, closable, keyboard, mask, mountPolicy, centered, controlSize, size, minSize, maxSize, toldSize, rootClassName, containerStyle, onDismiss, afterOpenChange, panelRef, }: PhiModalControlProps): import("react").JSX.Element;
@@ -5,38 +5,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
5
  * Everything Ant Design's Modal brings -- the dialog, its motion and focus trap -- is paid by the pages
6
6
  * that open one, not by every page that could.
7
7
  */
8
- import { useEffect, useRef, useSyncExternalStore } from "react";
8
+ import { useEffect, useRef } from "react";
9
9
  import { Modal } from "antd";
10
10
  import { PHI_CONTROL, PHI_SPACE } from "../../theme/antd-css-var-contract";
11
11
  import { resolvePhiMotionDurationMs } from "../../helpers/motion";
12
12
  import { usePhiConfig } from "../root/phi-config-provider";
13
- import { PHI_MODAL_RESPONSIVE_MIN_WIDTH, PHI_OVERLAY_DEFAULT_MASK, resolvePhiModalResponsiveMode, resolvePhiModalWidth, resolvePhiOverlayDismissSource, resolvePhiOverlayMaskPresentation, } from "./phi-overlay-control-contract";
13
+ import { PHI_OVERLAY_DEFAULT_MASK, resolvePhiModalGeometry, resolvePhiOverlayDismissSource, resolvePhiOverlayMaskPresentation, } from "./phi-overlay-control-contract";
14
14
  import { usePhiHydrated } from "../state/use-phi-hydrated";
15
- const PHI_MODAL_MODE_QUERIES = [
16
- `(min-width: ${PHI_MODAL_RESPONSIVE_MIN_WIDTH.medium}px)`,
17
- `(min-width: ${PHI_MODAL_RESPONSIVE_MIN_WIDTH.wide}px)`,
18
- ];
19
- /** The viewport crosses one of the Modal's two thresholds far less often than it resizes. */
20
- function subscribeModalMode(onChange) {
21
- const queries = PHI_MODAL_MODE_QUERIES.map((query) => window.matchMedia(query));
22
- for (const query of queries)
23
- query.addEventListener("change", onChange);
24
- return () => {
25
- for (const query of queries)
26
- query.removeEventListener("change", onChange);
27
- };
28
- }
29
- function readModalMode() {
30
- return resolvePhiModalResponsiveMode(window.innerWidth);
31
- }
32
- function readServerModalMode() {
33
- return "compact";
34
- }
35
- const PHI_MODAL_WIDTH_BY_CONTROL_SIZE = {
36
- small: 520,
37
- medium: 720,
38
- large: 960,
39
- };
40
15
  /** What a dialog opens on: the first thing to type into or choose from, never a button or a hint. */
41
16
  const PHI_MODAL_FIRST_FIELD_SELECTOR = [
42
17
  "input:not([type=hidden]):not(:disabled)",
@@ -56,10 +31,11 @@ const PHI_MODAL_TAB_STOP_SELECTOR = [
56
31
  /** About a second: a Form that loads its descriptor late still gets the focus, a slower one does not. */
57
32
  const PHI_MODAL_FIRST_FIELD_MAX_FRAMES = 60;
58
33
  const PHI_MODAL_HEADER_MIN_BLOCK_SIZE = `calc(${PHI_CONTROL.md} + ${PHI_SPACE.xs} + ${PHI_SPACE.xs})`;
59
- export function PhiModalControlAdapter({ open, title, header, body, footer, closable = true, keyboard = true, mask = PHI_OVERLAY_DEFAULT_MASK, mountPolicy = "remount", centered = false, controlSize, size, width, rootClassName, containerStyle, onDismiss, afterOpenChange, panelRef, }) {
34
+ export function PhiModalControlAdapter({ open, title, header, body, footer, closable = true, keyboard = true, mask = PHI_OVERLAY_DEFAULT_MASK, mountPolicy = "remount", centered = false, controlSize, size, minSize, maxSize, toldSize, rootClassName, containerStyle, onDismiss, afterOpenChange, panelRef, }) {
60
35
  const { token } = usePhiConfig();
61
36
  const hydrated = usePhiHydrated();
62
- const mode = useSyncExternalStore(subscribeModalMode, readModalMode, readServerModalMode);
37
+ const geometry = resolvePhiModalGeometry({ size, minSize, maxSize, toldSize, controlSize });
38
+ const blockSize = geometry.blockSize;
63
39
  const bodyMeasureRef = useRef(null);
64
40
  const bodyContentRef = useRef(null);
65
41
  const dialogRef = useRef(null);
@@ -67,7 +43,7 @@ export function PhiModalControlAdapter({ open, title, header, body, footer, clos
67
43
  useEffect(() => {
68
44
  const bodyMeasure = bodyMeasureRef.current;
69
45
  const bodyContent = bodyContentRef.current;
70
- if (!open || !bodyMeasure || !bodyContent || size?.height != null || typeof ResizeObserver === "undefined") {
46
+ if (!open || !bodyMeasure || !bodyContent || blockSize != null || typeof ResizeObserver === "undefined") {
71
47
  return undefined;
72
48
  }
73
49
  let targetBlockSize = bodyContent.getBoundingClientRect().height;
@@ -105,7 +81,7 @@ export function PhiModalControlAdapter({ open, title, header, body, footer, clos
105
81
  resizeAnimationRef.current?.cancel();
106
82
  resizeAnimationRef.current = null;
107
83
  };
108
- }, [open, size?.height, token.motionDurationMid, token.motionEaseInOut]);
84
+ }, [open, blockSize, token.motionDurationMid, token.motionEaseInOut]);
109
85
  /*
110
86
  * Ant Design's lock moves the focus to the first focusable element, which is the close button, so a
111
87
  * dialog with a Form could not be typed into until Tab was pressed. The field may mount a few frames
@@ -156,11 +132,11 @@ export function PhiModalControlAdapter({ open, title, header, body, footer, clos
156
132
  transform: "translateY(-50%)",
157
133
  zIndex: 1,
158
134
  }, children: title }))] }));
159
- const resolvedWidth = size?.width ?? resolvePhiModalWidth(width, controlSize == null ? undefined : PHI_MODAL_WIDTH_BY_CONTROL_SIZE[controlSize], mode);
160
135
  // The wrapper covers the viewport; letting the pointer through means opening it, not just the mask.
161
136
  const passesOutsidePointer = !resolvedMask.capturesOutsidePointer;
162
- return (_jsx(Modal, { open: open, title: renderedTitle, closable: closable, keyboard: keyboard, mask: resolvedMask.adapterMask, destroyOnHidden: mountPolicy === "remount", forceRender: hydrated && mountPolicy === "eager", centered: centered, width: resolvedWidth, style: {
163
- maxWidth: `calc(100vw - ${PHI_SPACE.base} - ${PHI_SPACE.base})`,
137
+ return (_jsx(Modal, { open: open, title: renderedTitle, closable: closable, keyboard: keyboard, mask: resolvedMask.adapterMask, destroyOnHidden: mountPolicy === "remount", forceRender: hydrated && mountPolicy === "eager", centered: centered, width: geometry.width, style: {
138
+ ...(geometry.minWidth == null ? null : { minWidth: geometry.minWidth }),
139
+ maxWidth: geometry.maxWidth,
164
140
  transition: `width ${token.motionDurationMid} ${token.motionEaseInOut}`,
165
141
  }, rootClassName: rootClassName, footer: footer ?? null, focusable: { trap: true, focusTriggerAfterClose: true }, styles: {
166
142
  mask: resolvedMask.maskStyle,
@@ -170,8 +146,9 @@ export function PhiModalControlAdapter({ open, title, header, body, footer, clos
170
146
  display: "flex",
171
147
  flexDirection: "column",
172
148
  gap: 0,
173
- ...(size?.height == null ? {} : { blockSize: size.height }),
174
- maxBlockSize: `calc(100dvh - ${PHI_SPACE.lg} - ${PHI_SPACE.lg})`,
149
+ ...(blockSize == null ? {} : { blockSize }),
150
+ ...(geometry.minBlockSize == null ? {} : { minBlockSize: geometry.minBlockSize }),
151
+ maxBlockSize: geometry.maxBlockSize,
175
152
  overflow: "hidden",
176
153
  ...containerStyle,
177
154
  padding: 0,
@@ -220,6 +197,6 @@ export function PhiModalControlAdapter({ open, title, header, body, footer, clos
220
197
  minWidth: 0,
221
198
  overflow: "hidden",
222
199
  width: "100%",
223
- ...(size?.height == null ? {} : { minBlockSize: "100%" }),
200
+ ...(blockSize == null ? {} : { minBlockSize: "100%" }),
224
201
  }, children: _jsx("div", { ref: bodyContentRef, "data-phi-modal-body-content": "true", style: { minWidth: 0, width: "100%" }, children: body }) }) }));
225
202
  }
@@ -1,12 +1,12 @@
1
1
  import type { PhiControlSize } from "../../types/control";
2
2
  import type { PhiRenderableBlockSize } from "../../types/renderable-block";
3
- import type { PhiModalWidth, PhiOverlayControlCommonProps } from "./phi-overlay-control-contract";
4
- export type PhiModalControlProps = PhiOverlayControlCommonProps & {
3
+ import type { PhiOverlayControlCommonProps, PhiOverlayControlGeometryProps } from "./phi-overlay-control-contract";
4
+ export type PhiModalControlProps = PhiOverlayControlCommonProps & PhiOverlayControlGeometryProps & {
5
5
  centered?: boolean;
6
+ /** The width step where `size` names no width (`PHI_MODAL_WIDTH_BY_CONTROL_SIZE`). */
6
7
  controlSize?: PhiControlSize;
7
- size?: PhiRenderableBlockSize | null;
8
- /** One width, or one per responsive mode on the container scale (`PHI_MODAL_RESPONSIVE_MIN_WIDTH`). */
9
- width?: PhiModalWidth;
8
+ /** What a `size` Signal told the open Modal; each axis it names stands over the stated `size`. */
9
+ toldSize?: PhiRenderableBlockSize | null;
10
10
  rootClassName?: string;
11
11
  };
12
12
  /**
@@ -128,6 +128,7 @@ export declare function usePhiControlOptionsProvider<TValue extends string | num
128
128
  description?: string;
129
129
  icon?: string;
130
130
  parentValue?: TValue;
131
+ flags?: number;
131
132
  }[] | null;
132
133
  optionsProvider?: PhiControlOptionsProviderConfig | null;
133
134
  sourceConfig?: Record<string, unknown> | null;
@@ -46,6 +46,7 @@ function normalizeStaticOptions(options) {
46
46
  description: option.description,
47
47
  icon: option.icon,
48
48
  parentValue: option.parentValue,
49
+ flags: option.flags,
49
50
  }));
50
51
  }
51
52
  /**
@@ -1,7 +1,8 @@
1
1
  import type { CSSProperties, ReactNode } from "react";
2
+ import type { PhiControlSize } from "../../types/control";
2
3
  import type { PhiCmsMountPolicy } from "../../types/cms-mount-policy";
3
- import type { PhiCmsOverlaySize, PhiOverlayCloseSource, PhiOverlayMaskBehaviour } from "../../types/cms-overlay";
4
- import { type PhiResolvedResponsiveValue, type PhiResponsiveValue } from "../../types/responsive";
4
+ import type { PhiCmsOverlayConfig, PhiOverlayCloseSource, PhiOverlayMaskBehaviour } from "../../types/cms-overlay";
5
+ import type { PhiRenderableBlockSize } from "../../types/renderable-block";
5
6
  export type PhiOverlayControlDismissEvent = {
6
7
  target: EventTarget | null;
7
8
  key?: string;
@@ -55,26 +56,60 @@ export declare function resolvePhiOverlayMaskPresentation(mask: PhiOverlayMaskBe
55
56
  background?: string | undefined;
56
57
  };
57
58
  };
58
- export type PhiModalWidth = PhiCmsOverlaySize | PhiResponsiveValue<PhiCmsOverlaySize>;
59
- export type PhiModalResponsiveMode = keyof PhiResolvedResponsiveValue<unknown>;
60
59
  /**
61
- * Where a Modal's width switches from `compact` to `medium` and from `medium` to `wide`.
60
+ * An Overlay's geometry as a Control takes it: the block's own three pairs (`PhiCmsOverlayConfig`), one
61
+ * value per axis.
62
+ */
63
+ export type PhiOverlayControlGeometryProps = {
64
+ size?: PhiRenderableBlockSize | null;
65
+ minSize?: PhiRenderableBlockSize | null;
66
+ maxSize?: PhiRenderableBlockSize | null;
67
+ };
68
+ /** The width each `controlSize` step gives a Modal whose `size` names none. */
69
+ export declare const PHI_MODAL_WIDTH_BY_CONTROL_SIZE: Record<PhiControlSize, number>;
70
+ /** What a Modal draws of its geometry, as CSS: the dialog's width and box, and its container's height. */
71
+ export type PhiModalGeometry = {
72
+ /** Handed to the Modal as its width; undefined leaves it Ant Design's default. */
73
+ width: string | undefined;
74
+ minWidth: string | undefined;
75
+ maxWidth: string;
76
+ blockSize: string | undefined;
77
+ minBlockSize: string | undefined;
78
+ maxBlockSize: string;
79
+ };
80
+ /**
81
+ * A Modal's geometry, read once through the block's resolver.
62
82
  *
63
- * The container scale, the same pair the Form switches at, and not Ant Design's device breakpoints
64
- * (768/992): a Modal's box is the viewport it floats in, and a width stated per mode means "this much
65
- * room is there", which is the question the container scale answers.
83
+ * The width is the one a Signal told (`toldSize`, the `size` input), else the stated `size`, else the
84
+ * `controlSize` step; the height the told one, else the stated one, else none -- the Modal is as tall as
85
+ * its content up to the viewport. A minimum and a maximum are the stated ones, each held inside the
86
+ * viewport room, and with no maximum stated the viewport room is the maximum.
66
87
  */
67
- export declare const PHI_MODAL_RESPONSIVE_MIN_WIDTH: {
68
- readonly medium: 144 | 233 | 377 | 610 | 987;
69
- readonly wide: 144 | 233 | 377 | 610 | 987;
88
+ export declare function resolvePhiModalGeometry({ size, minSize, maxSize, toldSize, controlSize, }: PhiOverlayControlGeometryProps & {
89
+ toldSize?: PhiRenderableBlockSize | null;
90
+ controlSize?: PhiControlSize;
91
+ }): PhiModalGeometry;
92
+ /** What a Drawer draws of its geometry: the length along the axis it opens on, and its bounds. */
93
+ export type PhiDrawerGeometry = {
94
+ /**
95
+ * Handed to the Drawer as its `size`, a pixel length as a number (the Drawer warns on a string that is
96
+ * one); undefined leaves it Ant Design's default.
97
+ */
98
+ size: number | string | undefined;
99
+ /** How far a resizable Drawer may be dragged, where the stated maximum is in pixels. */
100
+ resizeMaxSize: number | undefined;
101
+ /** The bounds on the panel (`min-width`/`max-width`, or the height pair at `top` and `bottom`). */
102
+ style: CSSProperties;
70
103
  };
71
- export declare function resolvePhiModalResponsiveMode(availableWidth: number): PhiModalResponsiveMode;
72
104
  /**
73
- * The one width a Modal takes at one mode.
105
+ * A Drawer's geometry, read once through the block's resolver.
74
106
  *
75
- * A responsive width cascades like every responsive value (`resolvePhiResponsiveValue`): an unset mode
76
- * takes the nearest smaller one that is set, and a mode below every stated one takes `fallback` -- the
77
- * width `controlSize` gives, or none, which leaves the Modal its own default.
107
+ * A Drawer opens along one axis: `width` at `left` and `right`, `height` at `top` and `bottom`. The other
108
+ * axis is the viewport's, and what a config states for it is not drawn. The maximum reaches the panel as
109
+ * CSS whatever its unit, and Ant Design's resize as a limit only where it is in pixels, the one unit a
110
+ * drag counts in.
78
111
  */
79
- export declare function resolvePhiModalWidth(width: PhiModalWidth | undefined, fallback: PhiCmsOverlaySize | undefined, mode: PhiModalResponsiveMode): PhiCmsOverlaySize | undefined;
112
+ export declare function resolvePhiDrawerGeometry({ size, minSize, maxSize, placement, }: PhiOverlayControlGeometryProps & {
113
+ placement: PhiCmsOverlayConfig["placement"];
114
+ }): PhiDrawerGeometry;
80
115
  export declare function resolvePhiOverlayDismissSource(event: PhiOverlayControlDismissEvent): PhiOverlayCloseSource;
@@ -1,5 +1,5 @@
1
- import { PHI_CONTAINER_BREAKPOINT_COL3, PHI_CONTAINER_BREAKPOINT_CONTENT, } from "../../theme/phi-container-breakpoints";
2
- import { resolvePhiResponsiveValue, } from "../../types/responsive";
1
+ import { PHI_SPACE } from "../../theme/antd-css-var-contract";
2
+ import { resolvePhiRenderableBlockGeometry, } from "../../types/renderable-block-geometry";
3
3
  export const PHI_OVERLAY_DEFAULT_MASK = {
4
4
  appearance: "normal",
5
5
  allowOutsideInteraction: false,
@@ -36,41 +36,66 @@ export function resolvePhiOverlayMaskPresentation(mask) {
36
36
  },
37
37
  };
38
38
  }
39
+ /** The width each `controlSize` step gives a Modal whose `size` names none. */
40
+ export const PHI_MODAL_WIDTH_BY_CONTROL_SIZE = {
41
+ small: 520,
42
+ medium: 720,
43
+ large: 960,
44
+ };
39
45
  /**
40
- * Where a Modal's width switches from `compact` to `medium` and from `medium` to `wide`.
46
+ * The room a Modal never leaves: one `base` step clear of the viewport on both inline sides, one `lg`
47
+ * step on both block sides. Every stated length is held inside it, a minimum included, so a floor that
48
+ * keeps a Form in two columns on a desk does not push the dialog off a phone.
49
+ */
50
+ const PHI_MODAL_VIEWPORT_INLINE = `calc(100vw - ${PHI_SPACE.base} - ${PHI_SPACE.base})`;
51
+ const PHI_MODAL_VIEWPORT_BLOCK = `calc(100dvh - ${PHI_SPACE.lg} - ${PHI_SPACE.lg})`;
52
+ function withinViewport(length, viewport) {
53
+ return length == null ? undefined : `min(${length.css}, ${viewport})`;
54
+ }
55
+ /**
56
+ * A Modal's geometry, read once through the block's resolver.
41
57
  *
42
- * The container scale, the same pair the Form switches at, and not Ant Design's device breakpoints
43
- * (768/992): a Modal's box is the viewport it floats in, and a width stated per mode means "this much
44
- * room is there", which is the question the container scale answers.
58
+ * The width is the one a Signal told (`toldSize`, the `size` input), else the stated `size`, else the
59
+ * `controlSize` step; the height the told one, else the stated one, else none -- the Modal is as tall as
60
+ * its content up to the viewport. A minimum and a maximum are the stated ones, each held inside the
61
+ * viewport room, and with no maximum stated the viewport room is the maximum.
45
62
  */
46
- export const PHI_MODAL_RESPONSIVE_MIN_WIDTH = {
47
- medium: PHI_CONTAINER_BREAKPOINT_COL3,
48
- wide: PHI_CONTAINER_BREAKPOINT_CONTENT,
49
- };
50
- export function resolvePhiModalResponsiveMode(availableWidth) {
51
- if (availableWidth >= PHI_MODAL_RESPONSIVE_MIN_WIDTH.wide)
52
- return "wide";
53
- if (availableWidth >= PHI_MODAL_RESPONSIVE_MIN_WIDTH.medium)
54
- return "medium";
55
- return "compact";
63
+ export function resolvePhiModalGeometry({ size, minSize, maxSize, toldSize, controlSize, }) {
64
+ const stated = resolvePhiRenderableBlockGeometry({ size, minSize, maxSize });
65
+ const told = resolvePhiRenderableBlockGeometry({ size: toldSize });
66
+ const width = told.inline.size?.css
67
+ ?? stated.inline.size?.css
68
+ ?? (controlSize == null ? undefined : `${PHI_MODAL_WIDTH_BY_CONTROL_SIZE[controlSize]}px`);
69
+ return {
70
+ width,
71
+ minWidth: withinViewport(stated.inline.min, PHI_MODAL_VIEWPORT_INLINE),
72
+ maxWidth: withinViewport(stated.inline.max, PHI_MODAL_VIEWPORT_INLINE) ?? PHI_MODAL_VIEWPORT_INLINE,
73
+ blockSize: told.block.size?.css ?? stated.block.size?.css,
74
+ minBlockSize: withinViewport(stated.block.min, PHI_MODAL_VIEWPORT_BLOCK),
75
+ maxBlockSize: withinViewport(stated.block.max, PHI_MODAL_VIEWPORT_BLOCK) ?? PHI_MODAL_VIEWPORT_BLOCK,
76
+ };
56
77
  }
57
78
  /**
58
- * The one width a Modal takes at one mode.
79
+ * A Drawer's geometry, read once through the block's resolver.
59
80
  *
60
- * A responsive width cascades like every responsive value (`resolvePhiResponsiveValue`): an unset mode
61
- * takes the nearest smaller one that is set, and a mode below every stated one takes `fallback` -- the
62
- * width `controlSize` gives, or none, which leaves the Modal its own default.
81
+ * A Drawer opens along one axis: `width` at `left` and `right`, `height` at `top` and `bottom`. The other
82
+ * axis is the viewport's, and what a config states for it is not drawn. The maximum reaches the panel as
83
+ * CSS whatever its unit, and Ant Design's resize as a limit only where it is in pixels, the one unit a
84
+ * drag counts in.
63
85
  */
64
- export function resolvePhiModalWidth(width, fallback, mode) {
65
- if (width == null)
66
- return fallback;
67
- if (typeof width !== "object")
68
- return width;
69
- return resolvePhiResponsiveValue(width, {
70
- compact: fallback,
71
- medium: fallback,
72
- wide: fallback,
73
- })[mode];
86
+ export function resolvePhiDrawerGeometry({ size, minSize, maxSize, placement, }) {
87
+ const geometry = resolvePhiRenderableBlockGeometry({ size, minSize, maxSize });
88
+ const horizontal = placement === "left" || placement === "right";
89
+ const axis = horizontal ? geometry.inline : geometry.block;
90
+ const min = axis.min?.css;
91
+ const max = axis.max?.css;
92
+ return {
93
+ size: axis.size?.part?.unit === "px" ? axis.size.part.value : axis.size?.css,
94
+ resizeMaxSize: axis.max?.part?.unit === "px" ? axis.max.part.value : undefined,
95
+ style: horizontal
96
+ ? { ...(min == null ? null : { minWidth: min }), ...(max == null ? null : { maxWidth: max }) }
97
+ : { ...(min == null ? null : { minHeight: min }), ...(max == null ? null : { maxHeight: max }) },
98
+ };
74
99
  }
75
100
  export function resolvePhiOverlayDismissSource(event) {
76
101
  if ("key" in event && event.key === "Escape")
@@ -3,7 +3,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { Popover } from "antd";
4
4
  import { PHI_SPACE } from "../../theme/antd-css-var-contract";
5
5
  export function PhiPopoverControl({ open, content, children, title, trigger = "click", placement, disabled = false, destroyOnHidden = false, arrow, padding = "sm", popupContentStyle, zIndex, getPopupContainer, rootClassName, onOpenChange, }) {
6
- return (_jsx(Popover, { open: disabled ? false : open, content: content, title: title, trigger: trigger, placement: (placement === "auto" ? undefined : placement), destroyOnHidden: destroyOnHidden, arrow: arrow === false ? false : arrow === "point-at-center" ? { pointAtCenter: true } : undefined, styles: {
6
+ return (_jsx(Popover, { open: disabled ? false : open, content: content, title: title, trigger: trigger, placement: (placement === "auto" ? undefined : placement),
7
+ // Stated rather than left to the default: a popup wider than the room beside its trigger is moved
8
+ // into the window instead of pushing the page into a sideways scroll.
9
+ autoAdjustOverflow: true, destroyOnHidden: destroyOnHidden, arrow: arrow === false ? false : arrow === "point-at-center" ? { pointAtCenter: true } : undefined, styles: {
7
10
  container: {
8
11
  ...popupContentStyle,
9
12
  padding: PHI_SPACE[padding],
@@ -0,0 +1,21 @@
1
+ import { type PhiRevealOnceDialogLabels } from "./phi-reveal-once-dialog-labels";
2
+ /** Writes the value to the clipboard: true where it was written, false where the browser refused. */
3
+ export declare function copyPhiRevealedValue(value: string, clipboard?: Pick<Clipboard, "writeText"> | undefined): Promise<boolean>;
4
+ export type PhiRevealOnceDialogControlProps = {
5
+ /** The value shown once -- a new key's activation code. Null closes the Dialog. */
6
+ value: string | null;
7
+ title: string;
8
+ /** What the reader is told about it: that it is shown only now. */
9
+ description?: string;
10
+ labels?: Partial<PhiRevealOnceDialogLabels>;
11
+ /** Called when the Dialog closes, copied or not; the caller forgets the value then. */
12
+ onClose: () => void;
13
+ };
14
+ /**
15
+ * A value shown once, in a Dialog that copies it and closes: the answer of an act whose result is not kept
16
+ * anywhere it could be read again -- an activation code stored as its hash. The value stands in a code
17
+ * box the reader can select; "Copy and close" writes it to the clipboard and closes, and where the browser
18
+ * refuses, the Dialog stays open and says so. Nothing here keeps the value: the caller holds it until
19
+ * `onClose` and drops it then.
20
+ */
21
+ export declare function PhiRevealOnceDialogControl({ value, title, description, labels, onClose, }: PhiRevealOnceDialogControlProps): import("react").JSX.Element;
@@ -0,0 +1,52 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useState } from "react";
4
+ import { PhiDialogControl } from "./phi-dialog-control";
5
+ import { PhiTypographyControl } from "./phi-typography-control";
6
+ import { PhiIcon } from "../shell/phi-icon";
7
+ import { PHI_REVEAL_ONCE_DIALOG_DEFAULT_LABELS } from "./phi-reveal-once-dialog-labels";
8
+ /** Writes the value to the clipboard: true where it was written, false where the browser refused. */
9
+ export async function copyPhiRevealedValue(value, clipboard = typeof navigator === "undefined" ? undefined : navigator.clipboard) {
10
+ if (!clipboard)
11
+ return false;
12
+ try {
13
+ await clipboard.writeText(value);
14
+ return true;
15
+ }
16
+ catch {
17
+ return false;
18
+ }
19
+ }
20
+ /**
21
+ * A value shown once, in a Dialog that copies it and closes: the answer of an act whose result is not kept
22
+ * anywhere it could be read again -- an activation code stored as its hash. The value stands in a code
23
+ * box the reader can select; "Copy and close" writes it to the clipboard and closes, and where the browser
24
+ * refuses, the Dialog stays open and says so. Nothing here keeps the value: the caller holds it until
25
+ * `onClose` and drops it then.
26
+ */
27
+ export function PhiRevealOnceDialogControl({ value, title, description, labels, onClose, }) {
28
+ const words = { ...PHI_REVEAL_ONCE_DIALOG_DEFAULT_LABELS, ...labels };
29
+ const [failed, setFailed] = useState(false);
30
+ const close = () => {
31
+ setFailed(false);
32
+ onClose();
33
+ };
34
+ const copyAndClose = async () => {
35
+ if (value == null)
36
+ return;
37
+ if (await copyPhiRevealedValue(value))
38
+ close();
39
+ else
40
+ setFailed(true);
41
+ };
42
+ return (_jsxs(PhiDialogControl, { open: value != null, title: title, alert: failed ? { level: "warning", showIcon: true, title: words.copyFailed } : null, actions: [
43
+ { key: "close", label: words.close, onClick: close },
44
+ {
45
+ key: "copy",
46
+ label: words.copyAndClose,
47
+ type: "primary",
48
+ icon: _jsx(PhiIcon, { name: "copy", size: "inherit" }),
49
+ onClick: () => void copyAndClose(),
50
+ },
51
+ ], onDismiss: close, children: [description ? _jsx(PhiTypographyControl, { type: "secondary", children: description }) : null, _jsx(PhiTypographyControl, { code: true, style: { fontSize: "1.25em", userSelect: "all", wordBreak: "break-all" }, children: value ?? "" })] }));
52
+ }
@@ -0,0 +1,10 @@
1
+ /** The words of `PhiRevealOnceDialogControl`, apart from it so a server Label Set can name them. */
2
+ export type PhiRevealOnceDialogLabels = {
3
+ /** The primary button: copies the value and closes. */
4
+ copyAndClose: string;
5
+ /** Closes without copying. */
6
+ close: string;
7
+ /** Said where the browser refused the copy; the value stays on screen to be selected by hand. */
8
+ copyFailed: string;
9
+ };
10
+ export declare const PHI_REVEAL_ONCE_DIALOG_DEFAULT_LABELS: PhiRevealOnceDialogLabels;
@@ -0,0 +1,5 @@
1
+ export const PHI_REVEAL_ONCE_DIALOG_DEFAULT_LABELS = {
2
+ copyAndClose: "Copy and close",
3
+ close: "Close",
4
+ copyFailed: "The value could not be copied. Select it and copy it by hand before closing.",
5
+ };
@@ -122,6 +122,12 @@ export type PhiTableControlProps<TRow extends Record<string, unknown>> = {
122
122
  rowReordering?: PhiTableControlRowReordering;
123
123
  editing?: PhiTableControlRowEditing<TRow>;
124
124
  loading?: boolean;
125
+ /**
126
+ * How many skeleton rows stand in for the rows while they load: three unless a Table says otherwise
127
+ * (`PHI_TABLE_LOADING_ROWS`). Few on purpose -- a Table grows when its rows arrive rather than shrinks,
128
+ * and most Tables hold a handful of rows (TABLES.md, "Loading").
129
+ */
130
+ loadingRows?: number;
125
131
  bordered?: boolean;
126
132
  striped?: boolean;
127
133
  showHeader?: boolean;
@@ -149,4 +155,4 @@ export type PhiTableControlProps<TRow extends Record<string, unknown>> = {
149
155
  onExternalDrop?: (event: DragEvent<HTMLDivElement>) => void;
150
156
  };
151
157
  export declare function readPhiTableControlValue(row: Record<string, unknown>, path: string): unknown;
152
- export declare function PhiTableControl<TRow extends Record<string, unknown>>({ rows, rowIdentityPath, columns, columnOrder, sortingMode, sorts, onSortsChange, columnReordering, onColumnOrderChange, rowSelection, pagination, tree, rowReordering, editing, loading, bordered, striped, stickyHeader, showHeader, footer, summary, size, emptyText, layout, rowStyle, onRowActivate, onExternalRowDragOver, onExternalRowDrop, onExternalDragOver, onExternalDrop, }: PhiTableControlProps<TRow>): import("react").JSX.Element;
158
+ export declare function PhiTableControl<TRow extends Record<string, unknown>>({ rows, rowIdentityPath, columns, columnOrder, sortingMode, sorts, onSortsChange, columnReordering, onColumnOrderChange, rowSelection, pagination, tree, rowReordering, editing, loading, loadingRows: loadingRowCount, bordered, striped, stickyHeader, showHeader, footer, summary, size, emptyText, layout, rowStyle, onRowActivate, onExternalRowDragOver, onExternalRowDrop, onExternalDragOver, onExternalDrop, }: PhiTableControlProps<TRow>): import("react").JSX.Element;
@@ -9,6 +9,7 @@ import { flushSync } from "react-dom";
9
9
  import { Children, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useMemo, useRef, useState, } from "react";
10
10
  import { PHI_GREGORY_CALENDAR_ADAPTER_KEY } from "../../types/calendar-keys";
11
11
  import { PHI_VISUAL_ANCHOR_PART_ATTRIBUTE } from "../../types/visual-anchors";
12
+ import { PHI_TABLE_LOADING_ROWS, PHI_TABLE_LOADING_ROWS_MAX } from "../../constants/table-loading";
12
13
  import { PhiTruncatedHoverText } from "./phi-truncated-hover-text";
13
14
  import { PhiColorControl } from "./phi-color-control";
14
15
  import { PhiCheckboxControl } from "./phi-checkbox-control";
@@ -207,8 +208,9 @@ function buildColumnStyle(sizing) {
207
208
  };
208
209
  }
209
210
  function buildLoadingSkeletonStyle(width, cellPaddingInline) {
211
+ // A column that sizes to its content gets a skeleton a short word wide, so it does not collapse to nothing.
210
212
  if (width == null)
211
- return { display: "block", width: "100%", minWidth: 24 };
213
+ return { display: "block", width: "100%", minWidth: 48 };
212
214
  const contentWidth = typeof width === "number"
213
215
  ? Math.max(24, width - cellPaddingInline * 2)
214
216
  : `max(24px, calc(${width} - ${cellPaddingInline * 2}px))`;
@@ -377,7 +379,7 @@ const PHI_TABLE_COLUMN_TITLE_STYLE = { display: "block", minWidth: 0, overflow:
377
379
  function renderPhiTableColumnTitle(title) {
378
380
  return (_jsx(PhiTruncatedHoverText, { title: title, children: _jsx("span", { style: PHI_TABLE_COLUMN_TITLE_STYLE, children: title }) }));
379
381
  }
380
- export function PhiTableControl({ rows, rowIdentityPath, columns, columnOrder, sortingMode, sorts, onSortsChange, columnReordering = false, onColumnOrderChange, rowSelection, pagination = false, tree, rowReordering, editing, loading = false, bordered, striped = false, stickyHeader = false, showHeader, footer, summary, size, emptyText, layout, rowStyle, onRowActivate, onExternalRowDragOver, onExternalRowDrop, onExternalDragOver, onExternalDrop, }) {
382
+ export function PhiTableControl({ rows, rowIdentityPath, columns, columnOrder, sortingMode, sorts, onSortsChange, columnReordering = false, onColumnOrderChange, rowSelection, pagination = false, tree, rowReordering, editing, loading = false, loadingRows: loadingRowCount = PHI_TABLE_LOADING_ROWS, bordered, striped = false, stickyHeader = false, showHeader, footer, summary, size, emptyText, layout, rowStyle, onRowActivate, onExternalRowDragOver, onExternalRowDrop, onExternalDragOver, onExternalDrop, }) {
381
383
  const { token } = usePhiConfig();
382
384
  const [editingRowIdentityState, setEditingRowIdentity] = useState(null);
383
385
  const [rowEditPatch, setRowEditPatch] = useState({});
@@ -709,9 +711,8 @@ export function PhiTableControl({ rows, rowIdentityPath, columns, columnOrder, s
709
711
  const visibleRows = useMemo(() => tree
710
712
  ? flattenVisibleTreeRows(dataSource, rowIdentityPath, tree.expandedRowIdentities)
711
713
  : dataSource, [dataSource, rowIdentityPath, tree]);
712
- const loadingSkeletonRows = pagination === false
713
- ? 5
714
- : Math.min(8, Math.max(3, pagination.pageSize));
714
+ // Never more than a page holds: a Table that pages by five does not load as ten.
715
+ const loadingSkeletonRows = Math.max(1, Math.min(Math.trunc(loadingRowCount), pagination === false ? PHI_TABLE_LOADING_ROWS_MAX : pagination.pageSize)) || PHI_TABLE_LOADING_ROWS;
715
716
  const loadingRows = useMemo(() => Array.from({ length: loadingSkeletonRows }, (_, index) => ({
716
717
  [PHI_TABLE_LOADING_ROW]: index,
717
718
  })), [loadingSkeletonRows]);
@@ -737,12 +738,13 @@ export function PhiTableControl({ rows, rowIdentityPath, columns, columnOrder, s
737
738
  const controlColumns = useMemo(() => {
738
739
  return [
739
740
  ...rowDragColumn,
740
- ...(rowSelection && !loading ? [Table.SELECTION_COLUMN] : []),
741
+ // Kept while loading, its controls disabled, so the columns do not move when the rows arrive.
742
+ ...(rowSelection ? [Table.SELECTION_COLUMN] : []),
741
743
  ...antdColumns,
742
744
  ...rowEditingColumn,
743
745
  ...fallbackRowOrderingColumn,
744
746
  ];
745
- }, [antdColumns, fallbackRowOrderingColumn, loading, rowDragColumn, rowEditingColumn, rowSelection]);
747
+ }, [antdColumns, fallbackRowOrderingColumn, rowDragColumn, rowEditingColumn, rowSelection]);
746
748
  const loadingSkeletonWidths = useMemo(() => new Map(orderedColumns.flatMap((column) => {
747
749
  const width = column.sizing?.mode === "fixed"
748
750
  ? column.sizing.width
@@ -1004,6 +1006,18 @@ export function PhiTableControl({ rows, rowIdentityPath, columns, columnOrder, s
1004
1006
  getCheckboxProps: (row) => ({ disabled: rowSelection.isRowDisabled?.(row) ?? false }),
1005
1007
  }
1006
1008
  : undefined;
1009
+ /*
1010
+ * The selection column of a loading Table: the same column, nothing chosen and nothing to choose, so
1011
+ * the skeleton has the width the rows will have.
1012
+ */
1013
+ const loadingRowSelection = antdRowSelection
1014
+ ? {
1015
+ type: antdRowSelection.type,
1016
+ fixed: antdRowSelection.fixed,
1017
+ selectedRowKeys: [],
1018
+ getCheckboxProps: () => ({ disabled: true }),
1019
+ }
1020
+ : undefined;
1007
1021
  /*
1008
1022
  * Whether something of the Table's own stands at its bottom edge. A sticky-top summary does not: it
1009
1023
  * rides above the rows and leaves the last row to end the Table.
@@ -1038,11 +1052,12 @@ export function PhiTableControl({ rows, rowIdentityPath, columns, columnOrder, s
1038
1052
  stickyHeader && showHeader !== false ? "phi-table-control--sticky-header" : null,
1039
1053
  // No rows, nothing measured: the sticky header's fixed layout would have no widths to fix.
1040
1054
  !loading && dataSource.length === 0 ? "phi-table-control--empty" : null,
1055
+ loading ? "phi-table-control--loading" : null,
1041
1056
  ]
1042
1057
  .filter(Boolean)
1043
1058
  .join(" "), style: { "--phi-table-striped-row-background": token.colorFillAlter }, rowKey: (row) => loading
1044
1059
  ? `__phi_table_loading_${String(row[PHI_TABLE_LOADING_ROW])}`
1045
- : String(readIdentity(row, rowIdentityPath)), columns: renderedColumns, dataSource: loading ? loadingRows : dataSource, bordered: bordered, showHeader: showHeader, tableLayout: layout.mode, size: size, rowClassName: (_row, index) => striped && index % 2 === 1 ? "phi-table-control__row--striped" : "", rowSelection: loading ? undefined : antdRowSelection, components: rowReordering?.enabled && !loading ? { body: { row: PhiTableSortableRow } } : undefined, scroll: layout.overflowX === "auto" ? { x: true } : undefined, sticky: stickyHeader && showHeader !== false ? true : undefined, pagination: pagination === false ? false : {
1060
+ : String(readIdentity(row, rowIdentityPath)), columns: renderedColumns, dataSource: loading ? loadingRows : dataSource, bordered: bordered, showHeader: showHeader, tableLayout: layout.mode, size: size, rowClassName: (_row, index) => striped && index % 2 === 1 ? "phi-table-control__row--striped" : "", rowSelection: loading ? loadingRowSelection : antdRowSelection, components: rowReordering?.enabled && !loading ? { body: { row: PhiTableSortableRow } } : undefined, scroll: layout.overflowX === "auto" ? { x: true } : undefined, sticky: stickyHeader && showHeader !== false ? true : undefined, pagination: pagination === false ? false : {
1046
1061
  ...{ [PHI_VISUAL_ANCHOR_PART_ATTRIBUTE]: "pagination" },
1047
1062
  current: pagination.page,
1048
1063
  pageSize: pagination.pageSize,
@@ -0,0 +1,22 @@
1
+ import type { PhiControlOption } from "../controls/phi-control-options";
2
+ /**
3
+ * The `flags` field: several yes-or-no answers held as one bit-flag number, the shape every yes-or-no
4
+ * state of a Core contract has. Each option's `value` is its bit, written as the decimal number
5
+ * (`"1"`, `"2"`, `"4"`, ...); the value is the sum of the bits checked, `0` for none. `config.requires`
6
+ * names, by option value, the option an option needs: it is offered only while that one is checked and
7
+ * is cleared when it is unchecked -- a default only for a purpose the address has.
8
+ */
9
+ export type PhiFlagsFieldConfig = {
10
+ bits: ReadonlyMap<string, number>;
11
+ requires: ReadonlyMap<number, number>;
12
+ };
13
+ /** The field's bits and dependencies, or an Error naming what is wrong: a field nobody can read the value of is refused. */
14
+ export declare function readPhiFlagsFieldConfig(config: Readonly<Record<string, unknown>> | undefined, options: readonly Pick<PhiControlOption, "value">[]): PhiFlagsFieldConfig;
15
+ /** The value as a number of the field's bits: anything else is none, and bits it does not offer are kept. */
16
+ export declare function readPhiFlagsFieldValue(value: unknown): number;
17
+ /**
18
+ * The value after a change of the checked options: the bits of those checked set, the field's other bits
19
+ * cleared, an option whose required one is not set cleared with it, and bits the field does not offer
20
+ * kept as they were.
21
+ */
22
+ export declare function writePhiFlagsFieldValue(config: PhiFlagsFieldConfig, previous: number, checked: readonly string[]): number;