@phis/ui 0.8.2 → 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 (151) hide show
  1. package/components/calendar/gregory-calendar-adapter-client.js +1 -0
  2. package/components/controls/phi-accordion-control.d.ts +6 -0
  3. package/components/controls/phi-accordion-control.js +8 -13
  4. package/components/controls/phi-background-control.js +2 -5
  5. package/components/controls/phi-builder-insert-picker-control-labels.d.ts +2 -0
  6. package/components/controls/phi-builder-insert-picker-control-labels.js +1 -0
  7. package/components/controls/phi-builder-insert-picker-control.js +10 -11
  8. package/components/controls/phi-cascader-control.d.ts +9 -3
  9. package/components/controls/phi-cascader-control.js +38 -10
  10. package/components/controls/phi-checkbox-group-control.d.ts +3 -1
  11. package/components/controls/phi-checkbox-group-control.js +2 -2
  12. package/components/controls/phi-collapse-control.d.ts +9 -2
  13. package/components/controls/phi-collapse-control.js +14 -2
  14. package/components/controls/phi-color-control.d.ts +3 -1
  15. package/components/controls/phi-color-control.js +2 -2
  16. package/components/controls/phi-color-field-control.d.ts +6 -1
  17. package/components/controls/phi-color-field-control.js +2 -2
  18. package/components/controls/phi-confirm-control.d.ts +1 -1
  19. package/components/controls/phi-confirm-control.js +71 -2
  20. package/components/controls/phi-confirm-dialog.js +2 -1
  21. package/components/controls/phi-date-picker-control.js +1 -1
  22. package/components/controls/phi-dimension-control.d.ts +3 -1
  23. package/components/controls/phi-dimension-control.js +2 -2
  24. package/components/controls/phi-geometry-control.js +1 -1
  25. package/components/controls/phi-length-control.d.ts +6 -1
  26. package/components/controls/phi-length-control.js +3 -2
  27. package/components/controls/phi-multi-select-control.d.ts +6 -1
  28. package/components/controls/phi-multi-select-control.js +3 -3
  29. package/components/controls/phi-segmented-control.d.ts +6 -1
  30. package/components/controls/phi-segmented-control.js +3 -3
  31. package/components/controls/phi-switch-control.d.ts +3 -1
  32. package/components/controls/phi-switch-control.js +3 -3
  33. package/components/controls/phi-table-control.d.ts +8 -1
  34. package/components/controls/phi-table-control.js +8 -2
  35. package/components/forms/compound-form-controls.js +16 -1
  36. package/components/layouts/clients/phi-collapsible-layout-client.js +2 -6
  37. package/components/media/media-widget-labels.d.ts +2 -0
  38. package/components/media/media-widget-labels.js +2 -0
  39. package/components/media/phi-asset-inspector-section.js +19 -1
  40. package/components/regions/presets/phi-area-shell-preset-nodes.js +2 -0
  41. package/components/shell/phi-builder-icon.js +9 -1
  42. package/components/tables/phi-table-surface.d.ts +25 -0
  43. package/components/tables/phi-table-surface.js +25 -0
  44. package/components/widgets/builder/phi-static-rows-editor.js +4 -1
  45. package/components/widgets/client/shared/phi-choice-controller.d.ts +8 -1
  46. package/components/widgets/client/shared/phi-choice-controller.js +16 -1
  47. package/components/widgets/config/choice-shared.d.ts +2 -0
  48. package/components/widgets/config/choice-shared.js +1 -0
  49. package/components/widgets/config/image-variant-options.d.ts +4 -1
  50. package/components/widgets/config/image-variant-options.js +27 -14
  51. package/components/widgets/inspector-field-row.d.ts +14 -1
  52. package/components/widgets/inspector-field-row.js +21 -1
  53. package/components/widgets/label-sets/builder-chrome.js +2 -0
  54. package/components/widgets/label-sets/inspector.js +10 -0
  55. package/components/widgets/label-sets/security.js +2 -0
  56. package/components/widgets/label-types/inspector.d.ts +5 -0
  57. package/components/widgets/label-types/inspector.js +5 -0
  58. package/components/widgets/label-types/security.d.ts +2 -0
  59. package/components/widgets/signals/signal-endpoint-list.js +4 -1
  60. package/helpers/cms-inspector-drawer.d.ts +15 -0
  61. package/helpers/cms-inspector-drawer.js +37 -0
  62. package/helpers/cms-layout-defaults.js +1 -1
  63. package/helpers/preset-tree-contract-check.js +56 -0
  64. package/helpers/text-source.js +2 -0
  65. package/package.json +4 -4
  66. package/plugins/runtime-modules/accounting/definition.d.ts +1 -1
  67. package/plugins/runtime-modules/accounting/definition.js +0 -1
  68. package/plugins/runtime-modules/accounting/ids.d.ts +4 -4
  69. package/plugins/runtime-modules/accounting/ids.js +4 -2
  70. package/plugins/runtime-modules/accounting/module.d.ts +1 -1
  71. package/plugins/runtime-modules/accounting/trees/accounting-customer-file-label-set.js +2 -1
  72. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.d.ts +5 -4
  73. package/plugins/runtime-modules/accounting/trees/phi-default-accounting-customer-file-page-tree.js +80 -38
  74. package/plugins/runtime-modules/admin/definition.d.ts +1 -1
  75. package/plugins/runtime-modules/admin/definition.js +0 -1
  76. package/plugins/runtime-modules/admin/module.d.ts +1 -1
  77. package/plugins/runtime-modules/app/definition.d.ts +1 -1
  78. package/plugins/runtime-modules/app/definition.js +0 -1
  79. package/plugins/runtime-modules/app/module.d.ts +1 -1
  80. package/plugins/runtime-modules/area-base-definition.d.ts +19 -1
  81. package/plugins/runtime-modules/area-base-definition.js +18 -0
  82. package/plugins/runtime-modules/area-definitions.d.ts +8 -8
  83. package/plugins/runtime-modules/area-definitions.js +4 -3
  84. package/plugins/runtime-modules/area-root-route.d.ts +8 -0
  85. package/plugins/runtime-modules/area-root-route.js +11 -1
  86. package/plugins/runtime-modules/asset/labels.js +4 -0
  87. package/plugins/runtime-modules/asset/metadata-form.d.ts +0 -28
  88. package/plugins/runtime-modules/asset/metadata-form.js +6 -10
  89. package/plugins/runtime-modules/asset/services/options.d.ts +3 -2
  90. package/plugins/runtime-modules/asset/services/options.js +4 -3
  91. package/plugins/runtime-modules/asset/trees/phi-default-admin-media-settings-page-tree.js +2 -1
  92. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +3 -3
  93. package/plugins/runtime-modules/auth/widgets/security/client.js +2 -2
  94. package/plugins/runtime-modules/builder/addresses.d.ts +1 -1
  95. package/plugins/runtime-modules/builder/addresses.js +1 -1
  96. package/plugins/runtime-modules/builder/area-settings-form.js +1 -1
  97. package/plugins/runtime-modules/builder/clients/inspector-condition-group.d.ts +16 -0
  98. package/plugins/runtime-modules/builder/clients/inspector-condition-group.js +9 -0
  99. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +97 -10
  100. package/plugins/runtime-modules/builder/clients/pages-header.js +7 -6
  101. package/plugins/runtime-modules/builder/clients/region-visibility-fields.js +1 -1
  102. package/plugins/runtime-modules/builder/controller/workspace-controller.js +7 -4
  103. package/plugins/runtime-modules/builder/definition.d.ts +1 -1
  104. package/plugins/runtime-modules/builder/definition.js +0 -1
  105. package/plugins/runtime-modules/builder/offered-page-catalog.d.ts +10 -4
  106. package/plugins/runtime-modules/builder/offered-page-catalog.js +35 -8
  107. package/plugins/runtime-modules/builder/page-meta-form.js +5 -2
  108. package/plugins/runtime-modules/builder/plugin-meta-labels.js +8 -0
  109. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +4 -2
  110. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +20 -13
  111. package/plugins/runtime-modules/builder/workspace-catalog-actions.js +8 -1
  112. package/plugins/runtime-modules/cdn/trees/phi-default-admin-cdn-page-tree.js +26 -14
  113. package/plugins/runtime-modules/core/authoring-widgets.js +2 -1
  114. package/plugins/runtime-modules/core/messaging/label-defaults.d.ts +49 -0
  115. package/plugins/runtime-modules/core/messaging/label-defaults.js +48 -0
  116. package/plugins/runtime-modules/core/messaging/labels.d.ts +2 -28
  117. package/plugins/runtime-modules/core/messaging/labels.js +52 -23
  118. package/plugins/runtime-modules/core/widgets/card/config.d.ts +14 -0
  119. package/plugins/runtime-modules/core/widgets/command-toolbar/config.d.ts +14 -0
  120. package/plugins/runtime-modules/core/widgets/description/config.d.ts +14 -0
  121. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +14 -0
  122. package/plugins/runtime-modules/core/widgets/float-button/config.d.ts +14 -0
  123. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +14 -0
  124. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +14 -0
  125. package/plugins/runtime-modules/core/widgets/result/config.d.ts +14 -0
  126. package/plugins/runtime-modules/core/widgets/select-box/client.js +13 -4
  127. package/plugins/runtime-modules/core/widgets/select-box/config.js +1 -0
  128. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +14 -0
  129. package/plugins/runtime-modules/core/widgets/table/client.js +11 -4
  130. package/plugins/runtime-modules/core/widgets/table/config.d.ts +1 -1143
  131. package/plugins/runtime-modules/core/widgets/table/config.js +144 -125
  132. package/plugins/runtime-modules/core/widgets/thread-conversation/authoring.d.ts +2 -0
  133. package/plugins/runtime-modules/core/widgets/thread-conversation/authoring.js +76 -0
  134. package/plugins/runtime-modules/core/widgets/thread-conversation/client.d.ts +44 -1
  135. package/plugins/runtime-modules/core/widgets/thread-conversation/client.js +28 -13
  136. package/plugins/runtime-modules/editor/definition.d.ts +1 -1
  137. package/plugins/runtime-modules/editor/definition.js +0 -1
  138. package/plugins/runtime-modules/editor/module.d.ts +1 -1
  139. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +16 -8
  140. package/plugins/runtime-modules/public/definition.d.ts +1 -1
  141. package/plugins/runtime-modules/public/definition.js +0 -1
  142. package/plugins/runtime-modules/public/module.d.ts +1 -1
  143. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +109 -86
  144. package/plugins/runtime-modules/threads/controller/client.js +10 -12
  145. package/plugins/runtime-modules/threads/controller/definition.d.ts +6 -0
  146. package/plugins/runtime-modules/threads/controller/definition.js +17 -6
  147. package/styles/controls.css +49 -1
  148. package/styles/layout.css +3 -2
  149. package/types/calendar.d.ts +5 -0
  150. package/types/cms-plugins.d.ts +30 -10
  151. package/types/table-widget.d.ts +6 -0
@@ -1,12 +1,32 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { createContext, useContext } from "react";
4
+ import { PHI_FORM_DEFAULT_LAYOUT, PHI_FORM_GRID_LAST_LINE } from "@phis/contracts/forms";
3
5
  import { PhiFlexControl } from "../controls/phi-flex-control";
4
6
  import { PhiTruncatedHoverText } from "../controls/phi-truncated-hover-text";
5
7
  import { PhiTypographyControl } from "../controls/phi-typography-control";
6
8
  /** The label column every Inspector row shares, so a control that draws its own header lines up with the rest. */
7
9
  export const PHI_INSPECTOR_FIELD_LABEL_WIDTH = 140;
10
+ /**
11
+ * The label's share of an Inspector row inside a dialog -- the Overlay a list is edited in: the medium
12
+ * tier of the house Form layout, ten of twenty-four tracks, so a row there splits 10 : 14 as a Form in a
13
+ * one-column dialog does (owner, 2026-11-25). Read from the Form layout rather than restated, so the two
14
+ * cannot drift apart. The narrow Inspector column keeps its fixed `PHI_INSPECTOR_FIELD_LABEL_WIDTH`.
15
+ */
16
+ export const PHI_INSPECTOR_DIALOG_FIELD_LABEL_SHARE = (PHI_FORM_DEFAULT_LAYOUT.label.medium.end - PHI_FORM_DEFAULT_LAYOUT.label.medium.start) / (PHI_FORM_GRID_LAST_LINE - 1);
17
+ /**
18
+ * Whether Inspector rows stand in a dialog rather than in the Inspector column. The dialog that holds
19
+ * them says so; a row reads it for its split, and a collection reads it to edit its entries in place
20
+ * instead of opening a second dialog over the first.
21
+ */
22
+ export const PhiInspectorDialogContext = createContext(false);
23
+ const PHI_INSPECTOR_FIELD_ROW_GAP = 12;
8
24
  /* The box that cuts the words is the one the hover text measures. */
9
25
  const PHI_INSPECTOR_FIELD_LABEL_TEXT_STYLE = { display: "block", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" };
10
26
  export function PhiInspectorFieldRow({ label, children, labelWidth = PHI_INSPECTOR_FIELD_LABEL_WIDTH, }) {
11
- return (_jsxs(PhiFlexControl, { align: "flex-start", gap: 12, wrap: false, style: { width: "100%" }, children: [_jsx(PhiTypographyControl, { style: { flex: `0 0 ${labelWidth}px`, minWidth: 0, lineHeight: "var(--phi-control-height)" }, children: _jsx(PhiTruncatedHoverText, { title: label, children: _jsx("span", { style: PHI_INSPECTOR_FIELD_LABEL_TEXT_STYLE, children: label }) }) }), _jsx("div", { style: { flex: "1 1 auto", minWidth: 0 }, children: children })] }));
27
+ const inDialog = useContext(PhiInspectorDialogContext);
28
+ const labelBasis = inDialog
29
+ ? `calc((100% - ${PHI_INSPECTOR_FIELD_ROW_GAP}px) * ${PHI_INSPECTOR_DIALOG_FIELD_LABEL_SHARE})`
30
+ : `${labelWidth}px`;
31
+ return (_jsxs(PhiFlexControl, { align: "flex-start", gap: PHI_INSPECTOR_FIELD_ROW_GAP, wrap: false, style: { width: "100%" }, children: [_jsx(PhiTypographyControl, { style: { flex: `0 0 ${labelBasis}`, minWidth: 0, lineHeight: "var(--phi-control-height)" }, children: _jsx(PhiTruncatedHoverText, { title: label, children: _jsx("span", { style: PHI_INSPECTOR_FIELD_LABEL_TEXT_STYLE, children: label }) }) }), _jsx("div", { style: { flex: "1 1 auto", minWidth: 0 }, children: children })] }));
12
32
  }
@@ -34,6 +34,7 @@ const PHI_BUILDER_CHROME_WIDGET_LABEL_SET = definePhiLabelSet({
34
34
  canvas_picker_pick_widget: PHI_BUILDER_CHROME_WIDGET_DEFAULT_LABELS.canvas.picker.pickWidget,
35
35
  canvas_picker_layouts: PHI_BUILDER_CHROME_WIDGET_DEFAULT_LABELS.canvas.picker.layouts,
36
36
  canvas_picker_widgets: PHI_BUILDER_CHROME_WIDGET_DEFAULT_LABELS.canvas.picker.widgets,
37
+ canvas_picker_section: PHI_BUILDER_CHROME_WIDGET_DEFAULT_LABELS.canvas.picker.section,
37
38
  canvas_picker_search_layouts: PHI_BUILDER_CHROME_WIDGET_DEFAULT_LABELS.canvas.picker.searchLayouts,
38
39
  canvas_picker_search_widgets: PHI_BUILDER_CHROME_WIDGET_DEFAULT_LABELS.canvas.picker.searchWidgets,
39
40
  canvas_picker_filter_packages: PHI_BUILDER_CHROME_WIDGET_DEFAULT_LABELS.canvas.picker.filterPackages,
@@ -111,6 +112,7 @@ export async function getPhiBuilderChromeWidgetLabels(options) {
111
112
  pickWidget: labels.canvas_picker_pick_widget,
112
113
  layouts: labels.canvas_picker_layouts,
113
114
  widgets: labels.canvas_picker_widgets,
115
+ section: labels.canvas_picker_section,
114
116
  searchLayouts: labels.canvas_picker_search_layouts,
115
117
  searchWidgets: labels.canvas_picker_search_widgets,
116
118
  filterPackages: labels.canvas_picker_filter_packages,
@@ -59,6 +59,11 @@ const PHI_INSPECTOR_WIDGET_LABEL_SET = definePhiLabelSet({
59
59
  field_add_item: PHI_INSPECTOR_WIDGET_DEFAULT_LABELS.fields.addItem,
60
60
  field_remove: PHI_INSPECTOR_WIDGET_DEFAULT_LABELS.fields.remove,
61
61
  field_edit: PHI_INSPECTOR_WIDGET_DEFAULT_LABELS.fields.edit,
62
+ field_conditions: PHI_INSPECTOR_WIDGET_DEFAULT_LABELS.fields.conditions,
63
+ field_condition_match: PHI_INSPECTOR_WIDGET_DEFAULT_LABELS.fields.conditionMatch,
64
+ field_condition_match_all: PHI_INSPECTOR_WIDGET_DEFAULT_LABELS.fields.conditionMatchAll,
65
+ field_condition_match_any: PHI_INSPECTOR_WIDGET_DEFAULT_LABELS.fields.conditionMatchAny,
66
+ field_condition_group_incomplete: PHI_INSPECTOR_WIDGET_DEFAULT_LABELS.fields.conditionGroupIncomplete,
62
67
  field_width: PHI_INSPECTOR_WIDGET_DEFAULT_LABELS.fields.width,
63
68
  field_height: PHI_INSPECTOR_WIDGET_DEFAULT_LABELS.fields.height,
64
69
  field_static_options: PHI_INSPECTOR_WIDGET_DEFAULT_LABELS.fields.staticOptions,
@@ -151,6 +156,11 @@ export async function getPhiInspectorWidgetLabels(options) {
151
156
  addItem: labels.field_add_item,
152
157
  remove: labels.field_remove,
153
158
  edit: labels.field_edit,
159
+ conditions: labels.field_conditions,
160
+ conditionMatch: labels.field_condition_match,
161
+ conditionMatchAll: labels.field_condition_match_all,
162
+ conditionMatchAny: labels.field_condition_match_any,
163
+ conditionGroupIncomplete: labels.field_condition_group_incomplete,
154
164
  width: labels.field_width,
155
165
  height: labels.field_height,
156
166
  staticOptions: labels.field_static_options,
@@ -38,12 +38,14 @@ const PHI_AUTH_SECURITY_WIDGET_LABEL_SET = definePhiLabelSet({
38
38
  sessions_active: "Active",
39
39
  sessions_revoke_confirm: definePhiMessageLabel("Revoke this session?"),
40
40
  sessions_revoke: "Revoke",
41
+ confirm_cancel: "Cancel",
41
42
  },
42
43
  });
43
44
  export async function getPhiAuthSecurityWidgetLabels(options) {
44
45
  const labels = await getPhiLabelSet(options, PHI_AUTH_SECURITY_WIDGET_LABEL_SET);
45
46
  return {
46
47
  intro: labels.intro,
48
+ confirmCancel: labels.confirm_cancel,
47
49
  errors: {
48
50
  unavailable: labels.error_unavailable,
49
51
  loadFailed: labels.error_load_failed,
@@ -93,6 +93,11 @@ export type PhiInspectorFieldLabels = {
93
93
  addItem: string;
94
94
  remove: string;
95
95
  edit: string;
96
+ conditions: string;
97
+ conditionMatch: string;
98
+ conditionMatchAll: string;
99
+ conditionMatchAny: string;
100
+ conditionGroupIncomplete: string;
96
101
  width: string;
97
102
  height: string;
98
103
  staticOptions: string;
@@ -62,6 +62,11 @@ export const PHI_INSPECTOR_WIDGET_DEFAULT_LABELS = {
62
62
  addItem: "Add item",
63
63
  remove: "Remove",
64
64
  edit: "Edit",
65
+ conditions: "Conditions",
66
+ conditionMatch: "Match",
67
+ conditionMatchAll: "All conditions",
68
+ conditionMatchAny: "Any condition",
69
+ conditionGroupIncomplete: "Not saved until every condition is complete: a Controller condition needs its Controller Address.",
65
70
  width: "Width",
66
71
  height: "Height",
67
72
  staticOptions: "Static options",
@@ -1,5 +1,7 @@
1
1
  export type PhiAuthSecurityWidgetLabels = {
2
2
  intro: string;
3
+ /** The way out of either confirmation; each answers with the action's own word. */
4
+ confirmCancel: string;
3
5
  errors: {
4
6
  unavailable: string;
5
7
  loadFailed: string;
@@ -3,6 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { PhiFlexControl } from "../../controls/phi-flex-control";
4
4
  import { PhiTagControl } from "../../controls/phi-tag-control";
5
5
  import { PhiTableControl } from "../../controls/phi-table-control";
6
+ import { PHI_INSPECTOR_TABLE_CONTROL_PROPS } from "../../../helpers/cms-inspector-drawer";
6
7
  import { PhiTypographyControl } from "../../controls/phi-typography-control";
7
8
  function readSignalCapabilityTableKey(capability) {
8
9
  return [
@@ -60,5 +61,7 @@ export function PhiSignalCapabilityList({ capabilities, emptyLabel = "none", sho
60
61
  return leftChannel.localeCompare(rightChannel) || left.action.localeCompare(right.action);
61
62
  });
62
63
  }
63
- return (_jsx(PhiTableControl, { rows: dataSource, rowIdentityPath: "key", size: "small", pagination: false, sortingMode: "none", sorts: [], columnOrder: columns.map((column) => column.key), layout: { mode: "auto", overflowX: "auto" }, columns: columns }));
64
+ return (_jsx(PhiTableControl
65
+ // An inspector's Table: lines only (BUILDER.md "Inspector contract").
66
+ , { ...PHI_INSPECTOR_TABLE_CONTROL_PROPS, rows: dataSource, rowIdentityPath: "key", size: "small", pagination: false, sortingMode: "none", sorts: [], columnOrder: columns.map((column) => column.key), layout: { mode: "auto", overflowX: "auto" }, columns: columns }));
64
67
  }
@@ -0,0 +1,15 @@
1
+ export declare const PHI_INSPECTOR_DRAWER_BODY_INSET: {
2
+ readonly padding: 0;
3
+ readonly innerPadding: "var(--phi-padding-sm)";
4
+ };
5
+ export declare const PHI_INSPECTOR_TABLE_PRESENTATION: {
6
+ readonly surface: null;
7
+ readonly borders: false;
8
+ readonly stickyHeader: false;
9
+ };
10
+ /** `PHI_INSPECTOR_TABLE_PRESENTATION` as `PhiTableControl` props, and as a Form table field's config. */
11
+ export declare const PHI_INSPECTOR_TABLE_CONTROL_PROPS: {
12
+ readonly surface: null;
13
+ readonly bordered: false;
14
+ readonly stickyHeader: false;
15
+ };
@@ -0,0 +1,37 @@
1
+ import { PHI_SPACE } from "../theme/antd-css-var-contract";
2
+ /*
3
+ * What an inspector Drawer's body insets, said once: the Builder's Region, Layout and Widget inspectors
4
+ * and the Asset inspector all stand in a 377px Drawer whose body is a Collapsible of sections.
5
+ *
6
+ * One `sm` step on each side (owner, 2026-11-25). It used to be two -- the Layout's `padding` and the
7
+ * sections' `innerPadding`, `sm` each -- which left 325px for what a section holds. The step is the
8
+ * sections' own, not the Layout's: a section header keeps its `sm` padding, so the content under it lines
9
+ * up with the header's text only when the Layout itself adds nothing around both. `innerPadding` is stated
10
+ * rather than left out, because left out the Collapsible takes the Theme's `base` step instead.
11
+ */
12
+ export const PHI_INSPECTOR_DRAWER_BODY_INSET = {
13
+ padding: 0,
14
+ innerPadding: PHI_SPACE.sm,
15
+ };
16
+ /*
17
+ * What a Table inside an inspector is, said once (owner, 2026-11-25): lines only. It stands on the
18
+ * inspector's own ground -- no Surface (`surface: null`, the Surface switch's "None"), so neither its box
19
+ * nor its header, footer or summary row paints a fill -- and it has no outer frame; the lines between its
20
+ * rows stay. Its header does not stick: a header without a ground of its own would let the rows show
21
+ * through it.
22
+ *
23
+ * Every Table an inspector shows takes it -- a Table Widget in an inspector tree as its `presentation`, a
24
+ * `PhiTableControl` an inspector client draws as its props, a Form's table field as its config -- and adds
25
+ * only what is its own. `scripts/validate-overlay-form-contracts.ts` holds each of them to it.
26
+ */
27
+ export const PHI_INSPECTOR_TABLE_PRESENTATION = {
28
+ surface: null,
29
+ borders: false,
30
+ stickyHeader: false,
31
+ };
32
+ /** `PHI_INSPECTOR_TABLE_PRESENTATION` as `PhiTableControl` props, and as a Form table field's config. */
33
+ export const PHI_INSPECTOR_TABLE_CONTROL_PROPS = {
34
+ surface: PHI_INSPECTOR_TABLE_PRESENTATION.surface,
35
+ bordered: PHI_INSPECTOR_TABLE_PRESENTATION.borders,
36
+ stickyHeader: PHI_INSPECTOR_TABLE_PRESENTATION.stickyHeader,
37
+ };
@@ -59,7 +59,7 @@ const PHI_FLEX_LAYOUT_OVERLAY_ACTIONS_PRESET = {
59
59
  separatorSpan: "75%",
60
60
  wrap: true,
61
61
  paddingTop: PHI_SPACE.xs,
62
- paddingRight: PHI_SPACE.base,
62
+ paddingRight: PHI_SPACE.xs,
63
63
  paddingBottom: PHI_SPACE.xs,
64
64
  paddingLeft: PHI_SPACE.base,
65
65
  width: "100%",
@@ -113,6 +113,7 @@ export function checkPhiPresetTreeContract(tree, options = {}) {
113
113
  const body = layoutsById.get(overlay.bodyLayoutNodeId);
114
114
  if (body)
115
115
  checkDialogBody(overlay.id, body, report);
116
+ checkDialogFormPlacement(overlay, tree, report);
116
117
  if (forms)
117
118
  checkDialogWidth(overlay, tree, forms, report);
118
119
  }
@@ -174,6 +175,61 @@ function checkDialogBody(overlayId, body, report) {
174
175
  report(overlayId, `Preset Overlay "${overlayId}" Body "${body.id}" does not match the dialog body (${bleed ? "PHI_DIALOG_BLEED_BODY_CONFIG" : "PHI_DIALOG_BODY_CONFIG"}) at "${mismatch[0]}".`);
175
176
  }
176
177
  }
178
+ /** The config keys by which a Layout insets what it holds. */
179
+ const PHI_LAYOUT_INSET_KEYS = [
180
+ "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft",
181
+ "margin", "marginTop", "marginRight", "marginBottom", "marginLeft",
182
+ ];
183
+ function isPhiLayoutInsetZero(value) {
184
+ return value == null || value === 0 || value === "" || value === "0" || value === "0px";
185
+ }
186
+ /*
187
+ * A dialog's Form stands in the dialog's body itself (owner, 2026-11-25; OVERLAYS.md, "The imperative
188
+ * exemption, and how narrow it is").
189
+ *
190
+ * The body is the template: it gives the Form the dialog's inset and ground, and the dialog's width is
191
+ * worked out for a Form standing in it. A Layout of the Preset's own between the two -- one that wraps
192
+ * the Form alone, or insets it -- builds the template a second time. The Builder's Area settings did:
193
+ * a `panel` Flex around the Form took the base step off the Form's width again, left it under 377px, and
194
+ * its labels stood above the fields in a dialog sized to keep them beside. A Layout that groups -- two
195
+ * Forms side by side on a Split Card -- holds more than one thing and insets nothing, and passes.
196
+ *
197
+ * Dialogs only: a Drawer's body is a panel of its own (the Asset inspector's is a Collapsible of sections),
198
+ * and the loop that calls this one skips every Overlay that is not a modal.
199
+ */
200
+ function checkDialogFormPlacement(overlay, tree, report) {
201
+ const layoutsById = new Map(tree.layoutNodes.map((node) => [node.id, node]));
202
+ const childCounts = new Map();
203
+ for (const node of [...tree.layoutNodes, ...tree.contentWidgets]) {
204
+ if (node.parentLayoutNodeId == null)
205
+ continue;
206
+ childCounts.set(node.parentLayoutNodeId, (childCounts.get(node.parentLayoutNodeId) ?? 0) + 1);
207
+ }
208
+ for (const widget of tree.contentWidgets) {
209
+ if (widget.widgetType !== PhiCmsWidgetType.Form || widget.parentLayoutNodeId === overlay.bodyLayoutNodeId)
210
+ continue;
211
+ const between = [];
212
+ let current = layoutsById.get(widget.parentLayoutNodeId);
213
+ while (current && current.id !== overlay.bodyLayoutNodeId) {
214
+ between.push(current);
215
+ current = current.parentLayoutNodeId == null ? undefined : layoutsById.get(current.parentLayoutNodeId);
216
+ }
217
+ // Not in this dialog's body at all.
218
+ if (!current)
219
+ continue;
220
+ for (const layout of between) {
221
+ const layoutId = layout.id;
222
+ const insets = PHI_LAYOUT_INSET_KEYS.find((key) => !isPhiLayoutInsetZero(layout.config[key]));
223
+ const wraps = (childCounts.get(layoutId) ?? 0) === 1;
224
+ if (!insets && !wraps)
225
+ continue;
226
+ report(overlay.id, `Preset Overlay "${overlay.id}" puts Layout "${layoutId}" between its body and the Form "${widget.id}", ` +
227
+ `${insets ? `and that Layout insets it ("${insets}")` : "and that Layout holds nothing else"}. A dialog's Form ` +
228
+ `stands in the body itself, which already gives it the dialog's inset: place it in "${overlay.bodyLayoutNodeId}".`);
229
+ break;
230
+ }
231
+ }
232
+ }
177
233
  function checkDialogCommands(overlayId, footerLayoutId, widgets, report) {
178
234
  for (const widget of widgets) {
179
235
  if (widget.parentLayoutNodeId !== footerLayoutId || widget.widgetType !== PhiCmsWidgetType.CommandToolbar)
@@ -29,5 +29,7 @@ export function readPhiTextSource(value) {
29
29
  export function isPhiAuthoredTextField(field) {
30
30
  if (field.type === "collection")
31
31
  return field.itemFields.some(isPhiAuthoredTextField);
32
+ if (field.type === "condition-group")
33
+ return field.conditionFields.some(isPhiAuthoredTextField);
32
34
  return readPhiConfigFieldTextRegister(field) != null;
33
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phis/ui",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -521,7 +521,7 @@
521
521
  "@lexical/rich-text": "0.53.0",
522
522
  "@lexical/selection": "0.53.0",
523
523
  "@lexical/utils": "0.53.0",
524
- "@phis/contracts": "^0.8.12",
524
+ "@phis/contracts": "^0.8.13",
525
525
  "dayjs": "^1.11.23",
526
526
  "dom-serializer": "^2.0.0",
527
527
  "htmlparser2": "^10.1.0",
@@ -535,8 +535,8 @@
535
535
  "phis": {
536
536
  "testedWith": {
537
537
  "@ant-design/icons": "6.3.4",
538
- "@types/node": "26.6.6",
539
- "@types/react": "19.3.0",
538
+ "@types/node": "26.6.10",
539
+ "@types/react": "19.3.2",
540
540
  "@types/react-dom": "19.3.0",
541
541
  "antd": "6.7.2",
542
542
  "next": "16.4.6",
@@ -2,7 +2,6 @@ export declare const PHI_ACCOUNTING_RUNTIME_MODULE_DEFINITION: Omit<{
2
2
  serverBinding: import("../../../types").PhiRuntimeModuleServerBinding;
3
3
  description: string;
4
4
  category: "foundation";
5
- icon: string;
6
5
  dataProviders: {
7
6
  key: `${string}/${string}`;
8
7
  ownerModuleId: "@phis/ui/modules/accounting";
@@ -61,4 +60,5 @@ export declare const PHI_ACCOUNTING_RUNTIME_MODULE_DEFINITION: Omit<{
61
60
  kind: "module";
62
61
  eligibleAreas: readonly ["public" | "app" | "admin" | "builder" | "editor" | "accounting"];
63
62
  title: "Public Base" | "App Base" | "Accounting Base" | "Admin Base" | "Builder Base" | "Editor Base";
63
+ icon: string;
64
64
  };
@@ -8,6 +8,5 @@ export const PHI_ACCOUNTING_RUNTIME_MODULE_DEFINITION = definePhiAreaBaseRuntime
8
8
  serverBinding: PHI_CORE_SERVER_BINDING,
9
9
  description: "Locked Accounting Area shell, navigation surface, root route, and the Site's product directory.",
10
10
  category: "foundation",
11
- icon: "antd:profile",
12
11
  dataProviders: PHI_ACCOUNTING_RUNTIME_DATA_PROVIDER_DESCRIPTORS,
13
12
  });
@@ -25,11 +25,11 @@ export declare const PHI_ACCOUNTING_PRODUCTS_PAGE_WIDGET_IDS: Readonly<Record<"w
25
25
  */
26
26
  export declare const PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET_KEY = "accounting-customer-file-page";
27
27
  /**
28
- * The person and their addresses, the file and its note dialog, the conversations with the one chosen and
29
- * its Reply dialog -- every one named in a route by another.
28
+ * The member select and its row, the person and their addresses, the file and its note dialog, the
29
+ * conversations with the one chosen and its Reply dialog -- every one named in a route by another.
30
30
  */
31
31
  export declare const PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_IDS: {
32
- widgets: Readonly<Record<"widgetConversation" | "widgetReplyForm" | "widgetReplyCommands" | "widgetPerson" | "widgetAddresses" | "widgetFile" | "widgetThreads" | "widgetNoteForm" | "widgetNoteCommands", import("@phis/contracts/cms").PhiCmsInstanceId>>;
32
+ widgets: Readonly<Record<"widgetConversation" | "widgetReplyForm" | "widgetReplyCommands" | "widgetMember" | "widgetPerson" | "widgetAddresses" | "widgetFile" | "widgetThreads" | "widgetNoteForm" | "widgetNoteCommands", import("@phis/contracts/cms").PhiCmsInstanceId>>;
33
33
  overlays: Readonly<Record<"overlayReply" | "overlayNote", import("@phis/contracts/cms").PhiCmsInstanceId>>;
34
- layouts: Readonly<Record<"layoutReply" | "layoutReplyFooter" | "layoutNote" | "layoutNoteFooter", import("@phis/contracts/cms").PhiCmsInstanceId>>;
34
+ layouts: Readonly<Record<"layoutReply" | "layoutReplyFooter" | "layoutMember" | "layoutNote" | "layoutNoteFooter", import("@phis/contracts/cms").PhiCmsInstanceId>>;
35
35
  };
@@ -38,11 +38,12 @@ const PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET = {
38
38
  presetKey: PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET_KEY,
39
39
  };
40
40
  /**
41
- * The person and their addresses, the file and its note dialog, the conversations with the one chosen and
42
- * its Reply dialog -- every one named in a route by another.
41
+ * The member select and its row, the person and their addresses, the file and its note dialog, the
42
+ * conversations with the one chosen and its Reply dialog -- every one named in a route by another.
43
43
  */
44
44
  export const PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_IDS = {
45
45
  widgets: createPhiPresetCmsInstanceIdMap(PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET, [
46
+ "widgetMember",
46
47
  "widgetPerson",
47
48
  "widgetAddresses",
48
49
  "widgetFile",
@@ -55,6 +56,7 @@ export const PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_IDS = {
55
56
  ]),
56
57
  overlays: createPhiPresetCmsInstanceIdMap(PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET, ["overlayNote", "overlayReply"]),
57
58
  layouts: createPhiPresetCmsInstanceIdMap(PHI_ACCOUNTING_CUSTOMER_FILE_PAGE_PRESET, [
59
+ "layoutMember",
58
60
  "layoutNote",
59
61
  "layoutNoteFooter",
60
62
  "layoutReply",
@@ -7,7 +7,6 @@ export declare const PHI_ACCOUNTING_RUNTIME_MODULE: {
7
7
  moduleId: "@phis/ui/modules/accounting";
8
8
  category: "foundation";
9
9
  description: string;
10
- icon: string;
11
10
  serverBinding: import("../../../types").PhiRuntimeModuleServerBinding;
12
11
  dataProviders: {
13
12
  key: `${string}/${string}`;
@@ -64,4 +63,5 @@ export declare const PHI_ACCOUNTING_RUNTIME_MODULE: {
64
63
  kind: "module";
65
64
  eligibleAreas: readonly ["public" | "app" | "admin" | "builder" | "editor" | "accounting"];
66
65
  title: "Public Base" | "App Base" | "Accounting Base" | "Admin Base" | "Builder Base" | "Editor Base";
66
+ icon: string;
67
67
  };
@@ -20,7 +20,8 @@ const PHI_CUSTOMER_FILE_PAGE_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_ACCO
20
20
  person_picker_hint: definePhiMessageLabel("Search by name, e-mail address or telephone number."),
21
21
  person_empty: definePhiMessageLabel("Choose a member to open their file."),
22
22
  own_file: definePhiMessageLabel("This is your own record; it is not shown here."),
23
- person_footer: definePhiMessageLabel("Member no. %1. Opening a file is written to the access log."),
23
+ // "Member ID", not "Member no.": the abbreviation read as the word "no" once translated.
24
+ person_footer: definePhiMessageLabel("Member ID %1. Opening a file is written to the access log."),
24
25
  // Core pages the conversations without a count: what this page holds, and which page it is.
25
26
  threads_footer: "%1 on page %2",
26
27
  column_display_name: "Shown as",
@@ -8,11 +8,12 @@ import type { PhiBlockRuntime } from "../../../../types";
8
8
  * already is and bound by Foundation names only (`constants/customer-file.ts`,
9
9
  * `constants/threads-controller-address.ts`): the Table and Collection Providers and the Conversations
10
10
  * Controller are the conversations Module's, which is active in the Accounting Area by default and has to
11
- * be for this Page to read anything. The person Table's filter is Core's member picker
11
+ * be for this Page to read anything. Above everything stands the member select, Core's member picker
12
12
  * (the `site-members` options with Core's search, which matches names, e-mail addresses and telephone
13
- * numbers); its query goes to the conversations Table and to the Conversations Controller, so one choice
14
- * fills the Page with one request: the Controller hands the member to the addresses tiles as binding params
15
- * (Core's address renderer, read-only), joins the Tables' read for the file's id and hands it to the file
13
+ * numbers), because it is the input of everything below it; its value goes to the Conversations
14
+ * Controller, so one choice fills the Page with one request: the Controller hands the member to the person
15
+ * and the conversations Tables as filters and to the addresses tiles as binding params (Core's address
16
+ * renderer, read-only), joins the Tables' read for the file's id and hands it to the file
16
17
  * panel, a conversation reader whose "Add note" opens Core's Reply Form
17
18
  * in a dialog of its own (every message of a file is internal). The conversations Table lists the person's
18
19
  * conversations, the file not among them, and choosing a row is the conversations Page's choreography