@phis/ui 0.7.8 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/components/controls/phi-address-control.d.ts +23 -0
  2. package/components/controls/phi-address-control.js +43 -0
  3. package/components/controls/phi-color-control.d.ts +3 -1
  4. package/components/controls/phi-color-control.js +2 -2
  5. package/components/controls/phi-country-select-control.d.ts +22 -0
  6. package/components/controls/phi-country-select-control.js +16 -0
  7. package/components/controls/phi-dialog-control.d.ts +1 -1
  8. package/components/controls/phi-drawer-control-adapter.d.ts +1 -1
  9. package/components/controls/phi-drawer-control-adapter.js +5 -3
  10. package/components/controls/phi-drawer-control.d.ts +7 -5
  11. package/components/controls/phi-float-button-control.d.ts +8 -1
  12. package/components/controls/phi-float-button-control.js +19 -3
  13. package/components/controls/phi-form-control.js +52 -8
  14. package/components/controls/phi-modal-control-adapter.d.ts +1 -1
  15. package/components/controls/phi-modal-control-adapter.js +14 -37
  16. package/components/controls/phi-modal-control.d.ts +5 -5
  17. package/components/controls/phi-options-provider.d.ts +1 -0
  18. package/components/controls/phi-options-provider.js +1 -0
  19. package/components/controls/phi-overlay-control-contract.d.ts +52 -17
  20. package/components/controls/phi-overlay-control-contract.js +55 -30
  21. package/components/controls/phi-reveal-once-dialog-control.d.ts +21 -0
  22. package/components/controls/phi-reveal-once-dialog-control.js +52 -0
  23. package/components/controls/phi-reveal-once-dialog-labels.d.ts +10 -0
  24. package/components/controls/phi-reveal-once-dialog-labels.js +5 -0
  25. package/components/forms/flags-field.d.ts +22 -0
  26. package/components/forms/flags-field.js +58 -0
  27. package/components/forms/form-option-flags.d.ts +20 -0
  28. package/components/forms/form-option-flags.js +38 -0
  29. package/components/forms/form-provider-contract.d.ts +23 -0
  30. package/components/forms/form-provider-contract.js +36 -0
  31. package/components/forms/form-provider-registry.d.ts +5 -1
  32. package/components/forms/shared-form-provider-registry.js +13 -0
  33. package/components/forms/structured-field-labels.d.ts +24 -0
  34. package/components/forms/structured-field-labels.js +43 -0
  35. package/components/forms/structured-form-field-controls.d.ts +12 -0
  36. package/components/forms/structured-form-field-controls.js +65 -0
  37. package/components/overlays/phi-overlay-container-client.js +2 -2
  38. package/components/regions/phi-cms-region-shell.js +2 -2
  39. package/components/regions/presets/content-entry-editor-page-tree.js +12 -3
  40. package/components/regions/presets/phi-settings-page-shell-tree.d.ts +6 -2
  41. package/components/regions/presets/phi-settings-page-shell-tree.js +1 -1
  42. package/components/root/phi-root-theme-resolver.js +3 -0
  43. package/components/shell/phi-antd-icon.d.ts +1 -8
  44. package/components/shell/phi-antd-icon.js +1 -227
  45. package/components/shell/phi-icon-names.d.ts +19 -0
  46. package/components/shell/phi-icon-names.js +264 -0
  47. package/components/shell/phi-icon.d.ts +2 -11
  48. package/components/shell/phi-icon.js +4 -32
  49. package/components/widgets/client/shared/phi-command-buttons.d.ts +13 -2
  50. package/components/widgets/client/shared/phi-command-buttons.js +10 -4
  51. package/components/widgets/client/shared/phi-rendered-value.js +27 -3
  52. package/components/widgets/client/shared/phi-table-provider-refusal.d.ts +13 -0
  53. package/components/widgets/client/shared/phi-table-provider-refusal.js +13 -0
  54. package/components/widgets/config/background.d.ts +3 -2
  55. package/components/widgets/config/choice-shared.d.ts +10 -1
  56. package/components/widgets/config/choice-shared.js +8 -2
  57. package/components/widgets/label-sets/admin-locales.js +1 -1
  58. package/components/widgets/label-sets/admin-users.d.ts +2 -5
  59. package/components/widgets/label-sets/admin-users.js +4 -10
  60. package/components/widgets/label-sets/effects.js +2 -4
  61. package/components/widgets/label-sets/profile.d.ts +13 -0
  62. package/components/widgets/label-sets/profile.js +28 -0
  63. package/components/widgets/label-sets/search-results.js +2 -4
  64. package/components/widgets/label-sets/table.js +9 -0
  65. package/components/widgets/label-types/effects.d.ts +3 -2
  66. package/components/widgets/label-types/effects.js +1 -2
  67. package/components/widgets/label-types/search-results.d.ts +2 -2
  68. package/components/widgets/label-types/search-results.js +1 -2
  69. package/components/widgets/label-types/table.d.ts +3 -0
  70. package/components/widgets/label-types/table.js +2 -0
  71. package/components/widgets/server/builder-chrome.d.ts +4 -1
  72. package/components/widgets/server/builder-chrome.js +2 -2
  73. package/components/widgets/shared/markdown-body-client.d.ts +26 -0
  74. package/components/widgets/shared/markdown-body-client.js +31 -1
  75. package/components/widgets/shared/markdown-render.d.ts +10 -2
  76. package/components/widgets/shared/markdown-render.js +35 -13
  77. package/constants/countries.d.ts +9 -0
  78. package/constants/countries.js +28 -0
  79. package/constants/customer-file.d.ts +25 -0
  80. package/constants/customer-file.js +26 -0
  81. package/constants/record-field-kinds.d.ts +15 -0
  82. package/constants/record-field-kinds.js +13 -0
  83. package/constants/runtime-module-ownership.js +12 -0
  84. package/constants/runtime-render-client-types.d.ts +5 -0
  85. package/constants/runtime-render-client-types.js +5 -0
  86. package/{plugins/runtime-modules/threads/controller/address.js → constants/threads-controller-address.js} +1 -1
  87. package/constants.d.ts +1 -0
  88. package/constants.js +2 -0
  89. package/gateway/form-handler-request.d.ts +22 -0
  90. package/gateway/form-handler-request.js +40 -0
  91. package/gateway/label-set.d.ts +15 -2
  92. package/gateway/label-set.js +60 -22
  93. package/gateway/site-form-route.js +11 -2
  94. package/helpers/address-field.d.ts +43 -0
  95. package/helpers/address-field.js +68 -0
  96. package/helpers/cms-dialog.d.ts +5 -20
  97. package/helpers/cms-dialog.js +8 -13
  98. package/helpers/cms-page-catalog.d.ts +10 -0
  99. package/helpers/cms-page-catalog.js +19 -0
  100. package/helpers/cms-preset-nodes.d.ts +4 -4
  101. package/helpers/cms-preset-nodes.js +1 -1
  102. package/helpers/cms-region-keys.d.ts +1 -1
  103. package/helpers/country-names.d.ts +12 -0
  104. package/helpers/country-names.js +14 -0
  105. package/helpers/phi-metadata.d.ts +33 -1
  106. package/helpers/phi-metadata.js +62 -1
  107. package/helpers/preset-table-check.d.ts +34 -0
  108. package/helpers/preset-table-check.js +124 -0
  109. package/helpers/preset-text-source-check.d.ts +4 -1
  110. package/helpers/preset-text-source-check.js +6 -1
  111. package/helpers/preset-tree-contract-check.d.ts +3 -2
  112. package/helpers/preset-tree-contract-check.js +30 -5
  113. package/helpers/public-route-claims.d.ts +9 -1
  114. package/helpers/public-route-claims.js +23 -3
  115. package/helpers/record-fields.d.ts +1 -5
  116. package/helpers/record-fields.js +15 -6
  117. package/helpers/route-address-check.d.ts +22 -2
  118. package/helpers/route-address-check.js +29 -8
  119. package/helpers/site-address-row.d.ts +23 -0
  120. package/helpers/site-address-row.js +36 -0
  121. package/helpers/surface-style.d.ts +8 -1
  122. package/helpers/surface-style.js +12 -2
  123. package/helpers/thread-inbox-row.d.ts +20 -0
  124. package/helpers/thread-inbox-row.js +26 -0
  125. package/helpers/translation-format.d.ts +26 -0
  126. package/helpers/translation-format.js +31 -0
  127. package/module-labels.d.ts +1 -1
  128. package/module-labels.js +1 -1
  129. package/module-page-check.d.ts +1 -0
  130. package/module-page-check.js +1 -0
  131. package/module-records.d.ts +2 -2
  132. package/module-records.js +1 -0
  133. package/next/area-route.js +34 -1
  134. package/next/root-route.js +4 -5
  135. package/package.json +2 -2
  136. package/plugins/runtime-modules/accounting/customer-file-access.d.ts +11 -0
  137. package/plugins/runtime-modules/accounting/customer-file-access.js +12 -0
  138. package/plugins/runtime-modules/accounting/data-providers.js +1 -1
  139. package/plugins/runtime-modules/accounting/ids.d.ts +11 -0
  140. package/plugins/runtime-modules/accounting/ids.js +23 -0
  141. package/plugins/runtime-modules/accounting/presets.js +32 -5
  142. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.d.ts +66 -0
  143. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +122 -0
  144. package/plugins/runtime-modules/accounting/trees/accounting-products-label-set.js +2 -2
  145. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +26 -0
  146. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +381 -0
  147. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-products-page-tree.js +4 -0
  148. package/plugins/runtime-modules/app/client-data-providers.d.ts +7 -0
  149. package/plugins/runtime-modules/app/client-data-providers.js +9 -0
  150. package/plugins/runtime-modules/app/data-providers.d.ts +98 -0
  151. package/plugins/runtime-modules/app/data-providers.js +80 -0
  152. package/plugins/runtime-modules/app/definition.d.ts +131 -0
  153. package/plugins/runtime-modules/app/definition.js +2 -0
  154. package/plugins/runtime-modules/app/forms.d.ts +46 -1
  155. package/plugins/runtime-modules/app/forms.js +195 -1
  156. package/plugins/runtime-modules/app/ids.d.ts +7 -0
  157. package/plugins/runtime-modules/app/ids.js +8 -0
  158. package/plugins/runtime-modules/app/module.d.ts +131 -0
  159. package/plugins/runtime-modules/app/services/addresses-table.d.ts +135 -0
  160. package/plugins/runtime-modules/app/services/addresses-table.js +101 -0
  161. package/plugins/runtime-modules/app/trees/account-addresses-panel.d.ts +17 -0
  162. package/plugins/runtime-modules/app/trees/account-addresses-panel.js +179 -0
  163. package/plugins/runtime-modules/app/trees/addresses-label-set.d.ts +62 -0
  164. package/plugins/runtime-modules/app/trees/addresses-label-set.js +108 -0
  165. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.js +27 -2
  166. package/plugins/runtime-modules/app/trees/profile-label-set.d.ts +1 -0
  167. package/plugins/runtime-modules/app/trees/profile-label-set.js +3 -0
  168. package/plugins/runtime-modules/asset/presets.d.ts +4 -0
  169. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +4 -2
  170. package/plugins/runtime-modules/auth/trees/phi-auth-area-overlay-tree.server.js +4 -2
  171. package/plugins/runtime-modules/auth/trees/phi-default-admin-auth-settings-page-tree.js +2 -2
  172. package/plugins/runtime-modules/auth/widgets/logout/client.d.ts +1 -1
  173. package/plugins/runtime-modules/auth/widgets/logout/client.js +2 -2
  174. package/plugins/runtime-modules/auth/widgets/security/client.d.ts +5 -1
  175. package/plugins/runtime-modules/auth/widgets/security/client.js +12 -10
  176. package/plugins/runtime-modules/avatar/overlay-tree.server.js +1 -1
  177. package/plugins/runtime-modules/blog/presets.d.ts +4 -0
  178. package/plugins/runtime-modules/builder/clients/inspector-image-field.d.ts +2 -1
  179. package/plugins/runtime-modules/builder/clients/inspector-image-field.js +3 -2
  180. package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.d.ts +23 -0
  181. package/plugins/runtime-modules/builder/clients/metadata-table-provider-stand-ins.js +38 -0
  182. package/plugins/runtime-modules/builder/clients/mode-switch.d.ts +4 -1
  183. package/plugins/runtime-modules/builder/clients/mode-switch.js +2 -15
  184. package/plugins/runtime-modules/builder/clients/pages-workspace.js +2 -0
  185. package/plugins/runtime-modules/builder/clients/runtime-module-authoring-boundary.js +2 -1
  186. package/plugins/runtime-modules/builder/controller/draft-status-controller.js +28 -1
  187. package/plugins/runtime-modules/builder/developer-workspace-types.d.ts +5 -0
  188. package/plugins/runtime-modules/builder/page-presets.server.d.ts +7 -0
  189. package/plugins/runtime-modules/builder/page-presets.server.js +10 -1
  190. package/plugins/runtime-modules/builder/persistence.js +4 -0
  191. package/plugins/runtime-modules/builder/public-route-collisions.js +8 -3
  192. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +3 -1
  193. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +33 -6
  194. package/plugins/runtime-modules/builder/widgets/chrome/config.d.ts +6 -4
  195. package/plugins/runtime-modules/builder/widgets/chrome/config.js +11 -1
  196. package/plugins/runtime-modules/builder/widgets/inspector-header/authoring.d.ts +2 -2
  197. package/plugins/runtime-modules/builder/widgets/inspector-header/plugin.d.ts +2 -2
  198. package/plugins/runtime-modules/builder/widgets/mode-switch/plugin.js +1 -1
  199. package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +2 -2
  200. package/plugins/runtime-modules/client-manifests/app.js +3 -0
  201. package/plugins/runtime-modules/client-manifests/builder.js +10 -0
  202. package/plugins/runtime-modules/content-entry-routes.d.ts +4 -0
  203. package/plugins/runtime-modules/contracts.js +31 -1
  204. package/plugins/runtime-modules/core/definition.d.ts +23 -0
  205. package/plugins/runtime-modules/core/form-providers.d.ts +23 -0
  206. package/plugins/runtime-modules/core/messaging/thread-inbox-table.d.ts +0 -17
  207. package/plugins/runtime-modules/core/messaging/thread-inbox-table.js +2 -23
  208. package/plugins/runtime-modules/core/widgets/card/config.d.ts +0 -1
  209. package/plugins/runtime-modules/core/widgets/card/config.js +0 -1
  210. package/plugins/runtime-modules/core/widgets/card/editor.js +1 -1
  211. package/plugins/runtime-modules/core/widgets/command-toolbar/client.js +3 -0
  212. package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +316 -1
  213. package/plugins/runtime-modules/core/widgets/command-toolbar/config.js +4 -4
  214. package/plugins/runtime-modules/core/widgets/dimension/config.d.ts +1 -1
  215. package/plugins/runtime-modules/core/widgets/float-button/client.js +4 -1
  216. package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +326 -3
  217. package/plugins/runtime-modules/core/widgets/float-button/config.js +5 -2
  218. package/plugins/runtime-modules/core/widgets/header-navigation/client.js +1 -1
  219. package/plugins/runtime-modules/core/widgets/length/config.d.ts +1 -1
  220. package/plugins/runtime-modules/core/widgets/markdown/plugin.js +20 -7
  221. package/plugins/runtime-modules/core/widgets/markdown/server.d.ts +6 -2
  222. package/plugins/runtime-modules/core/widgets/markdown/server.js +2 -2
  223. package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.d.ts +12 -0
  224. package/plugins/runtime-modules/core/widgets/markdown/table-embeds.server.js +68 -0
  225. package/plugins/runtime-modules/core/widgets/number-input/config.d.ts +1 -1
  226. package/plugins/runtime-modules/core/widgets/simple-text/config.js +1 -1
  227. package/plugins/runtime-modules/core/widgets/simple-text/plugin.js +2 -1
  228. package/plugins/runtime-modules/core/widgets/table/client.js +20 -5
  229. package/plugins/runtime-modules/core/widgets/table/config.js +6 -0
  230. package/plugins/runtime-modules/core/widgets/table/reader-query.d.ts +17 -0
  231. package/plugins/runtime-modules/core/widgets/table/reader-query.js +33 -0
  232. package/plugins/runtime-modules/dashboard/trees/dashboard-cards-page-tree.js +3 -1
  233. package/plugins/runtime-modules/descriptor-compiler.d.ts +19 -3
  234. package/plugins/runtime-modules/descriptor-compiler.js +44 -16
  235. package/plugins/runtime-modules/editor/presets.d.ts +4 -0
  236. package/plugins/runtime-modules/editor/trees/phi-default-editor-releases-page-tree.js +3 -1
  237. package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +5 -1
  238. package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +5 -1
  239. package/plugins/runtime-modules/localization/presets.d.ts +4 -0
  240. package/plugins/runtime-modules/localization/trees/phi-default-admin-locales-page-tree.js +3 -1
  241. package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +4 -2
  242. package/plugins/runtime-modules/news/presets.d.ts +4 -0
  243. package/plugins/runtime-modules/observability/trees/phi-default-admin-logs-page-tree.js +6 -2
  244. package/plugins/runtime-modules/resolver.js +17 -0
  245. package/plugins/runtime-modules/revisions/controller/client.js +13 -11
  246. package/plugins/runtime-modules/revisions/controller/draft-context-target.d.ts +25 -0
  247. package/plugins/runtime-modules/revisions/controller/draft-context-target.js +33 -0
  248. package/plugins/runtime-modules/revisions/presets.d.ts +4 -0
  249. package/plugins/runtime-modules/revisions/services/table.js +13 -4
  250. package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +3 -1
  251. package/plugins/runtime-modules/search/widgets/search-results/client.js +4 -2
  252. package/plugins/runtime-modules/theme/presets.d.ts +4 -0
  253. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +76 -4
  254. package/plugins/runtime-modules/theme/widgets/brand-controls/config.d.ts +3 -2
  255. package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +2 -2
  256. package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +19 -7
  257. package/plugins/runtime-modules/threads/client-data-providers.js +5 -0
  258. package/plugins/runtime-modules/threads/controller/definition.js +1 -1
  259. package/plugins/runtime-modules/threads/data-providers.d.ts +115 -2
  260. package/plugins/runtime-modules/threads/data-providers.js +85 -0
  261. package/plugins/runtime-modules/threads/definition.d.ts +115 -2
  262. package/plugins/runtime-modules/threads/definition.js +1 -1
  263. package/plugins/runtime-modules/threads/ids.d.ts +2 -0
  264. package/plugins/runtime-modules/threads/ids.js +3 -0
  265. package/plugins/runtime-modules/threads/services/customer-file-table.d.ts +192 -0
  266. package/plugins/runtime-modules/threads/services/customer-file-table.js +164 -0
  267. package/plugins/runtime-modules/threads/trees/phi-default-threads-page-tree.js +5 -3
  268. package/plugins/runtime-modules/user-management/client-data-providers.js +5 -0
  269. package/plugins/runtime-modules/user-management/data-providers.d.ts +159 -0
  270. package/plugins/runtime-modules/user-management/data-providers.js +101 -3
  271. package/plugins/runtime-modules/user-management/definition.d.ts +159 -0
  272. package/plugins/runtime-modules/user-management/ids.d.ts +9 -0
  273. package/plugins/runtime-modules/user-management/ids.js +9 -0
  274. package/plugins/runtime-modules/user-management/presets.js +17 -1
  275. package/plugins/runtime-modules/user-management/services/users-access-table.d.ts +378 -0
  276. package/plugins/runtime-modules/user-management/services/users-access-table.js +132 -0
  277. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.d.ts +86 -0
  278. package/plugins/runtime-modules/user-management/trees/admin-users-access-label-set.js +118 -0
  279. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.d.ts +20 -0
  280. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-access-page-tree.js +166 -0
  281. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +19 -18
  282. package/server-helpers/cms-page-record.d.ts +9 -1
  283. package/server-helpers/cms-page-record.js +11 -1
  284. package/server-helpers/cms-request.js +8 -5
  285. package/server-helpers/link-preview-image.d.ts +30 -0
  286. package/server-helpers/link-preview-image.js +57 -0
  287. package/server-helpers/search-text.js +3 -0
  288. package/server-helpers.d.ts +1 -1
  289. package/server-helpers.js +1 -1
  290. package/styles/shell.css +30 -6
  291. package/theme/phi-theme-composition.js +9 -0
  292. package/theme/phi-theme-inverse-ground.d.ts +39 -0
  293. package/theme/phi-theme-inverse-ground.js +103 -0
  294. package/theme/phi-theme-tokens.d.ts +2 -1
  295. package/theme/phi-theme-tokens.js +2 -0
  296. package/types/cms-module-descriptors.d.ts +14 -0
  297. package/types/cms-overlay.d.ts +13 -6
  298. package/types/cms-overlay.js +6 -22
  299. package/types/cms-plugins.d.ts +14 -2
  300. package/types/cms.d.ts +10 -0
  301. package/types/core-widget-placements.d.ts +3 -3
  302. package/types/link-preview.d.ts +19 -0
  303. package/types/link-preview.js +19 -0
  304. package/types/record-provider.d.ts +22 -1
  305. package/types/site-theme.d.ts +27 -0
  306. package/types/table-embed.d.ts +48 -0
  307. package/types/table-embed.js +1 -0
  308. package/types/table-widget.d.ts +14 -0
  309. package/types/widget-runtime.d.ts +3 -0
  310. package/types.d.ts +1 -0
  311. /package/{plugins/runtime-modules/threads/controller/address.d.ts → constants/threads-controller-address.d.ts} +0 -0
@@ -1,5 +1,6 @@
1
1
  "use client";
2
- import { PhisThreadFlag, PhisThreadStatus } from "../../../../constants/threads";
2
+ import { PhisThreadStatus } from "../../../../constants/threads";
3
+ import { readPhiThreadInboxRow } from "../../../../helpers/thread-inbox-row";
3
4
  import { buildPhiTablePageParams, createPhiTableProviderRequestInit, readPhiTableRows, } from "../../../../components/widgets/client/shared/phi-table-provider-request";
4
5
  import { PhiTableProviderError, } from "../../../../types/table-widget";
5
6
  import { createPhiTableProviderClient } from "../../../../components/widgets/client/shared/phi-table-provider";
@@ -36,28 +37,6 @@ function buildThreadQuery(query) {
36
37
  search.set("unreadOnly", "1");
37
38
  return search;
38
39
  }
39
- /**
40
- * What a cell shows and what a condition reads, neither of which is a flag.
41
- *
42
- * `state` is the name a badge draws and `archived` and `locked` the answers a row action asks for; the
43
- * enum values are strings because that is what an enum column and a condition compare against. The
44
- * status itself stays on the row, because the filter above is written against what the route takes.
45
- *
46
- * One badge, so one state wins: archived over everything, then unread -- a message waiting to be read is
47
- * what the reader acts on, and a lock is read in the conversation once it is open -- then locked.
48
- */
49
- export function readPhiThreadInboxRow(row) {
50
- const archived = row.status === PhisThreadStatus.Archived;
51
- const locked = typeof row.flags === "number" && (row.flags & PhisThreadFlag.Locked) !== 0;
52
- return {
53
- ...row,
54
- kind: String(row.kind),
55
- status: String(row.status),
56
- archived,
57
- locked,
58
- state: archived ? "archived" : row.unread === true ? "unread" : locked ? "locked" : "open",
59
- };
60
- }
61
40
  async function queryThreadTable({ resourceKey, query, signal, }) {
62
41
  if (resourceKey !== "inbox") {
63
42
  throw new PhiTableProviderError("resource-not-found", `Unknown conversation resource "${resourceKey}".`);
@@ -15,7 +15,6 @@ type PhiCardImageSource = {
15
15
  sourceKind: "asset";
16
16
  assetId?: number;
17
17
  variantKey?: PhiImageAssetVariantKeyValue | null;
18
- variantVersion?: number | null;
19
18
  };
20
19
  export type PhiCmsCardWidgetConfig = PhiCmsWidgetConfigBase & PhiCardImageSource & {
21
20
  eyebrow?: string;
@@ -75,7 +75,6 @@ function parsePhiCmsCardWidgetConfig(config) {
75
75
  sourceKind: "asset",
76
76
  assetId: source.assetId,
77
77
  variantKey: source.variantKey,
78
- variantVersion: source.variantVersion,
79
78
  }
80
79
  : { ...normalized, sourceKind: "url", sourceUrl: source.sourceUrl };
81
80
  }
@@ -120,7 +120,7 @@ export function PhiCardWidgetEditor({ config, onChange }) {
120
120
  mediaAspectRatio: config.mediaAspectRatio,
121
121
  }),
122
122
  frameAspectRatio: resolvePhiCardMediaAspectRatioValue(config.mediaAspectRatio),
123
- variantVersion: asset?.variantVersion ?? (config.sourceKind === "asset" ? config.variantVersion : null),
123
+ variantVersion: asset?.variantVersion ?? null,
124
124
  deliveryRevision: asset?.deliveryRevision,
125
125
  originalUrl: assetId == null ? null : buildPhiMediaAssetContentDeliveryUrl(assetId),
126
126
  sourceUrl: config.sourceKind === "url" ? config.sourceUrl : undefined,
@@ -7,10 +7,13 @@ const NO_BUTTONS = [];
7
7
  export function PhiCommandToolbarWidget({ config, blockId, labels, disabled, signalsEnabled = true, }) {
8
8
  const commands = usePhiCommandButtons({
9
9
  buttons: config?.buttons ?? NO_BUTTONS,
10
+ key: config?.key,
10
11
  signalRoutes: config?.signalRoutes,
11
12
  blockId,
12
13
  labels,
13
14
  disabled,
15
+ initialDisabled: config?.disabled === true,
16
+ initialReadOnly: config?.readOnly === true,
14
17
  signalsEnabled,
15
18
  });
16
19
  return (_jsx(PhiToolbarControl, { items: commands.items, compact: config?.compact !== false, wrap: config?.wrap === true, showLabels: config?.showLabels === true, disabled: commands.disabled, size: config?.controlSize, onActivate: commands.activate }));
@@ -72,7 +72,322 @@ export declare const PHI_COMMAND_TOOLBAR_WIDGET_DEFINITION: {
72
72
  };
73
73
  };
74
74
  }[];
75
- fields: (import("../../../../../types").PhiCmsConfigField | {
75
+ fields: (({
76
+ key: string;
77
+ label: string;
78
+ description?: string;
79
+ required?: boolean;
80
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
81
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
82
+ heading?: string;
83
+ } & {
84
+ type: "string" | "url" | "icon";
85
+ emptyValue?: "";
86
+ placeholder?: string;
87
+ text?: false | "label" | "message";
88
+ }) | ({
89
+ key: string;
90
+ label: string;
91
+ description?: string;
92
+ required?: boolean;
93
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
94
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
95
+ heading?: string;
96
+ } & {
97
+ type: "link-target";
98
+ clearsWhenEmpty?: readonly string[];
99
+ }) | ({
100
+ key: string;
101
+ label: string;
102
+ description?: string;
103
+ required?: boolean;
104
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
105
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
106
+ heading?: string;
107
+ } & {
108
+ type: "readonly";
109
+ }) | ({
110
+ key: string;
111
+ label: string;
112
+ description?: string;
113
+ required?: boolean;
114
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
115
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
116
+ heading?: string;
117
+ } & {
118
+ type: "data-provider";
119
+ providerKind?: import("../../../../../types").PhiRuntimeDataProviderKind;
120
+ providerKey?: import("@phis/contracts/controls").PhiRuntimeDataProviderKey;
121
+ }) | ({
122
+ key: string;
123
+ label: string;
124
+ description?: string;
125
+ required?: boolean;
126
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
127
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
128
+ heading?: string;
129
+ } & {
130
+ type: "calendar-adapter";
131
+ }) | ({
132
+ key: string;
133
+ label: string;
134
+ description?: string;
135
+ required?: boolean;
136
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
137
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
138
+ heading?: string;
139
+ } & {
140
+ type: "video-provider";
141
+ }) | ({
142
+ key: string;
143
+ label: string;
144
+ description?: string;
145
+ required?: boolean;
146
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
147
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
148
+ heading?: string;
149
+ } & {
150
+ type: "record-field";
151
+ kinds: readonly import("../../../../../module-records").PhiRecordFieldKind[];
152
+ }) | ({
153
+ key: string;
154
+ label: string;
155
+ description?: string;
156
+ required?: boolean;
157
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
158
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
159
+ heading?: string;
160
+ } & {
161
+ type: "dimension";
162
+ widthKey?: string;
163
+ heightKey?: string;
164
+ widthPlaceholder?: string;
165
+ heightPlaceholder?: string;
166
+ patchOnChange?: Record<string, unknown>;
167
+ }) | ({
168
+ key: string;
169
+ label: string;
170
+ description?: string;
171
+ required?: boolean;
172
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
173
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
174
+ heading?: string;
175
+ } & {
176
+ type: "length";
177
+ min?: number;
178
+ max?: number;
179
+ step?: number;
180
+ precision?: number;
181
+ }) | ({
182
+ key: string;
183
+ label: string;
184
+ description?: string;
185
+ required?: boolean;
186
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
187
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
188
+ heading?: string;
189
+ } & {
190
+ type: "radius";
191
+ topLeftKey: string;
192
+ topRightKey: string;
193
+ bottomLeftKey: string;
194
+ bottomRightKey: string;
195
+ }) | ({
196
+ key: string;
197
+ label: string;
198
+ description?: string;
199
+ required?: boolean;
200
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
201
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
202
+ heading?: string;
203
+ } & {
204
+ type: "padding";
205
+ paddingKey?: string;
206
+ gapKey?: string;
207
+ paddingTopKey?: string;
208
+ paddingRightKey?: string;
209
+ paddingBottomKey?: string;
210
+ paddingLeftKey?: string;
211
+ section?: string;
212
+ }) | ({
213
+ key: string;
214
+ label: string;
215
+ description?: string;
216
+ required?: boolean;
217
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
218
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
219
+ heading?: string;
220
+ } & {
221
+ type: "color";
222
+ mode?: import("../../../../../types").PhiCmsConfigFieldColorMode;
223
+ defaultToken?: import("../../../../../theme/phi-theme-tokens").PhiThemeTokenKey;
224
+ section?: string;
225
+ }) | ({
226
+ key: string;
227
+ label: string;
228
+ description?: string;
229
+ required?: boolean;
230
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
231
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
232
+ heading?: string;
233
+ } & {
234
+ type: "image";
235
+ }) | ({
236
+ key: string;
237
+ label: string;
238
+ description?: string;
239
+ required?: boolean;
240
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
241
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
242
+ heading?: string;
243
+ } & {
244
+ type: "slot-texts";
245
+ }) | ({
246
+ key: string;
247
+ label: string;
248
+ description?: string;
249
+ required?: boolean;
250
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
251
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
252
+ heading?: string;
253
+ } & {
254
+ type: "number-list";
255
+ min?: number;
256
+ }) | ({
257
+ key: string;
258
+ label: string;
259
+ description?: string;
260
+ required?: boolean;
261
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
262
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
263
+ heading?: string;
264
+ } & {
265
+ type: "flags";
266
+ options: readonly {
267
+ value: number;
268
+ label: string;
269
+ }[];
270
+ }) | ({
271
+ key: string;
272
+ label: string;
273
+ description?: string;
274
+ required?: boolean;
275
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
276
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
277
+ heading?: string;
278
+ } & {
279
+ type: "number";
280
+ min?: number;
281
+ max?: number;
282
+ step?: number;
283
+ precision?: number;
284
+ prefix?: string;
285
+ presentation?: "slider";
286
+ suffix?: string;
287
+ }) | ({
288
+ key: string;
289
+ label: string;
290
+ description?: string;
291
+ required?: boolean;
292
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
293
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
294
+ heading?: string;
295
+ } & {
296
+ type: "choice";
297
+ valueType: "number";
298
+ options: import("@phis/contracts/controls").PhiControlOption<number>[];
299
+ emptyOption?: import("@phis/contracts/controls").PhiControlOption;
300
+ emptyValue?: null | undefined;
301
+ placeholder?: string;
302
+ mode?: never;
303
+ presentation?: never;
304
+ optionsProvider?: never;
305
+ allowCustom?: never;
306
+ createBehavior?: never;
307
+ filter?: never;
308
+ patchOnChange?: never;
309
+ optionPresets?: never;
310
+ }) | ({
311
+ key: string;
312
+ label: string;
313
+ description?: string;
314
+ required?: boolean;
315
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
316
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
317
+ heading?: string;
318
+ } & {
319
+ type: "choice";
320
+ mode?: import("../../../../../types").PhiCmsConfigFieldChoiceMode;
321
+ valueType?: Exclude<import("../../../../../types").PhiCmsConfigFieldChoiceValueType, "number">;
322
+ presentation?: import("../../../../../types").PhiCmsConfigFieldChoicePresentation;
323
+ options?: import("@phis/contracts/controls").PhiControlOption[];
324
+ optionsProvider?: import("@phis/contracts/controls").PhiControlOptionsProviderConfig;
325
+ allowCustom?: boolean;
326
+ createBehavior?: import("../../../../../types").PhiCmsConfigFieldChoiceCreateBehavior;
327
+ placeholder?: string;
328
+ filter?: import("../../../../../types").PhiCmsConfigFieldChoiceFilter;
329
+ emptyOption?: import("@phis/contracts/controls").PhiControlOption;
330
+ emptyValue?: null | undefined;
331
+ patchOnChange?: Record<string, unknown>;
332
+ optionPresets?: import("../../../../../types/cms-plugins").PhiCmsConfigFieldOptionPresets;
333
+ }) | ({
334
+ key: string;
335
+ label: string;
336
+ description?: string;
337
+ required?: boolean;
338
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
339
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
340
+ heading?: string;
341
+ } & {
342
+ type: "collection";
343
+ itemKeyField: string;
344
+ itemLabelField?: string;
345
+ itemFields: import("../../../../../types").PhiCmsConfigField[];
346
+ defaultItem?: Record<string, unknown>;
347
+ addLabel?: string;
348
+ emptyLabel?: string;
349
+ minItems?: number;
350
+ maxItems?: number;
351
+ reorderable?: boolean;
352
+ presentation?: import("../../../../../types").PhiCmsConfigFieldCollectionPresentation;
353
+ editLabel?: string;
354
+ }) | ({
355
+ key: string;
356
+ label: string;
357
+ description?: string;
358
+ required?: boolean;
359
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
360
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
361
+ heading?: string;
362
+ } & {
363
+ type: "surface";
364
+ tone?: false;
365
+ }) | ({
366
+ key: string;
367
+ label: string;
368
+ description?: string;
369
+ required?: boolean;
370
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
371
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
372
+ heading?: string;
373
+ } & {
374
+ type: "background-overlay";
375
+ }) | ({
376
+ key: string;
377
+ label: string;
378
+ description?: string;
379
+ required?: boolean;
380
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
381
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
382
+ heading?: string;
383
+ } & {
384
+ type: "grid-placement" | "column-count";
385
+ section?: string;
386
+ }) | {
387
+ key: string;
388
+ type: "boolean";
389
+ label: string;
390
+ } | {
76
391
  key: string;
77
392
  type: "choice";
78
393
  label: string;
@@ -1,7 +1,7 @@
1
1
  import { resolvePhiCmsWidgetPluginKey } from "../../../../../constants/cms-widget-types";
2
2
  import { PHI_COMMAND_CONTROL_SIGNALS } from "../../../../../components/widgets/signals/control-signal-capabilities";
3
3
  import { readBoolean, readRenderableBlockConfig, } from "../../../../../components/widgets/config/parser-primitives";
4
- import { PHI_CONTROL_PRESENTATION_FIELDS, parsePhiControlConfig, } from "../../../../../components/widgets/config/control-signal-config";
4
+ import { PHI_CONTROL_PRESENTATION_FIELDS, PHI_CONTROL_STATE_FIELDS, parsePhiControlConfig, } from "../../../../../components/widgets/config/control-signal-config";
5
5
  import { PHI_COMMAND_BUTTONS_SIGNAL_SUBCONTROLS, buildPhiCommandButtonsField, createPhiCommandButton, readPhiCommandButtons, } from "../../../../../components/widgets/config/command-buttons";
6
6
  function parsePhiCommandToolbarWidgetConfig(config) {
7
7
  const controlState = parsePhiControlConfig(config, {
@@ -49,9 +49,8 @@ export const PHI_COMMAND_TOOLBAR_WIDGET_DEFINITION = {
49
49
  },
50
50
  ] }),
51
51
  /*
52
- * What holds for every button. No Read only or Disabled of the whole toolbar here: each button
53
- * has its own, and switching all of them at once is what a signal is for -- every renderable block
54
- * receives `enabled/change`.
52
+ * What holds for every button. Read only and Disabled of the whole toolbar sit beside each button's
53
+ * own, as on every Control; `enabled/change` still switches the toolbar at runtime.
55
54
  */
56
55
  { key: "compact", type: "boolean", label: "Compact", heading: "Toolbar" },
57
56
  /*
@@ -62,6 +61,7 @@ export const PHI_COMMAND_TOOLBAR_WIDGET_DEFINITION = {
62
61
  { key: "wrap", type: "boolean", label: "Wrap", visibleWhen: { field: "compact", equals: false } },
63
62
  { key: "showLabels", type: "boolean", label: "Show Labels" },
64
63
  ...PHI_CONTROL_PRESENTATION_FIELDS,
64
+ ...PHI_CONTROL_STATE_FIELDS,
65
65
  ],
66
66
  defaultConfig: {
67
67
  key: "command",
@@ -3,7 +3,7 @@ export declare function parsePhiDimensionWidgetConfig(config: Record<string, unk
3
3
  value: import("../../../../../types").PhiRenderableBlockSize | null;
4
4
  key: string;
5
5
  disabled?: boolean | undefined;
6
- controlSize?: "small" | "medium" | "large" | undefined;
6
+ controlSize?: "medium" | "small" | "large" | undefined;
7
7
  signalRoutes?: (import("../../../../../types").PhiSignalRouteSet | null) | undefined;
8
8
  readOnly?: boolean | undefined;
9
9
  };
@@ -10,15 +10,18 @@ function toCssLength(value) {
10
10
  export function PhiFloatButtonWidget({ config, blockId, labels, disabled, signalsEnabled = true, inPlace = false, }) {
11
11
  const commands = usePhiCommandButtons({
12
12
  buttons: config?.buttons ?? NO_BUTTONS,
13
+ key: config?.key,
13
14
  signalRoutes: config?.signalRoutes,
14
15
  blockId,
15
16
  labels,
16
17
  disabled,
18
+ initialDisabled: config?.disabled === true,
19
+ initialReadOnly: config?.readOnly === true,
17
20
  signalsEnabled,
18
21
  });
19
22
  return (_jsx(PhiFloatButtonControl, { items: commands.items, placement: config?.placement, offset: { block: toCssLength(config?.offsetBlock), inline: toCssLength(config?.offsetInline) }, shape: config?.shape, group: {
20
23
  trigger: config?.groupTrigger,
21
24
  icon: config?.groupIcon,
22
25
  direction: config?.groupDirection,
23
- }, inPlace: inPlace, disabled: commands.disabled, onActivate: commands.activate }));
26
+ }, inPlace: inPlace, size: config?.controlSize, disabled: commands.disabled, onActivate: commands.activate }));
24
27
  }