@phis/ui 0.8.1 → 0.8.3

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 (223) hide show
  1. package/README.md +9 -2
  2. package/components/calendar/gregory-calendar-adapter-client.js +1 -0
  3. package/components/controls/phi-accordion-control.d.ts +6 -0
  4. package/components/controls/phi-accordion-control.js +8 -13
  5. package/components/controls/phi-background-control.js +2 -5
  6. package/components/controls/phi-builder-insert-picker-control-labels.d.ts +2 -0
  7. package/components/controls/phi-builder-insert-picker-control-labels.js +1 -0
  8. package/components/controls/phi-builder-insert-picker-control.js +10 -11
  9. package/components/controls/phi-cascader-control.d.ts +9 -3
  10. package/components/controls/phi-cascader-control.js +38 -10
  11. package/components/controls/phi-checkbox-group-control.d.ts +3 -1
  12. package/components/controls/phi-checkbox-group-control.js +2 -2
  13. package/components/controls/phi-collapse-control.d.ts +9 -2
  14. package/components/controls/phi-collapse-control.js +14 -2
  15. package/components/controls/phi-color-control.d.ts +3 -1
  16. package/components/controls/phi-color-control.js +2 -2
  17. package/components/controls/phi-color-field-control.d.ts +6 -1
  18. package/components/controls/phi-color-field-control.js +2 -2
  19. package/components/controls/phi-confirm-control.d.ts +1 -1
  20. package/components/controls/phi-confirm-control.js +71 -2
  21. package/components/controls/phi-confirm-dialog.js +2 -1
  22. package/components/controls/phi-date-picker-control.js +1 -1
  23. package/components/controls/phi-dimension-control.d.ts +3 -1
  24. package/components/controls/phi-dimension-control.js +2 -2
  25. package/components/controls/phi-geometry-control.js +1 -1
  26. package/components/controls/phi-length-control.d.ts +6 -1
  27. package/components/controls/phi-length-control.js +3 -2
  28. package/components/controls/phi-multi-select-control.d.ts +6 -1
  29. package/components/controls/phi-multi-select-control.js +3 -3
  30. package/components/controls/phi-segmented-control.d.ts +6 -1
  31. package/components/controls/phi-segmented-control.js +3 -3
  32. package/components/controls/phi-switch-control.d.ts +3 -1
  33. package/components/controls/phi-switch-control.js +3 -3
  34. package/components/controls/phi-table-control.d.ts +8 -1
  35. package/components/controls/phi-table-control.js +11 -5
  36. package/components/forms/compound-form-controls.js +16 -1
  37. package/components/layouts/clients/phi-collapsible-layout-client.js +2 -6
  38. package/components/media/media-upload-flow.d.ts +62 -5
  39. package/components/media/media-upload-flow.js +62 -24
  40. package/components/media/media-widget-labels.d.ts +2 -0
  41. package/components/media/media-widget-labels.js +2 -0
  42. package/components/media/phi-area-upload-widget.d.ts +44 -1
  43. package/components/media/phi-area-upload-widget.js +32 -7
  44. package/components/media/phi-asset-inspector-section.js +19 -1
  45. package/components/media/phi-media-upload.d.ts +10 -3
  46. package/components/media/phi-media-upload.js +11 -8
  47. package/components/regions/presets/phi-area-shell-preset-nodes.js +2 -0
  48. package/components/shell/phi-builder-icon.js +9 -1
  49. package/components/shell/phi-widget-icon.js +1 -0
  50. package/components/tables/phi-table-surface.d.ts +25 -0
  51. package/components/tables/phi-table-surface.js +25 -0
  52. package/components/widgets/builder/phi-static-rows-editor.js +4 -1
  53. package/components/widgets/client/html-editor-link-node.d.ts +12 -0
  54. package/components/widgets/client/html-editor-link-node.js +60 -0
  55. package/components/widgets/client/html-editor.js +10 -6
  56. package/components/widgets/client/shared/phi-choice-controller.d.ts +8 -1
  57. package/components/widgets/client/shared/phi-choice-controller.js +16 -1
  58. package/components/widgets/client/shared/phi-collection-view-binding.js +33 -26
  59. package/components/widgets/config/choice-shared.d.ts +2 -0
  60. package/components/widgets/config/choice-shared.js +1 -0
  61. package/components/widgets/config/image-variant-options.d.ts +4 -1
  62. package/components/widgets/config/image-variant-options.js +27 -14
  63. package/components/widgets/inspector-field-row.d.ts +14 -1
  64. package/components/widgets/inspector-field-row.js +21 -1
  65. package/components/widgets/label-sets/builder-chrome.js +2 -0
  66. package/components/widgets/label-sets/inspector.js +10 -0
  67. package/components/widgets/label-sets/security.js +2 -0
  68. package/components/widgets/label-types/inspector.d.ts +5 -0
  69. package/components/widgets/label-types/inspector.js +5 -0
  70. package/components/widgets/label-types/security.d.ts +2 -0
  71. package/components/widgets/signals/signal-endpoint-list.js +4 -1
  72. package/constants/cms-widget-types.d.ts +1 -0
  73. package/constants/cms-widget-types.js +3 -0
  74. package/constants/runtime-module-ownership.js +1 -0
  75. package/gateway/site-proxy.d.ts +12 -0
  76. package/gateway/site-proxy.js +20 -0
  77. package/helpers/cms-inspector-drawer.d.ts +15 -0
  78. package/helpers/cms-inspector-drawer.js +37 -0
  79. package/helpers/cms-layout-defaults.js +1 -1
  80. package/helpers/preset-tree-contract-check.js +56 -0
  81. package/helpers/text-source.js +2 -0
  82. package/net/phi-next-proxy.d.ts +7 -0
  83. package/net/phi-next-proxy.js +1 -1
  84. package/package.json +27 -14
  85. package/plugins/runtime-modules/accounting/definition.d.ts +1 -1
  86. package/plugins/runtime-modules/accounting/definition.js +0 -1
  87. package/plugins/runtime-modules/accounting/ids.d.ts +4 -4
  88. package/plugins/runtime-modules/accounting/ids.js +4 -2
  89. package/plugins/runtime-modules/accounting/module.d.ts +1 -1
  90. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +2 -1
  91. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +5 -4
  92. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +80 -38
  93. package/plugins/runtime-modules/admin/definition.d.ts +1 -1
  94. package/plugins/runtime-modules/admin/definition.js +0 -1
  95. package/plugins/runtime-modules/admin/module.d.ts +1 -1
  96. package/plugins/runtime-modules/app/definition.d.ts +1 -1
  97. package/plugins/runtime-modules/app/definition.js +0 -1
  98. package/plugins/runtime-modules/app/module.d.ts +1 -1
  99. package/plugins/runtime-modules/area-base-definition.d.ts +19 -1
  100. package/plugins/runtime-modules/area-base-definition.js +18 -0
  101. package/plugins/runtime-modules/area-contributions/admin.d.ts +1 -1
  102. package/plugins/runtime-modules/area-contributions/admin.js +2 -0
  103. package/plugins/runtime-modules/area-definitions.d.ts +8 -8
  104. package/plugins/runtime-modules/area-definitions.js +4 -3
  105. package/plugins/runtime-modules/area-root-route.d.ts +8 -0
  106. package/plugins/runtime-modules/area-root-route.js +11 -1
  107. package/plugins/runtime-modules/asset/labels.js +4 -0
  108. package/plugins/runtime-modules/asset/metadata-form.d.ts +0 -28
  109. package/plugins/runtime-modules/asset/metadata-form.js +6 -10
  110. package/plugins/runtime-modules/asset/services/options.d.ts +3 -2
  111. package/plugins/runtime-modules/asset/services/options.js +4 -3
  112. package/plugins/runtime-modules/asset/trees/phi-default-admin-media-settings-page-tree.js +2 -1
  113. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +3 -3
  114. package/plugins/runtime-modules/auth/widgets/security/client.js +2 -2
  115. package/plugins/runtime-modules/avatar/addresses.d.ts +1 -1
  116. package/plugins/runtime-modules/builder/addresses.d.ts +1 -1
  117. package/plugins/runtime-modules/builder/addresses.js +1 -1
  118. package/plugins/runtime-modules/builder/area-settings-form.js +1 -1
  119. package/plugins/runtime-modules/builder/clients/inspector-condition-group.d.ts +16 -0
  120. package/plugins/runtime-modules/builder/clients/inspector-condition-group.js +9 -0
  121. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +97 -10
  122. package/plugins/runtime-modules/builder/clients/pages-header.js +7 -6
  123. package/plugins/runtime-modules/builder/clients/region-visibility-fields.js +1 -1
  124. package/plugins/runtime-modules/builder/controller/workspace-controller.js +7 -4
  125. package/plugins/runtime-modules/builder/definition.d.ts +1 -1
  126. package/plugins/runtime-modules/builder/definition.js +0 -1
  127. package/plugins/runtime-modules/builder/offered-page-catalog.d.ts +10 -4
  128. package/plugins/runtime-modules/builder/offered-page-catalog.js +35 -8
  129. package/plugins/runtime-modules/builder/page-meta-form.js +5 -2
  130. package/plugins/runtime-modules/builder/plugin-meta-labels.js +8 -0
  131. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +4 -2
  132. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +20 -13
  133. package/plugins/runtime-modules/builder/workspace-catalog-actions.js +8 -1
  134. package/plugins/runtime-modules/cdn/authoring-widgets.d.ts +3 -0
  135. package/plugins/runtime-modules/cdn/authoring-widgets.js +7 -0
  136. package/plugins/runtime-modules/cdn/authoring.d.ts +1 -0
  137. package/plugins/runtime-modules/cdn/authoring.js +8 -0
  138. package/plugins/runtime-modules/cdn/bytes.d.ts +5 -0
  139. package/plugins/runtime-modules/cdn/bytes.js +17 -0
  140. package/plugins/runtime-modules/cdn/client-data-providers.d.ts +7 -0
  141. package/plugins/runtime-modules/cdn/client-data-providers.js +9 -0
  142. package/plugins/runtime-modules/cdn/data-providers.d.ts +134 -0
  143. package/plugins/runtime-modules/cdn/data-providers.js +117 -0
  144. package/plugins/runtime-modules/cdn/definition.d.ts +140 -0
  145. package/plugins/runtime-modules/cdn/definition.js +23 -0
  146. package/plugins/runtime-modules/cdn/ids.d.ts +18 -0
  147. package/plugins/runtime-modules/cdn/ids.js +20 -0
  148. package/plugins/runtime-modules/cdn/module.d.ts +131 -0
  149. package/plugins/runtime-modules/cdn/module.js +4 -0
  150. package/plugins/runtime-modules/cdn/platform.d.ts +25 -0
  151. package/plugins/runtime-modules/cdn/platform.js +73 -0
  152. package/plugins/runtime-modules/cdn/presets.d.ts +2 -0
  153. package/plugins/runtime-modules/cdn/presets.js +20 -0
  154. package/plugins/runtime-modules/cdn/server.d.ts +1 -0
  155. package/plugins/runtime-modules/cdn/server.js +14 -0
  156. package/plugins/runtime-modules/cdn/services/table.d.ts +11 -0
  157. package/plugins/runtime-modules/cdn/services/table.js +296 -0
  158. package/plugins/runtime-modules/cdn/services/upload.d.ts +20 -0
  159. package/plugins/runtime-modules/cdn/services/upload.js +146 -0
  160. package/plugins/runtime-modules/cdn/table-params.d.ts +10 -0
  161. package/plugins/runtime-modules/cdn/table-params.js +10 -0
  162. package/plugins/runtime-modules/cdn/trees/admin-cdn-label-set.d.ts +95 -0
  163. package/plugins/runtime-modules/cdn/trees/admin-cdn-label-set.js +156 -0
  164. package/plugins/runtime-modules/cdn/trees/phi-default-admin-cdn-page-tree.d.ts +18 -0
  165. package/plugins/runtime-modules/cdn/trees/phi-default-admin-cdn-page-tree.js +491 -0
  166. package/plugins/runtime-modules/cdn/widgets/upload/client.d.ts +12 -0
  167. package/plugins/runtime-modules/cdn/widgets/upload/client.js +138 -0
  168. package/plugins/runtime-modules/cdn/widgets/upload/config.d.ts +29 -0
  169. package/plugins/runtime-modules/cdn/widgets/upload/config.js +43 -0
  170. package/plugins/runtime-modules/cdn/widgets/upload/label-types.d.ts +24 -0
  171. package/plugins/runtime-modules/cdn/widgets/upload/label-types.js +1 -0
  172. package/plugins/runtime-modules/cdn/widgets/upload/labels.d.ts +4 -0
  173. package/plugins/runtime-modules/cdn/widgets/upload/labels.js +72 -0
  174. package/plugins/runtime-modules/cdn/widgets/upload/plugin.d.ts +3 -0
  175. package/plugins/runtime-modules/cdn/widgets/upload/plugin.js +7 -0
  176. package/plugins/runtime-modules/cdn/widgets/upload/server.d.ts +8 -0
  177. package/plugins/runtime-modules/cdn/widgets/upload/server.js +17 -0
  178. package/plugins/runtime-modules/cdn/widgets.d.ts +2 -0
  179. package/plugins/runtime-modules/cdn/widgets.js +13 -0
  180. package/plugins/runtime-modules/client-authoring-providers/admin.d.ts +1 -1
  181. package/plugins/runtime-modules/client-authoring-providers/admin.js +6 -0
  182. package/plugins/runtime-modules/client-manifests/admin.js +11 -1
  183. package/plugins/runtime-modules/core/authoring-widgets.js +2 -1
  184. package/plugins/runtime-modules/core/messaging/label-defaults.d.ts +49 -0
  185. package/plugins/runtime-modules/core/messaging/label-defaults.js +48 -0
  186. package/plugins/runtime-modules/core/messaging/labels.d.ts +2 -28
  187. package/plugins/runtime-modules/core/messaging/labels.js +52 -23
  188. package/plugins/runtime-modules/core/widgets/card/config.d.ts +14 -0
  189. package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +1 -1
  190. package/plugins/runtime-modules/core/widgets/collection-view/site-address-binding.js +3 -1
  191. package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +14 -0
  192. package/plugins/runtime-modules/core/widgets/description/config.d.ts +14 -0
  193. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +14 -0
  194. package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +14 -0
  195. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +14 -0
  196. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +14 -0
  197. package/plugins/runtime-modules/core/widgets/result/config.d.ts +14 -0
  198. package/plugins/runtime-modules/core/widgets/select-box/client.js +13 -4
  199. package/plugins/runtime-modules/core/widgets/select-box/config.js +1 -0
  200. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +14 -0
  201. package/plugins/runtime-modules/core/widgets/table/client.js +17 -8
  202. package/plugins/runtime-modules/core/widgets/table/config.d.ts +1 -1143
  203. package/plugins/runtime-modules/core/widgets/table/config.js +144 -125
  204. package/plugins/runtime-modules/core/widgets/thread-conversation/authoring.d.ts +2 -0
  205. package/plugins/runtime-modules/core/widgets/thread-conversation/authoring.js +76 -0
  206. package/plugins/runtime-modules/core/widgets/thread-conversation/client.d.ts +44 -1
  207. package/plugins/runtime-modules/core/widgets/thread-conversation/client.js +28 -13
  208. package/plugins/runtime-modules/editor/definition.d.ts +1 -1
  209. package/plugins/runtime-modules/editor/definition.js +0 -1
  210. package/plugins/runtime-modules/editor/module.d.ts +1 -1
  211. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +16 -8
  212. package/plugins/runtime-modules/public/definition.d.ts +1 -1
  213. package/plugins/runtime-modules/public/definition.js +0 -1
  214. package/plugins/runtime-modules/public/module.d.ts +1 -1
  215. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +109 -86
  216. package/plugins/runtime-modules/threads/controller/client.js +10 -12
  217. package/plugins/runtime-modules/threads/controller/definition.d.ts +6 -0
  218. package/plugins/runtime-modules/threads/controller/definition.js +17 -6
  219. package/styles/controls.css +49 -1
  220. package/styles/layout.css +3 -2
  221. package/types/calendar.d.ts +5 -0
  222. package/types/cms-plugins.d.ts +30 -10
  223. package/types/table-widget.d.ts +8 -2
@@ -2,6 +2,7 @@ import { PHI_SHARED_PACKAGE_NAME } from "../../constants/package";
2
2
  import { createPhiRuntimeModuleId } from "../../constants/module-identity";
3
3
  import { createPhiCoreRuntimeControllerAddress } from "../../components/runtime/core-runtime-controller-address";
4
4
  import { PHI_DEFAULT_PUB_AREA_PRESET_KEY } from "./preset-contracts/pub-area";
5
+ import { PHI_AREA_ICONS } from "./area-base-definition";
5
6
  import { PHI_VIEWER_ACCESS_ACCOUNTING, PHI_VIEWER_ACCESS_ANYONE, PHI_VIEWER_ACCESS_AUTHENTICATED, PHI_VIEWER_ACCESS_CONTENT_EDITING, PHI_VIEWER_ACCESS_SITE_MAINTENANCE, PHI_VIEWER_ACCESS_STRUCTURE_AUTHORING, PHI_VIEWER_ACCESS_SITE_ADMIN, } from "../../types/access";
6
7
  /*
7
8
  * The Modules named here are named by id, as data. Importing their `ids.ts` bound every file that
@@ -253,7 +254,7 @@ export const PHI_ACCOUNTING_RUNTIME_AREA_DEFINITIONS = [
253
254
  {
254
255
  itemKey: "@phis/ui/modules/accounting/nav/admin",
255
256
  label: label("Admin"),
256
- icon: "antd:cluster",
257
+ icon: PHI_AREA_ICONS.admin,
257
258
  standing: "last",
258
259
  target: { kind: "area", area: "admin" },
259
260
  },
@@ -298,7 +299,7 @@ export const PHI_ADMIN_RUNTIME_AREA_DEFINITIONS = [
298
299
  {
299
300
  itemKey: "@phis/ui/modules/admin/nav/builder",
300
301
  label: label("Builder"),
301
- icon: "antd:build",
302
+ icon: PHI_AREA_ICONS.builder,
302
303
  standing: "last",
303
304
  target: { kind: "area", area: "builder" },
304
305
  },
@@ -362,7 +363,7 @@ const PHI_BUILDER_RUNTIME_AREA_DEFINITIONS = [
362
363
  {
363
364
  itemKey: "@phis/ui/builder/nav/admin",
364
365
  label: label("Admin"),
365
- icon: "antd:cluster",
366
+ icon: PHI_AREA_ICONS.admin,
366
367
  standing: "last",
367
368
  target: { kind: "area", area: "admin" },
368
369
  },
@@ -19,6 +19,14 @@ import type { PhiCmsRoutePresetDescriptor, PhiRuntimeModuleId } from "../../type
19
19
  * two places is a convention until the day it is not.
20
20
  */
21
21
  export declare function resolvePhiAreaRootRouteNavKey(area: PhiCmsAreaKey): "app:sidebar" | "accounting:sidebar" | "admin:sidebar" | "editor:sidebar" | "builder:sidebar" | "public:sidebar";
22
+ /**
23
+ * The preset key of the forward an Area's base Module stands at `/`.
24
+ *
25
+ * Stated once because two sides read it: the descriptor below is declared under it, and the Builder has
26
+ * to tell this forward apart from a landing standing in the same slot -- with nothing stored, the slot's
27
+ * applicant decides whether `/` forwards or is a Page somebody authors, and only this preset forwards.
28
+ */
29
+ export declare function resolvePhiAreaRootRoutePresetKey(area: PhiCmsAreaKey): "public-root-page" | "app-root-page" | "admin-root-page" | "builder-root-page" | "editor-root-page" | "accounting-root-page";
22
30
  export declare function buildPhiAreaRootRoutePresetDescriptor({ ownerModuleId, area, navKey, title, }: {
23
31
  ownerModuleId: PhiRuntimeModuleId;
24
32
  area: PhiCmsAreaKey;
@@ -19,10 +19,20 @@
19
19
  export function resolvePhiAreaRootRouteNavKey(area) {
20
20
  return `${area}:sidebar`;
21
21
  }
22
+ /**
23
+ * The preset key of the forward an Area's base Module stands at `/`.
24
+ *
25
+ * Stated once because two sides read it: the descriptor below is declared under it, and the Builder has
26
+ * to tell this forward apart from a landing standing in the same slot -- with nothing stored, the slot's
27
+ * applicant decides whether `/` forwards or is a Page somebody authors, and only this preset forwards.
28
+ */
29
+ export function resolvePhiAreaRootRoutePresetKey(area) {
30
+ return `${area}-root-page`;
31
+ }
22
32
  export function buildPhiAreaRootRoutePresetDescriptor({ ownerModuleId, area, navKey = resolvePhiAreaRootRouteNavKey(area), title, }) {
23
33
  return {
24
34
  ownerModuleId,
25
- presetKey: `${area}-root-page`,
35
+ presetKey: resolvePhiAreaRootRoutePresetKey(area),
26
36
  presetVersion: 1,
27
37
  area,
28
38
  title,
@@ -32,6 +32,8 @@ const PHI_ASSET_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_ASSET_RUNTIME_MOD
32
32
  inspector_logo_variant_label: PHI_ASSET_MODULE_DEFAULT_LABELS.inspector.logoVariantLabel,
33
33
  inspector_landscape_variant_label: PHI_ASSET_MODULE_DEFAULT_LABELS.inspector.landscapeVariantLabel,
34
34
  inspector_portrait_variant_label: PHI_ASSET_MODULE_DEFAULT_LABELS.inspector.portraitVariantLabel,
35
+ inspector_icon_variant_label: PHI_ASSET_MODULE_DEFAULT_LABELS.inspector.iconVariantLabel,
36
+ inspector_share_variant_label: PHI_ASSET_MODULE_DEFAULT_LABELS.inspector.shareVariantLabel,
35
37
  inspector_public_url_label: PHI_ASSET_MODULE_DEFAULT_LABELS.inspector.publicUrlLabel,
36
38
  inspector_content_type_label: PHI_ASSET_MODULE_DEFAULT_LABELS.inspector.contentTypeLabel,
37
39
  inspector_original_name_label: PHI_ASSET_MODULE_DEFAULT_LABELS.inspector.originalNameLabel,
@@ -70,6 +72,8 @@ export async function getPhiAssetModuleLabels(options) {
70
72
  logoVariantLabel: labels.inspector_logo_variant_label,
71
73
  landscapeVariantLabel: labels.inspector_landscape_variant_label,
72
74
  portraitVariantLabel: labels.inspector_portrait_variant_label,
75
+ iconVariantLabel: labels.inspector_icon_variant_label,
76
+ shareVariantLabel: labels.inspector_share_variant_label,
73
77
  publicUrlLabel: labels.inspector_public_url_label,
74
78
  contentTypeLabel: labels.inspector_content_type_label,
75
79
  originalNameLabel: labels.inspector_original_name_label,
@@ -177,34 +177,6 @@ export declare const PHI_ASSET_FOLDER_FORM_DESCRIPTOR: {
177
177
  readonly compact: "sm";
178
178
  readonly medium: "base";
179
179
  };
180
- readonly label: {
181
- readonly compact: {
182
- readonly start: 1;
183
- readonly end: 9;
184
- };
185
- readonly medium: {
186
- readonly start: 1;
187
- readonly end: 9;
188
- };
189
- readonly wide: {
190
- readonly start: 1;
191
- readonly end: 9;
192
- };
193
- };
194
- readonly control: {
195
- readonly compact: {
196
- readonly start: 9;
197
- readonly end: 25;
198
- };
199
- readonly medium: {
200
- readonly start: 9;
201
- readonly end: 25;
202
- };
203
- readonly wide: {
204
- readonly start: 9;
205
- readonly end: 25;
206
- };
207
- };
208
180
  };
209
181
  };
210
182
  export declare const PHI_ASSET_METADATA_RUNTIME_MODULE_FORM: import("../contracts").PhiRuntimeModuleFormDefinition;
@@ -54,6 +54,11 @@ export const PHI_ASSET_METADATA_FORM_DESCRIPTOR = {
54
54
  label: label("focalRectLabel", "Focal rectangle"),
55
55
  },
56
56
  ],
57
+ /*
58
+ * Tracks of its own, against the house columns: this Form stands in the Asset inspector Drawer, 377px
59
+ * less the Collapsible's inset, which is `compact` -- where the default stacks its labels -- and an
60
+ * inspector keeps its labels beside the fields, as the Variants row above it does.
61
+ */
57
62
  layout: {
58
63
  gap: { compact: "sm", medium: "base" },
59
64
  label: {
@@ -94,18 +99,9 @@ export const PHI_ASSET_FOLDER_FORM_DESCRIPTOR = {
94
99
  config: { allowRoot: true, allowClear: false, separator: "/", rootValue: "/", normalize: "raw" },
95
100
  },
96
101
  ],
102
+ // The house columns (`PHI_FORM_DEFAULT_LAYOUT`), like every other side-label Form.
97
103
  layout: {
98
104
  gap: { compact: "sm", medium: "base" },
99
- label: {
100
- compact: { start: 1, end: 9 },
101
- medium: { start: 1, end: 9 },
102
- wide: { start: 1, end: 9 },
103
- },
104
- control: {
105
- compact: { start: 9, end: 25 },
106
- medium: { start: 9, end: 25 },
107
- wide: { start: 9, end: 25 },
108
- },
109
105
  },
110
106
  };
111
107
  async function loadAssetFormLabels(context) {
@@ -5,8 +5,9 @@ export declare const PhiMediaFolderChoicesOptionsProviderClient: import("react")
5
5
  children: import("react").ReactNode;
6
6
  }>;
7
7
  /**
8
- * The Site's Storage Profiles as choices, by id. Named by key and Provider, because that is what the
9
- * operator gave them; the key alone does not say whether a Profile is local or a bucket.
8
+ * The Site's Storage Profiles as choices, by id. Named by the Profile's key -- the name the operator gave
9
+ * it, `local` for the Site's Local Profile -- with the Provider that stores it (the Add-on's provider id)
10
+ * as the option's description: what tells a bucket from the local disk, but not what the choice is.
10
11
  */
11
12
  export declare const PhiMediaStorageProfilesOptionsProviderClient: import("react").ComponentType<{
12
13
  children: import("react").ReactNode;
@@ -111,8 +111,9 @@ async function loadStorageProfiles() {
111
111
  : []);
112
112
  }
113
113
  /**
114
- * The Site's Storage Profiles as choices, by id. Named by key and Provider, because that is what the
115
- * operator gave them; the key alone does not say whether a Profile is local or a bucket.
114
+ * The Site's Storage Profiles as choices, by id. Named by the Profile's key -- the name the operator gave
115
+ * it, `local` for the Site's Local Profile -- with the Provider that stores it (the Add-on's provider id)
116
+ * as the option's description: what tells a bucket from the local disk, but not what the choice is.
116
117
  */
117
118
  export const PhiMediaStorageProfilesOptionsProviderClient = createPhiControlOptionsProviderClient({
118
119
  key: PHI_ASSET_RUNTIME_DATA_PROVIDER_KEYS.mediaStorageProfiles,
@@ -123,7 +124,7 @@ export const PhiMediaStorageProfilesOptionsProviderClient = createPhiControlOpti
123
124
  ? context.asyncData
124
125
  : [];
125
126
  return {
126
- options: profiles.map((profile) => ({ value: String(profile.id), label: `${profile.key} (${profile.providerId})` })),
127
+ options: profiles.map((profile) => ({ value: String(profile.id), label: profile.key, description: profile.providerId })),
127
128
  };
128
129
  },
129
130
  });
@@ -35,7 +35,8 @@ export async function buildPhiDefaultAdminMediaSettingsPageTree({ page, runtime,
35
35
  const offered = settings.storage.allowedProfileIds.length > 0
36
36
  ? settings.storage.profiles.filter((profile) => settings.storage.allowedProfileIds.includes(profile.id))
37
37
  : settings.storage.profiles;
38
- const profileNames = Object.fromEntries(settings.storage.profiles.map((profile) => [String(profile.id), `${profile.key} (${profile.providerId})`]));
38
+ // A Profile reads as the name the operator gave it; the Provider behind it is not part of the name.
39
+ const profileNames = Object.fromEntries(settings.storage.profiles.map((profile) => [String(profile.id), profile.key]));
39
40
  const profileChoices = offered.map((profile) => ({ value: String(profile.id), label: profileNames[String(profile.id)] }));
40
41
  const buildSpacesTable = (nodeKey, resourceKey, label, withEmail) => ({
41
42
  nodeKey,
@@ -15,6 +15,7 @@ import { PHI_ASSET_FOLDER_FORM_ID, PHI_ASSET_METADATA_FORM_ID } from "../metadat
15
15
  import { PHI_ASSET_INSPECTOR_LAYOUT_IDS, PHI_ASSET_INSPECTOR_OVERLAY_IDS, PHI_ASSET_INSPECTOR_WIDGET_IDS, PHI_ASSET_MEDIA_PAGE_LAYOUT_IDS, PHI_ASSET_MEDIA_PAGE_WIDGET_IDS, } from "../media-page-ids";
16
16
  import { PHI_DIALOG_BLEED_BODY_CONFIG, PHI_DIALOG_BODY_CONFIG, PHI_DIALOG_COMMANDS_CONFIG, PHI_DIALOG_WIDTH_SINGLE_COLUMN, } from "../../../../helpers/cms-dialog";
17
17
  import { buildPhiWidgetLabelTranslatorOptions } from "../../../../components/widgets/label-sets/runtime-options";
18
+ import { PHI_INSPECTOR_DRAWER_BODY_INSET } from "../../../../helpers/cms-inspector-drawer";
18
19
  const PHI_ASSET_MEDIA_PAGE_REGION_IDS = {
19
20
  regionHeaderBottom: -511,
20
21
  regionContent: -513,
@@ -328,8 +329,7 @@ export async function buildPhiDefaultBuilderMediaPageTree({ page, runtime, }) {
328
329
  config: {
329
330
  ghost: true,
330
331
  bordered: false,
331
- padding: PHI_SPACE.sm,
332
- innerPadding: PHI_SPACE.sm,
332
+ ...PHI_INSPECTOR_DRAWER_BODY_INSET,
333
333
  slotTitles: [
334
334
  assetLabels.inspector.previewTitle ?? "Preview",
335
335
  assetLabels.inspector.metadataTitle ?? "Metadata",
@@ -596,7 +596,7 @@ export async function buildPhiDefaultBuilderMediaPageTree({ page, runtime, }) {
596
596
  showLabels: true,
597
597
  controlSize: "medium",
598
598
  buttons: [
599
- { key: "save", emits: [{ capabilityId: "command", value: "save" }], action: "save" },
599
+ { key: "save", emits: [{ capabilityId: "command", value: "save" }], action: "save", variant: "primary" },
600
600
  ],
601
601
  signalRoutes: {
602
602
  emits: [{
@@ -99,7 +99,7 @@ export function PhiAuthSecurityWidgetClient({ apiPath = "/api/auth/account/secur
99
99
  status: payload.policy.factor?.requiredMethod === "totp"
100
100
  ? _jsx(PhiTagControl, { color: "blue", children: labels.authenticators.required })
101
101
  : null,
102
- action: (_jsx(PhiConfirmControl, { title: labels.authenticators.removeConfirm, onConfirm: () => void removeFactor(factor.id), danger: true, trigger: { label: labels.authenticators.remove, type: "link", danger: true } })),
102
+ action: (_jsx(PhiConfirmControl, { title: labels.authenticators.removeConfirm, confirmLabel: labels.authenticators.remove, cancelLabel: labels.confirmCancel, onConfirm: () => void removeFactor(factor.id), danger: true, trigger: { label: labels.authenticators.remove, type: "link", danger: true } })),
103
103
  })) }) }), _jsx(PhiCardControl, { title: labels.providers.title, children: _jsx(PhiEntryListControl, { emptyDescription: labels.providers.empty, entries: payload.identities.map((identity) => ({
104
104
  // Two accounts at one provider are two identities; the provider key alone named both the same.
105
105
  key: String(identity.id),
@@ -114,7 +114,7 @@ export function PhiAuthSecurityWidgetClient({ apiPath = "/api/auth/account/secur
114
114
  ? _jsx(PhiTagControl, { children: labels.sessions.revoked })
115
115
  : _jsx(PhiTagControl, { color: "green", children: labels.sessions.active }),
116
116
  action: session.id !== payload.currentSessionId && !session.revokedAt
117
- ? (_jsx(PhiConfirmControl, { title: labels.sessions.revokeConfirm, onConfirm: () => void revokeSession(session.id), danger: true, trigger: { label: labels.sessions.revoke, type: "link", danger: true } }))
117
+ ? (_jsx(PhiConfirmControl, { title: labels.sessions.revokeConfirm, confirmLabel: labels.sessions.revoke, cancelLabel: labels.confirmCancel, onConfirm: () => void revokeSession(session.id), danger: true, trigger: { label: labels.sessions.revoke, type: "link", danger: true } }))
118
118
  : null,
119
119
  })) }) })] }));
120
120
  }
@@ -1,7 +1,7 @@
1
1
  export declare const PHI_AVATAR_OVERLAY_IDS: {
2
+ readonly widgetUpload: import("@phis/contracts/cms").PhiCmsInstanceId;
2
3
  readonly layoutBody: import("@phis/contracts/cms").PhiCmsInstanceId;
3
4
  readonly overlayPicker: import("@phis/contracts/cms").PhiCmsInstanceId;
4
- readonly widgetUpload: import("@phis/contracts/cms").PhiCmsInstanceId;
5
5
  readonly widgetPicker: import("@phis/contracts/cms").PhiCmsInstanceId;
6
6
  readonly presetKey: "avatar-app-picker-overlay";
7
7
  };
@@ -1,6 +1,6 @@
1
1
  export declare const PHI_BUILDER_MODULES_TABLE_WIDGET_ID: import("@phis/contracts/cms").PhiCmsInstanceId;
2
2
  export declare const PHI_BUILDER_AREA_SETTINGS_OVERLAY_IDS: Readonly<Record<"overlayAreaSettings", import("@phis/contracts/cms").PhiCmsInstanceId>>;
3
- export declare const PHI_BUILDER_AREA_SETTINGS_LAYOUT_IDS: Readonly<Record<"areaSettingsBody" | "areaSettingsFields" | "areaSettingsFooter", import("@phis/contracts/cms").PhiCmsInstanceId>>;
3
+ export declare const PHI_BUILDER_AREA_SETTINGS_LAYOUT_IDS: Readonly<Record<"areaSettingsBody" | "areaSettingsFooter", import("@phis/contracts/cms").PhiCmsInstanceId>>;
4
4
  export declare const PHI_BUILDER_AREA_SETTINGS_WIDGET_IDS: Readonly<Record<"areaSettingsForm" | "areaSettingsAction" | "areaSettingsCommands", import("@phis/contracts/cms").PhiCmsInstanceId>>;
5
5
  export declare const PHI_BUILDER_MODULE_DETAIL_OVERLAY_IDS: Readonly<Record<"overlayModuleDetail", import("@phis/contracts/cms").PhiCmsInstanceId>>;
6
6
  export declare const PHI_BUILDER_MODULE_DETAIL_LAYOUT_IDS: Readonly<Record<"body", import("@phis/contracts/cms").PhiCmsInstanceId>>;
@@ -20,7 +20,7 @@ const AREA_SETTINGS_ID_CONTEXT = {
20
20
  presetKey: "builder-area-preset",
21
21
  };
22
22
  export const PHI_BUILDER_AREA_SETTINGS_OVERLAY_IDS = createPhiPresetCmsInstanceIdMap(AREA_SETTINGS_ID_CONTEXT, ["overlayAreaSettings"]);
23
- export const PHI_BUILDER_AREA_SETTINGS_LAYOUT_IDS = createPhiPresetCmsInstanceIdMap(AREA_SETTINGS_ID_CONTEXT, ["areaSettingsBody", "areaSettingsFields", "areaSettingsFooter"]);
23
+ export const PHI_BUILDER_AREA_SETTINGS_LAYOUT_IDS = createPhiPresetCmsInstanceIdMap(AREA_SETTINGS_ID_CONTEXT, ["areaSettingsBody", "areaSettingsFooter"]);
24
24
  export const PHI_BUILDER_AREA_SETTINGS_WIDGET_IDS = createPhiPresetCmsInstanceIdMap(AREA_SETTINGS_ID_CONTEXT, ["areaSettingsAction", "areaSettingsForm", "areaSettingsCommands"]);
25
25
  const MODULES_DETAIL_ID_CONTEXT = {
26
26
  domain: "page",
@@ -19,7 +19,7 @@ const text = (key, fallback) => ({ kind: "config", key, fallback });
19
19
  * What an Area answers about itself, as one form rather than as six Controls that each carry a label.
20
20
  *
21
21
  * The form is what puts the labels in a column of their own: `PHI_FORM_DEFAULT_LAYOUT` gives every
22
- * field a label range of 1-9 and a control range of 9-25, so six rows line up on one edge instead of
22
+ * field one label range and one control range per width, so six rows line up on one edge instead of
23
23
  * each being indented by the width of its own caption. That is the whole reason this is a form and
24
24
  * not a stack -- the questions did not change.
25
25
  *
@@ -0,0 +1,16 @@
1
+ export type PhiInspectorConditionGroupWrite = {
2
+ kind: "write";
3
+ value: {
4
+ match: "all" | "any";
5
+ conditions: Record<string, unknown>[];
6
+ };
7
+ } | {
8
+ kind: "remove";
9
+ } | {
10
+ kind: "hold";
11
+ draft: {
12
+ match: "all" | "any";
13
+ conditions: Record<string, unknown>[];
14
+ };
15
+ };
16
+ export declare function resolvePhiInspectorConditionGroupWrite(next: Record<string, unknown>): PhiInspectorConditionGroupWrite;
@@ -0,0 +1,9 @@
1
+ import { isPhiRecord } from "../../../../helpers/is-record";
2
+ import { readPhiRuntimeConditionExpression } from "../../../../types/runtime-condition";
3
+ export function resolvePhiInspectorConditionGroupWrite(next) {
4
+ const conditions = Array.isArray(next.conditions) ? next.conditions.filter(isPhiRecord) : [];
5
+ if (conditions.length === 0)
6
+ return { kind: "remove" };
7
+ const group = { match: next.match === "any" ? "any" : "all", conditions };
8
+ return readPhiRuntimeConditionExpression(group) ? { kind: "write", value: group } : { kind: "hold", draft: group };
9
+ }
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { Fragment, useMemo, useState } from "react";
3
+ import { Fragment, useContext, useMemo, useState } from "react";
4
4
  import { PhiBackgroundControl } from "../../../../components/controls/phi-background-control";
5
5
  import { readPhiDotPath } from "../../../../helpers/dot-path";
6
6
  import { PhiCheckboxGroupControl } from "../../../../components/controls/phi-checkbox-group-control";
@@ -31,7 +31,7 @@ import { usePhiWidgetScaffoldPopup } from "../../../../components/widgets/client
31
31
  import { PhiDialogControl } from "../../../../components/controls/phi-dialog-control";
32
32
  import { PhiIcon } from "../../../../components/shell/phi-icon";
33
33
  import { PhiPaddingControl } from "../../../../components/controls/phi-padding-control";
34
- import { PHI_INSPECTOR_FIELD_LABEL_WIDTH, PhiInspectorFieldRow } from "../../../../components/widgets/inspector-field-row";
34
+ import { PHI_INSPECTOR_FIELD_LABEL_WIDTH, PhiInspectorDialogContext, PhiInspectorFieldRow } from "../../../../components/widgets/inspector-field-row";
35
35
  import { PhiSurfaceControl } from "../../../../components/controls/phi-surface-control";
36
36
  import { readPhiSurface } from "../../../../types/surface";
37
37
  import { readInspectorChoiceMultiValue, readInspectorChoiceSingleValue, } from "./inspector-choice-values";
@@ -39,6 +39,8 @@ import { PhiFlexControl } from "../../../../components/controls/phi-flex-control
39
39
  import { PhiTypographyControl } from "../../../../components/controls/phi-typography-control";
40
40
  import { PhiDescriptionHint } from "../../../../components/controls/phi-description-tooltip-icon";
41
41
  import { isPhiRecord } from "../../../../helpers/is-record";
42
+ import { PhiAlertControl } from "../../../../components/controls/phi-alert-control";
43
+ import { resolvePhiInspectorConditionGroupWrite } from "./inspector-condition-group";
42
44
  import { PHI_INSPECTOR_WIDGET_DEFAULT_LABELS, } from "../../../../components/widgets/label-types/inspector";
43
45
  const PHI_STATIC_OPTIONS_PROVIDER_VALUE = "__phi_static_options__";
44
46
  export function renderPhiInspectorSettingsRow(label, control, key) {
@@ -402,6 +404,8 @@ function PhiInspectorChoiceFieldControl({ field, config, value, defaultValue, di
402
404
  function PhiInspectorCollectionFieldControl({ field, config, labels, value, defaultValue, disabled, widgetReferenceOptions, paddingLabels, backgroundLabels, borderLabels, renderMediaPicker, colorPickerLabels, iconPickerLabels, dataProviderDescriptors, calendarAdapterDescriptors, videoProviderDescriptors, onChange, }) {
403
405
  const { token } = usePhiConfig();
404
406
  const popup = usePhiWidgetScaffoldPopup();
407
+ /* Inside another list's Overlay an entry's own list is edited in place, not behind a second dialog. */
408
+ const insideOverlay = useContext(PhiInspectorDialogContext);
405
409
  const [overlayOpen, setOverlayOpen] = useState(false);
406
410
  /* The entry a `select` collection shows; held to the list when entries go. */
407
411
  const [selectedItemIndex, setSelectedItemIndex] = useState(0);
@@ -491,6 +495,9 @@ function PhiInspectorCollectionFieldControl({ field, config, labels, value, defa
491
495
  background: token.colorBgContainer,
492
496
  }, children: [_jsxs(PhiFlexControl, { align: "center", justify: "space-between", gap: 4, style: { width: "100%" }, children: [_jsx(PhiTypographyControl, { strong: true, ellipsis: true, style: { minWidth: 0 }, title: itemLabel, children: itemLabel }), _jsxs(PhiFlexControl, { align: "center", gap: 2, children: [field.reorderable !== false ? (_jsxs(_Fragment, { children: [_jsx(PhiButtonControl, { label: "\u2191", type: "text", disabled: disabled || index === 0, onClick: () => swapRows(index - 1, index) }), _jsx(PhiButtonControl, { label: "\u2193", type: "text", disabled: disabled || index === items.length - 1, onClick: () => swapRows(index, index + 1) })] })) : null, _jsx(PhiButtonControl, { ariaLabel: labels.remove, tooltip: labels.remove, icon: _jsx(PhiIcon, { name: "delete" }), type: "text", danger: true, disabled: disabled || items.length <= minItems, onClick: () => publishRows(items.filter((_, itemIndex) => itemIndex !== index), rowKeys.filter((_, keyIndex) => keyIndex !== index)) })] })] }), renderItemFields(item, index)] }, rowKeys[index]));
493
497
  }), _jsx(PhiButtonControl, { label: field.addLabel ?? labels.addItem, icon: _jsx(PhiIcon, { name: "plus" }), disabled: disabled || items.length >= maxItems, onClick: () => publishRows([...items, createPhiInspectorCollectionItem(field, items)], [...rowKeys, `${field.key}:new:${rowKeyState.next}`], rowKeyState.next + 1) })] }));
498
+ if (insideOverlay) {
499
+ return renderPhiInspectorConfigFieldBlock(field, editor);
500
+ }
494
501
  /*
495
502
  * The select is the field's row -- labelled with the field, "Button" -- and the chosen entry's fields
496
503
  * follow as rows of their own, so the entry reads as part of the settings and not as a card in them.
@@ -503,19 +510,96 @@ function PhiInspectorCollectionFieldControl({ field, config, labels, value, defa
503
510
  }
504
511
  return (_jsxs(Fragment, { children: [renderPhiInspectorConfigFieldControl(field, _jsx(PhiSelectControl, { options: items.map((item, index) => ({ value: String(index), label: readItemLabel(item, index) })), value: String(selectedIndex), disabled: disabled, style: { width: "100%" }, onChange: (next) => setSelectedItemIndex(Number(next)) })), renderItemFields(selectedItem, selectedIndex)] }, field.key));
505
512
  }
506
- if (field.presentation !== "overlay") {
507
- return renderPhiInspectorConfigFieldBlock(field, editor);
508
- }
509
513
  /*
510
- * The same editor in a wider box, and deliberately without a draft: every change publishes as it is
511
- * made, exactly as it does inline, so closing the Overlay decides nothing. The static options picker
514
+ * Every other list is edited in an Overlay (`PhiCmsConfigFieldCollectionPresentation`), never in the
515
+ * Inspector column, and deliberately without a draft: every change publishes as it is made, so
516
+ * closing the Overlay decides nothing. The static options picker
512
517
  * has its Cancel and Apply because it edits rows with identities and a validity rule of their own and
513
518
  * has something to hold back; here a second copy of the value would only be a second truth, and the
514
519
  * Builder's undo is already the way back. No actions, therefore, and so no Footer either.
520
+ *
521
+ * At the field's place it is a row like every other one: the field's words, and beside them the
522
+ * button that opens the Overlay, drawn at the Inspector's size. What the collection holds is read in
523
+ * the Overlay; a list of names squeezed into the control column said less than the Overlay does and
524
+ * pushed the button out of line with the rows around it.
515
525
  */
516
- return renderPhiInspectorConfigFieldBlock(field, _jsxs(_Fragment, { children: [_jsxs(PhiFlexControl, { align: "center", justify: "space-between", gap: 8, style: { width: "100%", minWidth: 0 }, children: [_jsx(PhiTypographyControl, { type: "secondary", ellipsis: true, style: { minWidth: 0 }, children: items.length === 0
517
- ? field.emptyLabel ?? labels.noItems
518
- : items.map(readItemLabel).join(", ") }), _jsx(PhiButtonControl, { label: field.editLabel ?? labels.edit, icon: _jsx(PhiIcon, { name: "edit" }), size: "small", disabled: disabled, onClick: () => setOverlayOpen(true) })] }), _jsx(PhiDialogControl, { open: overlayOpen, title: field.label, controlSize: "medium", mountPolicy: "remount", rootClassName: popup.rootClassName, onDismiss: () => setOverlayOpen(false), children: editor })] }));
526
+ return renderPhiInspectorConfigFieldControl(field, _jsxs(_Fragment, { children: [_jsx(PhiButtonControl, { label: field.editLabel ?? labels.edit, icon: _jsx(PhiIcon, { name: "edit" }), disabled: disabled, onClick: () => setOverlayOpen(true) }), _jsx(PhiDialogControl, { open: overlayOpen, title: field.label, controlSize: "medium", mountPolicy: "remount", rootClassName: popup.rootClassName, onDismiss: () => setOverlayOpen(false), children: _jsx(PhiInspectorDialogContext.Provider, { value: true, children: editor }) })] }));
527
+ }
528
+ /**
529
+ * A `condition-group` field: the group is one value, `{ match, conditions }`, written only in a shape the
530
+ * strict reader accepts (`resolvePhiInspectorConditionGroupWrite`). Its label and an Edit button in the
531
+ * Inspector column, the group in an Overlay; inside another Overlay's entry, in place there. The match
532
+ * and the list are drawn as the Inspector's own choice and collection fields on the group, so a
533
+ * condition is edited exactly as a list entry is anywhere else.
534
+ */
535
+ function PhiInspectorConditionGroupFieldControl({ field, labels, value, disabled, onChange, }) {
536
+ const popup = usePhiWidgetScaffoldPopup();
537
+ const inDialog = useContext(PhiInspectorDialogContext);
538
+ const [overlayOpen, setOverlayOpen] = useState(false);
539
+ /* What the dialog shows while it differs from what is stored: a match chosen before any condition, or a held group. */
540
+ const [draft, setDraft] = useState(null);
541
+ const stored = isPhiRecord(value) ? value : null;
542
+ const group = draft?.group ?? stored ?? {};
543
+ const apply = (patch) => {
544
+ const next = { ...group, ...patch };
545
+ const write = resolvePhiInspectorConditionGroupWrite(next);
546
+ if (write.kind === "write") {
547
+ setDraft(null);
548
+ onChange?.({ [field.key]: write.value });
549
+ return;
550
+ }
551
+ if (write.kind === "hold") {
552
+ setDraft({ group: write.draft, held: true });
553
+ return;
554
+ }
555
+ setDraft(next.match === "all" || next.match === "any" ? { group: { match: next.match, conditions: [] }, held: false } : null);
556
+ if (stored)
557
+ onChange?.({ [field.key]: undefined });
558
+ };
559
+ const matchField = {
560
+ key: "match",
561
+ type: "choice",
562
+ label: labels.conditionMatch,
563
+ options: [
564
+ { value: "all", label: labels.conditionMatchAll },
565
+ { value: "any", label: labels.conditionMatchAny },
566
+ ],
567
+ };
568
+ const conditionsField = {
569
+ key: "conditions",
570
+ type: "collection",
571
+ label: labels.conditions,
572
+ itemKeyField: "valuePath",
573
+ itemLabelField: "valuePath",
574
+ itemFields: field.conditionFields,
575
+ defaultItem: field.defaultCondition,
576
+ ...(field.addLabel == null ? {} : { addLabel: field.addLabel }),
577
+ ...(field.emptyLabel == null ? {} : { emptyLabel: field.emptyLabel }),
578
+ };
579
+ const body = (_jsx(PhiInspectorDialogContext.Provider, { value: true, children: _jsxs(PhiFlexControl, { vertical: true, gap: 8, style: { width: "100%", minWidth: 0 }, children: [renderPhiInspectorConfigField({
580
+ field: matchField,
581
+ value: group.match,
582
+ defaultValue: "all",
583
+ config: group,
584
+ disabled,
585
+ fieldLabels: labels,
586
+ onChange: apply,
587
+ }), renderPhiInspectorConfigField({
588
+ field: conditionsField,
589
+ value: Array.isArray(group.conditions) ? group.conditions : [],
590
+ defaultValue: undefined,
591
+ config: group,
592
+ disabled,
593
+ fieldLabels: labels,
594
+ onChange: apply,
595
+ }), draft?.held ? _jsx(PhiAlertControl, { level: "warning", title: labels.conditionGroupIncomplete, showIcon: true }) : null] }) }));
596
+ if (inDialog)
597
+ return renderPhiInspectorConfigFieldBlock(field, body);
598
+ return renderPhiInspectorConfigFieldControl(field, _jsxs(_Fragment, { children: [_jsx(PhiButtonControl, { label: labels.edit, icon: _jsx(PhiIcon, { name: "edit" }), disabled: disabled, onClick: () => setOverlayOpen(true) }), _jsx(PhiDialogControl, { open: overlayOpen, title: field.label, controlSize: "medium", mountPolicy: "remount", rootClassName: popup.rootClassName, onDismiss: () => {
599
+ // A held group is not saved: closing the dialog lets it go, and the stored one shows again.
600
+ setOverlayOpen(false);
601
+ setDraft(null);
602
+ }, children: body })] }));
519
603
  }
520
604
  /**
521
605
  * A list of whole numbers typed as "10, 20, 50".
@@ -759,6 +843,9 @@ function renderPhiInspectorConfigFieldBody({ field, value, defaultValue, config,
759
843
  if (field.type === "choice") {
760
844
  return (_jsx(PhiInspectorChoiceFieldControl, { field: field, config: config, value: value, defaultValue: defaultValue, disabled: disabled || !onChange, widgetReferenceOptions: widgetReferenceOptions ?? [], labels: fieldLabels, onChange: onChange }, field.key));
761
845
  }
846
+ if (field.type === "condition-group") {
847
+ return (_jsx(PhiInspectorConditionGroupFieldControl, { field: field, labels: fieldLabels, value: value, disabled: disabled || !onChange, onChange: onChange }, field.key));
848
+ }
762
849
  if (field.type === "collection") {
763
850
  return (_jsx(PhiInspectorCollectionFieldControl, { field: field, config: config, labels: fieldLabels, value: value, defaultValue: defaultValue, disabled: disabled || !onChange, widgetReferenceOptions: widgetReferenceOptions ?? [], paddingLabels: paddingLabels, backgroundLabels: backgroundLabels, borderLabels: borderLabels, renderMediaPicker: renderMediaPicker, colorPickerLabels: colorPickerLabels, iconPickerLabels: iconPickerLabels, dataProviderDescriptors: dataProviderDescriptors, calendarAdapterDescriptors: calendarAdapterDescriptors, videoProviderDescriptors: videoProviderDescriptors, onChange: onChange }, field.key));
764
851
  }
@@ -2,8 +2,8 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useState } from "react";
4
4
  import { useSearchParams } from "next/navigation";
5
- import { findPhiPageNodePath, resolvePhiBuilderActivePageKey, resolvePhiBuilderCatalogPathForCatalog, } from "../../../../helpers/cms-page-catalog";
6
- import { resolvePhiBuilderOfferedPageCatalog } from "../offered-page-catalog";
5
+ import { findPhiPageNodePath, resolvePhiBuilderCatalogPathForCatalog, } from "../../../../helpers/cms-page-catalog";
6
+ import { resolvePhiBuilderOfferedPageCatalog, resolvePhiBuilderOfferedPageKey, } from "../offered-page-catalog";
7
7
  import { PHI_BUILDER_AREA_SEARCH_PARAM, PHI_BUILDER_PAGE_SEARCH_PARAM, normalizePhiBuilderAreaSearchParam, normalizePhiBuilderPageSearchParam, } from "../../../../helpers/cms-scope-search-params";
8
8
  import { usePhiDeveloperBuilderStateValue } from "../developer-workspace-store";
9
9
  import { PhiTextControl } from "../../../../components/controls/phi-text-control";
@@ -57,10 +57,6 @@ export function PhiDeveloperBuilderPagesHeaderSection({ mode, pageTitle, disable
57
57
  const searchArea = normalizePhiBuilderAreaSearchParam(searchParams.get(PHI_BUILDER_AREA_SEARCH_PARAM));
58
58
  const searchPageKey = normalizePhiBuilderPageSearchParam(searchParams.get(PHI_BUILDER_PAGE_SEARCH_PARAM));
59
59
  const area = (searchArea ?? currentArea);
60
- const pageKey = searchPageKey ??
61
- (searchArea != null && searchArea !== currentArea
62
- ? (resolvePhiBuilderActivePageKey(null, modulePresetPagesByArea[searchArea]) ?? "")
63
- : currentPageKey);
64
60
  const offeredCatalogState = {
65
61
  modulePresetPagesByArea,
66
62
  customPages: resolvedCustomPages,
@@ -70,6 +66,11 @@ export function PhiDeveloperBuilderPagesHeaderSection({ mode, pageTitle, disable
70
66
  runtimeModuleDefinitions,
71
67
  areaRootRoutes,
72
68
  };
69
+ // An Area the address names before the workspace moved to it opens where the Controller will open it.
70
+ const pageKey = searchPageKey ??
71
+ (searchArea != null && searchArea !== currentArea
72
+ ? (resolvePhiBuilderOfferedPageKey(offeredCatalogState, searchArea, null).pageKey ?? "")
73
+ : currentPageKey);
73
74
  const pageTree = resolvePhiBuilderOfferedPageCatalog(offeredCatalogState, area);
74
75
  const pageSelectionReady = catalogHydrated && pageCatalogHydratedByArea[area] === true && pageKey.length > 0;
75
76
  const selectedPath = pageSelectionReady
@@ -116,7 +116,7 @@ export function PhiRegionVisibilityFields({ regionKey, regionConfig, disabled, l
116
116
  })),
117
117
  });
118
118
  return (_jsxs("div", { style: { display: "grid", gap: PHI_GAP_SM, width: "100%" }, children: [renderField(fields[0]), scope.mode === "include" || scope.mode === "exclude"
119
- ? renderPhiInspectorSettingsRow(labels.entries, _jsx(PhiTreeCascaderControl, { disabled: disabled, options: tree, placeholder: labels.entriesPlaceholder, value: scope.entries.flatMap((entry) => toPickerValue(entry) ?? []), onChange: (values) => onChange(patchRegionConfigVisibility(regionConfig, {
119
+ ? renderPhiInspectorSettingsRow(labels.entries, _jsx(PhiTreeCascaderControl, { ariaLabel: labels.entries, disabled: disabled, options: tree, placeholder: labels.entriesPlaceholder, value: scope.entries.flatMap((entry) => toPickerValue(entry) ?? []), onChange: (values) => onChange(patchRegionConfigVisibility(regionConfig, {
120
120
  entries: values.flatMap((value) => {
121
121
  if (value.startsWith(PHI_PAGE_SCOPE_FOLDER_VALUE_PREFIX)) {
122
122
  return [{ folder: value.slice(PHI_PAGE_SCOPE_FOLDER_VALUE_PREFIX.length) }];
@@ -15,7 +15,7 @@ import { PHI_BUILDER_PREVIEW_SEARCH_PARAM, } from "../preview-transport";
15
15
  import { PHI_BUILDER_AREA_SEARCH_PARAM, PHI_BUILDER_NAVIGATION_KEY_SEARCH_PARAM, PHI_BUILDER_PAGE_SEARCH_PARAM, PHI_BUILDER_RUNTIME_MODULES_SEARCH_PARAM, normalizePhiBuilderAreaSearchParam, normalizePhiBuilderPageSearchParam, serializePhiBuilderRuntimeModuleIdsSearchParam, } from "../../../../helpers/cms-scope-search-params";
16
16
  import { createPhiBuilderControllerAddress } from "../controller/address";
17
17
  import { readPhiBuilderInspectorAction, } from "../inspector-actions";
18
- import { createEmptyPhiBuilderModulePresetPagesByArea, resolvePhiBuilderActivePageCatalog, resolvePhiBuilderActivePageKey, } from "../../../../helpers/cms-page-catalog";
18
+ import { createEmptyPhiBuilderModulePresetPagesByArea, } from "../../../../helpers/cms-page-catalog";
19
19
  import { loadPhiBuilderPersistedPageCatalog } from "../page-catalog-client";
20
20
  import { resolvePhiBuilderOfferedPageKey, resolvePhiBuilderOfferedPageKeyFromCatalogPath, } from "../offered-page-catalog";
21
21
  import { isPhiBuilderAreaKey, resolvePhiBuilderAreaAsCmsArea, } from "../../../../constants/cms-areas";
@@ -796,9 +796,12 @@ function usePhiDeveloperBuilderWorkspaceController(options) {
796
796
  return;
797
797
  }
798
798
  const nextArea = signal.value;
799
- const nextPages = resolvePhiBuilderActivePageCatalog(nextArea, state.modulePresetPagesByArea, state.customPages ?? {}, state.persistedPageCatalogByArea);
800
- // The first node that is a Page: with routes under their package the first root node is a folder.
801
- const nextPageKey = resolvePhiBuilderActivePageKey(null, nextPages) ?? "";
799
+ /*
800
+ * The Page the shared order opens an Area on -- its landing, else where its root leads -- and
801
+ * not the first Page of its catalog, which is an error Page as often as not. Written to the
802
+ * address as a page key, it would be read back as the Page somebody asked for.
803
+ */
804
+ const nextPageKey = resolvePhiBuilderOfferedPageKey(offeredCatalogState, nextArea, null).pageKey ?? "";
802
805
  if (typeof pathname === "string") {
803
806
  const nextSearchParams = new URLSearchParams(searchParams.toString());
804
807
  nextSearchParams.set(PHI_BUILDER_AREA_SEARCH_PARAM, nextArea);
@@ -4,7 +4,6 @@ export declare const PHI_BUILDER_RUNTIME_MODULE_DEFINITION: Omit<{
4
4
  controller: import("../contracts").PhiRuntimeModuleControllerDescriptor;
5
5
  description: string;
6
6
  category: "foundation";
7
- iconFamily: string;
8
7
  controllerMountPolicy: "area";
9
8
  dataProviders: ({
10
9
  key: `${string}/${string}`;
@@ -511,4 +510,5 @@ export declare const PHI_BUILDER_RUNTIME_MODULE_DEFINITION: Omit<{
511
510
  kind: "module";
512
511
  eligibleAreas: readonly ["public" | "app" | "admin" | "builder" | "editor" | "accounting"];
513
512
  title: "Public Base" | "App Base" | "Accounting Base" | "Admin Base" | "Builder Base" | "Editor Base";
513
+ icon: string;
514
514
  };
@@ -13,7 +13,6 @@ export const PHI_BUILDER_RUNTIME_MODULE_DEFINITION = definePhiAreaBaseRuntimeMod
13
13
  controller: buildPhiRuntimeModuleControllerDescriptor(PHI_BUILDER_RUNTIME_CONTROLLER_DEFINITION),
14
14
  description: "Locked Builder Area shell, workspaces, Canvas orchestration, drafts, Inspector, wiring, and authoring chrome.",
15
15
  category: "foundation",
16
- iconFamily: "builder",
17
16
  controllerMountPolicy: "area",
18
17
  dataProviders: PHI_BUILDER_RUNTIME_DATA_PROVIDER_DESCRIPTORS,
19
18
  });