@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
@@ -3,6 +3,7 @@ import { createPhiPresetCmsInstanceIdMap, } from "../../../../types/cms-instance
3
3
  import { PHI_CMS_DEFAULT_SLOT_INDEX, PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS, PHI_CMS_THREE_COLUMN_LAYOUT_SLOT_INDEX, } from "../../../../constants/cms-layout-types";
4
4
  import { PhiCmsFlags, PhiCmsRegionType, PhiCmsStatus } from "../../../../constants/phi-cms";
5
5
  import { PHI_CMS_AREA_KEYS } from "../../../../constants/cms-areas";
6
+ import { PHI_AREA_ICONS } from "../../area-base-definition";
6
7
  import { buildPhiCmsLayoutNode } from "../../../../helpers/cms-node-factories";
7
8
  import { createPhiCmsPresetNodes } from "../../../../helpers/cms-preset-nodes";
8
9
  import { buildPhiHeaderTopActionsLayoutNode } from "../../../../components/regions/presets/phi-header-top-actions-layout";
@@ -431,6 +432,8 @@ export async function buildPhiDefaultBuilderAreaPresetTree({ page, runtime, }) {
431
432
  label: "dev header top three column",
432
433
  config: {
433
434
  balancedSides: true,
435
+ // Three equal columns: what stands in the middle never needs more than a third.
436
+ sideShare: 33,
434
437
  contentAlign: "center",
435
438
  },
436
439
  }),
@@ -444,6 +447,8 @@ export async function buildPhiDefaultBuilderAreaPresetTree({ page, runtime, }) {
444
447
  label: "dev header main three column",
445
448
  config: {
446
449
  balancedSides: true,
450
+ // Three equal columns: what stands in the middle never needs more than a third.
451
+ sideShare: 33,
447
452
  contentAlign: "center",
448
453
  },
449
454
  }),
@@ -980,6 +985,8 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
980
985
  label: isStructurePage ? "dev shells workspace header" : "dev pages workspace header",
981
986
  config: {
982
987
  balancedSides: true,
988
+ // Three equal columns above the canvas, like the Area headers.
989
+ sideShare: 33,
983
990
  contentAlign: "center",
984
991
  padding: PHI_SPACE.xs,
985
992
  paddingLeft: 0,
@@ -1067,16 +1074,6 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
1067
1074
  ...PHI_DIALOG_BODY_CONFIG,
1068
1075
  },
1069
1076
  }),
1070
- nodes.layout({
1071
- creationPreset: { layoutKind: "verticalflex", preset: "panel" },
1072
- typeKey: "flex-vertical",
1073
- id: PHI_BUILDER_AREA_SETTINGS_LAYOUT_IDS.areaSettingsFields,
1074
- parentLayoutNodeId: PHI_BUILDER_AREA_SETTINGS_LAYOUT_IDS.areaSettingsBody,
1075
- slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX,
1076
- sortOrder: 0,
1077
- label: "Builder area settings fields",
1078
- config: {},
1079
- }),
1080
1077
  nodes.layout({
1081
1078
  creationPreset: { layoutKind: "flex", preset: "overlay-actions" },
1082
1079
  typeKey: "flex",
@@ -1221,7 +1218,7 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
1221
1218
  *
1222
1219
  * A Form rather than six Controls in a column, for the one thing a Form does that a stack
1223
1220
  * cannot: it states the label column once -- `PHI_FORM_DEFAULT_LAYOUT` puts every caption
1224
- * in tracks 1-9 and every Control in 9-25 -- so the rows line up on an edge of their own
1221
+ * in one range of tracks and every Control after it -- so the rows line up on an edge of their own
1225
1222
  * instead of each being indented by the width of its own caption. None of the questions
1226
1223
  * changed, and neither did what an answer is stored as.
1227
1224
  *
@@ -1237,7 +1234,9 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
1237
1234
  nodes.widget({
1238
1235
  typeKey: "form",
1239
1236
  id: PHI_BUILDER_AREA_SETTINGS_WIDGET_IDS.areaSettingsForm,
1240
- parentLayoutNodeId: PHI_BUILDER_AREA_SETTINGS_LAYOUT_IDS.areaSettingsFields,
1237
+ // In the dialog's body itself, as every dialog's Form stands: a Layout of its own between
1238
+ // them was a second inset, which left the Form under 377px and its labels above the fields.
1239
+ parentLayoutNodeId: PHI_BUILDER_AREA_SETTINGS_LAYOUT_IDS.areaSettingsBody,
1241
1240
  slotIndex: PHI_CMS_SEQUENTIAL_LAYOUT_SLOTS[0].slotIndex,
1242
1241
  sortOrder: 0,
1243
1242
  // The Builder's Label Set, translated already.
@@ -1572,17 +1571,25 @@ async function buildPhiDefaultBuilderPagePresetTemplateTree({ page, runtime, pre
1572
1571
  disabledWhen: { source: "row", valuePath: "locked", operator: "truthy" },
1573
1572
  },
1574
1573
  },
1575
- { key: "title", fieldKey: "title", iconFieldKey: "icon", title: modulesLabels?.columns.title ?? "Module", sortable: true },
1574
+ // Next to the switch, so a scrolled row still says which Module it is.
1575
+ { key: "title", fieldKey: "title", iconFieldKey: "icon", title: modulesLabels?.columns.title ?? "Module", sortable: true, sticky: "left" },
1576
1576
  /*
1577
1577
  * One checkbox column per Area: the switch is the Module everywhere, these are
1578
1578
  * the per-Area refinement. A Module not eligible for an Area carries null there
1579
1579
  * and the cell renders empty; the Area whose Base module the row is stays
1580
1580
  * checked and disabled, and so does every Area of a Module that is always active.
1581
+ *
1582
+ * Headed by the Area's icon alone, its name the tooltip and the accessible name,
1583
+ * and all of one width: the names differ in length (App, Accounting) and set six
1584
+ * checkbox columns to six widths, while what is under each is the same checkbox.
1581
1585
  */
1582
1586
  ...PHI_CMS_AREA_KEYS.map((areaKey) => ({
1583
1587
  key: `area_${areaKey}`,
1584
1588
  fieldKey: `area_${areaKey}`,
1585
1589
  title: modulesLabels?.areas[areaKey] ?? areaKey,
1590
+ titleIcon: PHI_AREA_ICONS[areaKey],
1591
+ titleDisplay: "icon",
1592
+ sizing: { mode: "fixed", width: 44 },
1586
1593
  align: "center",
1587
1594
  editor: {
1588
1595
  control: "checkbox",
@@ -108,8 +108,15 @@ export function applyPhiWorkspaceCatalogPreload(preload) {
108
108
  */
109
109
  const publicRoutePathsChanged = JSON.stringify(current.publicRoutePaths) !== preload.keys.publicRoutePaths;
110
110
  const catalogHydrationChanged = !current.catalogHydrated;
111
+ /*
112
+ * The Area's landing, where it has one, rather than the first Page in the catalog -- which is an
113
+ * error Page as often as not. The Page list decides once the Area's root route is read: a root
114
+ * that forwards is not on offer there, and the workspace moves on to where it leads.
115
+ */
116
+ const areaPages = preload.activeCatalogs.modulePresetPagesByArea[current.area] ?? [];
111
117
  const initialPageKey = current.pageKey ||
112
- resolvePhiBuilderActivePageKey(null, preload.activeCatalogs.modulePresetPagesByArea[current.area]) || "";
118
+ areaPages.find((node) => node.storagePath === "/")?.key ||
119
+ resolvePhiBuilderActivePageKey(null, areaPages) || "";
113
120
  const initialPageChanged = initialPageKey !== current.pageKey;
114
121
  const nextModuleIdsByArea = { ...(current.runtimeModuleIdsByArea ?? {}) };
115
122
  for (const [area, moduleIds] of Object.entries(preload.runtimeModuleIdsByArea)) {
@@ -200,13 +200,18 @@ export async function buildPhiDefaultAdminCdnPageTree({ page, runtime, }) {
200
200
  config: {
201
201
  source,
202
202
  presentation: {
203
- // Fixed, so a long file name and the checksum are cut to their columns and said whole on hover.
204
- layout: { mode: "fixed", overflowX: "auto" },
203
+ /*
204
+ * Auto, so every column is as wide as what stands in it and the file name takes the rest, as in
205
+ * the other staff Tables. A fixed layout held each column at a width chosen once: a version or
206
+ * a name longer than that was cut, a short one left its column half empty, and the sum ran past
207
+ * the page into a sideways scroll under the sticky actions.
208
+ */
209
+ layout: { mode: "auto", overflowX: "auto" },
205
210
  columns: [
206
- { key: "name", fieldKey: "name", title: labels.columns.name, sortable: true, ellipsis: true, sizing: { mode: "fixed", width: 140 }, sticky: "left" },
207
- { key: "version", fieldKey: "version", title: labels.columns.version, ellipsis: true, sizing: { mode: "fixed", width: 110 } },
208
- { key: "fileName", fieldKey: "fileName", title: labels.columns.file, ellipsis: true, sizing: { mode: "fill", minWidth: 200 } },
209
- { key: "size", fieldKey: "sizeLabel", title: labels.columns.size, align: "right", sizing: { mode: "fixed", width: 96 } },
211
+ { key: "name", fieldKey: "name", title: labels.columns.name, sortable: true, sizing: { mode: "content" }, sticky: "left" },
212
+ { key: "version", fieldKey: "version", title: labels.columns.version, sizing: { mode: "content" } },
213
+ { key: "fileName", fieldKey: "fileName", title: labels.columns.file, sizing: { mode: "fill", minWidth: 200 } },
214
+ { key: "size", fieldKey: "sizeLabel", title: labels.columns.size, align: "right", sizing: { mode: "content" } },
210
215
  {
211
216
  key: "storage",
212
217
  fieldKey: "storage",
@@ -215,7 +220,7 @@ export async function buildPhiDefaultAdminCdnPageTree({ page, runtime, }) {
215
220
  renderer: "badge",
216
221
  valueMap: labels.storage,
217
222
  tagColorMap: storageColors,
218
- sizing: { mode: "fixed", width: 96 },
223
+ sizing: { mode: "content" },
219
224
  },
220
225
  {
221
226
  key: "platform",
@@ -223,17 +228,24 @@ export async function buildPhiDefaultAdminCdnPageTree({ page, runtime, }) {
223
228
  title: labels.columns.platform,
224
229
  renderer: "tags",
225
230
  valueMap: platformNames,
226
- sizing: { mode: "fixed", width: 160 },
231
+ /*
232
+ * Tags wrap where their column is narrower than them, and a `content` column is given no
233
+ * more than its narrowest: this one shares the rest with the file, never below "Windows x64".
234
+ */
235
+ sizing: { mode: "fill", minWidth: 128 },
227
236
  },
228
237
  {
229
- // Cut to the column's width; the cell holds the whole checksum, so copying it copies all of it.
238
+ /*
239
+ * Hidden: a checksum is 64 characters without a place to break, and only a fixed layout may
240
+ * cut a column short. The file's details say it whole; the Builder can show it here.
241
+ */
230
242
  key: "sha256",
231
243
  fieldKey: "sha256",
232
244
  title: labels.columns.sha256,
233
245
  description: labels.columns.sha256Hint,
234
246
  renderer: "code",
235
- ellipsis: true,
236
- sizing: { mode: "fixed", width: 120 },
247
+ hidden: true,
248
+ sizing: { mode: "content" },
237
249
  },
238
250
  {
239
251
  key: "state",
@@ -242,10 +254,10 @@ export async function buildPhiDefaultAdminCdnPageTree({ page, runtime, }) {
242
254
  renderer: "badge",
243
255
  valueMap: labels.states,
244
256
  tagColorMap: stateColors,
245
- sizing: { mode: "fixed", width: 116 },
257
+ sizing: { mode: "content" },
246
258
  },
247
- { key: "origin", fieldKey: "origin", title: labels.columns.origin, valueMap: originNames, ellipsis: true, sizing: { mode: "fixed", width: 140 } },
248
- { key: "publishedAt", fieldKey: "publishedAt", title: labels.columns.published, renderer: "datetime", sortable: true, sizing: { mode: "fixed", width: 180 } },
259
+ { key: "origin", fieldKey: "origin", title: labels.columns.origin, valueMap: originNames, sizing: { mode: "content" } },
260
+ { key: "publishedAt", fieldKey: "publishedAt", title: labels.columns.published, renderer: "datetime", sortable: true, sizing: { mode: "content" } },
249
261
  ],
250
262
  emptyState: { title: labels.emptyTitle, description: labels.emptyText },
251
263
  footer: {
@@ -106,7 +106,8 @@ export default createPhiAuthoringWidgetModule([
106
106
  definePhiAuthoringWidgetModuleLoader(PHI_ENTRY_LIST_WIDGET_DEFINITION, () => import("./widgets/entry-list/authoring").then((module) => module.PHI_ENTRY_LIST_WIDGET_BUILDER_PLUGIN)),
107
107
  definePhiAuthoringWidgetModuleLoader(PHI_ENTRY_DETAIL_WIDGET_DEFINITION, () => import("./widgets/entry-detail/authoring").then((module) => module.PHI_ENTRY_DETAIL_WIDGET_BUILDER_PLUGIN)),
108
108
  definePhiAuthoringWidgetModuleLoader(PHI_ENTRY_HEADER_WIDGET_DEFINITION, () => import("./widgets/entry-header/authoring").then((module) => module.PHI_ENTRY_HEADER_WIDGET_BUILDER_PLUGIN)),
109
- definePhiAuthoringWidgetModuleLoader(PHI_THREAD_CONVERSATION_WIDGET_DEFINITION, () => Promise.resolve(PHI_THREAD_CONVERSATION_WIDGET_DEFINITION)),
109
+ definePhiAuthoringWidgetModuleLoader(PHI_THREAD_CONVERSATION_WIDGET_DEFINITION, () => import("./widgets/thread-conversation/authoring")
110
+ .then((module) => module.PHI_THREAD_CONVERSATION_WIDGET_BUILDER_PLUGIN)),
110
111
  definePhiAuthoringWidgetModuleLoader(PHI_FLOAT_BUTTON_WIDGET_DEFINITION, () => import("./widgets/float-button/authoring").then((module) => module.PHI_FLOAT_BUTTON_WIDGET_BUILDER_PLUGIN)),
111
112
  definePhiAuthoringWidgetModuleLoader(PHI_SPACER_WIDGET_DEFINITION, () => import("./widgets/spacer/authoring").then((module) => module.PHI_SPACER_WIDGET_BUILDER_PLUGIN)),
112
113
  definePhiAuthoringWidgetModuleLoader(PHI_SWITCH_WIDGET_DEFINITION, () => import("./widgets/switch/authoring").then((module) => module.PHI_SWITCH_WIDGET_BUILDER_PLUGIN)),
@@ -0,0 +1,49 @@
1
+ export type PhiThreadConversationLabels = {
2
+ noThreadText: string;
3
+ loadingText: string;
4
+ emptyText: string;
5
+ subjectFallback: string;
6
+ olderLabel: string;
7
+ archivedLabel: string;
8
+ lockedLabel: string;
9
+ lockedText: string;
10
+ replyLabel: string;
11
+ participantsLabel: string;
12
+ internalLabel: string;
13
+ translateLabel: string;
14
+ originalLabel: string;
15
+ machineTranslationLabel: string;
16
+ redactedText: string;
17
+ withheldText: string;
18
+ systemAuthorLabel: string;
19
+ unnamedAuthorLabel: string;
20
+ feedback: {
21
+ errorTitle: string;
22
+ errorGeneric: string;
23
+ errorNetwork: string;
24
+ errorNotFound: string;
25
+ errorTranslation: string;
26
+ };
27
+ /**
28
+ * The made-up conversation the Builder canvas draws in place of one it may not read: who wrote, what
29
+ * they wrote and what hung on it. Never shown on a live Page.
30
+ */
31
+ sample: {
32
+ /** On the heading, so nobody takes the sample for somebody's conversation. */
33
+ tag: string;
34
+ subject: string;
35
+ memberName: string;
36
+ staffName: string;
37
+ /** A conversation: the member asks, staff note it internally and answer with an attachment. */
38
+ question: string;
39
+ note: string;
40
+ answer: string;
41
+ answerAttachment: string;
42
+ /** A file (a placement that names its conversation): staff's notes, one with an attachment. */
43
+ fileCall: string;
44
+ fileAddress: string;
45
+ fileContract: string;
46
+ fileAttachment: string;
47
+ };
48
+ };
49
+ export declare const PHI_THREAD_CONVERSATION_DEFAULT_LABELS: PhiThreadConversationLabels;
@@ -0,0 +1,48 @@
1
+ /*
2
+ * The words of a conversation reader in their source language, where the browser can read them.
3
+ *
4
+ * The Label Set in `labels.ts` is built from these, so each sentence is written once; the server
5
+ * translates the set for the live Widget, and the Builder canvas, which shows every text in its source
6
+ * language, reads them here.
7
+ */
8
+ export const PHI_THREAD_CONVERSATION_DEFAULT_LABELS = {
9
+ noThreadText: "Choose a conversation to read.",
10
+ loadingText: "Loading the conversation.",
11
+ emptyText: "Nothing has been said here yet.",
12
+ subjectFallback: "Conversation",
13
+ olderLabel: "Show earlier messages",
14
+ archivedLabel: "Archived",
15
+ lockedLabel: "Locked",
16
+ lockedText: "This conversation is locked. Nobody can write in it until it is unlocked.",
17
+ replyLabel: "Reply",
18
+ participantsLabel: "In this conversation",
19
+ internalLabel: "Internal note",
20
+ translateLabel: "Translate",
21
+ originalLabel: "Show the original",
22
+ machineTranslationLabel: "Machine translation",
23
+ redactedText: "This message was withdrawn.",
24
+ withheldText: "This message is not shown to you.",
25
+ systemAuthorLabel: "System",
26
+ unnamedAuthorLabel: "Someone",
27
+ feedback: {
28
+ errorTitle: "That did not work",
29
+ errorGeneric: "The conversation could not be loaded.",
30
+ errorNetwork: "The site could not be reached.",
31
+ errorNotFound: "This conversation is not there, or is not yours to read.",
32
+ errorTranslation: "The translation could not be fetched.",
33
+ },
34
+ sample: {
35
+ tag: "Sample",
36
+ subject: "Missing manual",
37
+ memberName: "Alex Example",
38
+ staffName: "Robin Sample",
39
+ question: "Hello, my order arrived without the manual. Could you send it to me?",
40
+ note: "The whole batch shipped without manuals; the warehouse knows.",
41
+ answer: "Thank you for telling us. The manual is attached, and a printed copy is on its way to you.",
42
+ answerAttachment: "manual.pdf",
43
+ fileCall: "Called about the open invoice. Payment follows by the end of the month.",
44
+ fileAddress: "A parcel came back undelivered; the delivery address is corrected.",
45
+ fileContract: "Signed contract received and filed.",
46
+ fileAttachment: "contract.pdf",
47
+ },
48
+ };
@@ -1,5 +1,6 @@
1
1
  import "server-only";
2
2
  import { type PhiGlobalTranslatorOptions } from "../../../../gateway/tr";
3
+ import { type PhiThreadConversationLabels } from "./label-defaults";
3
4
  export declare function getPhiThreadReplyFormLabels(options: PhiGlobalTranslatorOptions): Promise<{
4
5
  replyLabel: string;
5
6
  replyPlaceholder: string;
@@ -9,31 +10,4 @@ export declare function getPhiThreadReplyFormLabels(options: PhiGlobalTranslator
9
10
  audienceInternal: string;
10
11
  replySendLabel: string;
11
12
  }>;
12
- export declare function getPhiThreadConversationLabels(options: PhiGlobalTranslatorOptions): Promise<{
13
- noThreadText: string;
14
- loadingText: string;
15
- emptyText: string;
16
- subjectFallback: string;
17
- olderLabel: string;
18
- archivedLabel: string;
19
- lockedLabel: string;
20
- lockedText: string;
21
- replyLabel: string;
22
- participantsLabel: string;
23
- internalLabel: string;
24
- translateLabel: string;
25
- originalLabel: string;
26
- machineTranslationLabel: string;
27
- redactedText: string;
28
- withheldText: string;
29
- systemAuthorLabel: string;
30
- unnamedAuthorLabel: string;
31
- feedback: {
32
- errorTitle: string;
33
- errorGeneric: string;
34
- errorNetwork: string;
35
- errorNotFound: string;
36
- errorTranslation: string;
37
- };
38
- }>;
39
- export type PhiThreadConversationLabels = Awaited<ReturnType<typeof getPhiThreadConversationLabels>>;
13
+ export declare function getPhiThreadConversationLabels(options: PhiGlobalTranslatorOptions): Promise<PhiThreadConversationLabels>;
@@ -2,6 +2,7 @@ import "server-only";
2
2
  import { PHI_TR_CTX_WEB_UI_LABEL } from "../../../../gateway/tr";
3
3
  import { definePhiRuntimeModuleLabelSet, definePhiMessageLabel, getPhiLabelSet } from "../../../../gateway/label-set";
4
4
  import { PHI_CORE_RUNTIME_MODULE_IDENTITY } from "../ids";
5
+ import { PHI_THREAD_CONVERSATION_DEFAULT_LABELS } from "./label-defaults";
5
6
  /*
6
7
  * What a conversation and the reply to it say, wherever they are placed.
7
8
  *
@@ -9,26 +10,27 @@ import { PHI_CORE_RUNTIME_MODULE_IDENTITY } from "../ids";
9
10
  * a group's, Support's, an add-on's -- places the same conversation and the same reply, and reads them
10
11
  * in the same words. A Module says what its own Page is called; it does not say "Reply" again.
11
12
  */
13
+ const D = PHI_THREAD_CONVERSATION_DEFAULT_LABELS;
12
14
  const PHI_THREAD_CONVERSATION_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_CORE_RUNTIME_MODULE_IDENTITY, {
13
15
  key: "widget:thread-conversation",
14
16
  ctx: PHI_TR_CTX_WEB_UI_LABEL,
15
17
  labels: {
16
- no_thread_text: definePhiMessageLabel("Choose a conversation to read."),
17
- loading_text: definePhiMessageLabel("Loading the conversation."),
18
- empty_text: definePhiMessageLabel("Nothing has been said here yet."),
19
- subject_fallback: "Conversation",
20
- older_label: "Show earlier messages",
21
- archived_label: "Archived",
22
- locked_label: "Locked",
18
+ no_thread_text: definePhiMessageLabel(D.noThreadText),
19
+ loading_text: definePhiMessageLabel(D.loadingText),
20
+ empty_text: definePhiMessageLabel(D.emptyText),
21
+ subject_fallback: D.subjectFallback,
22
+ older_label: D.olderLabel,
23
+ archived_label: D.archivedLabel,
24
+ locked_label: D.lockedLabel,
23
25
  /*
24
26
  * Where the Reply would have been. A locked conversation takes no new message from anybody, so the
25
27
  * way to write one is not offered at all rather than offered and then refused.
26
28
  */
27
- locked_text: definePhiMessageLabel("This conversation is locked. Nobody can write in it until it is unlocked."),
29
+ locked_text: definePhiMessageLabel(D.lockedText),
28
30
  /* The action in the conversation's heading that opens a reply. */
29
- reply_label: "Reply",
31
+ reply_label: D.replyLabel,
30
32
  /* Before the names of who is in it, beneath a heading that is the subject. */
31
- participants_label: "In this conversation",
33
+ participants_label: D.participantsLabel,
32
34
  /*
33
35
  * Said on the note itself rather than in a legend somewhere.
34
36
  *
@@ -36,7 +38,7 @@ const PHI_THREAD_CONVERSATION_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_COR
36
38
  * must never be in doubt is which of the two a message is. A marker on the message is the only
37
39
  * place a person actually looks while writing the next one.
38
40
  */
39
- internal_label: "Internal note",
41
+ internal_label: D.internalLabel,
40
42
  /*
41
43
  * One word for the control, because there is one control.
42
44
  *
@@ -44,8 +46,8 @@ const PHI_THREAD_CONVERSATION_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_COR
44
46
  * only appears where that language can actually be produced. A picker beside every message would have
45
47
  * been a second control on every row for the sake of reading one message in a third language.
46
48
  */
47
- translate_label: "Translate",
48
- original_label: "Show the original",
49
+ translate_label: D.translateLabel,
50
+ original_label: D.originalLabel,
49
51
  /*
50
52
  * Said on the translation, because an unmarked one reads as what the person wrote.
51
53
  *
@@ -54,17 +56,30 @@ const PHI_THREAD_CONVERSATION_LABEL_SET = definePhiRuntimeModuleLabelSet(PHI_COR
54
56
  * beside it as its own name, where the provider reported one -- not woven into a sentence, which would
55
57
  * fix a word order that only holds in English.
56
58
  */
57
- machine_translation_label: "Machine translation",
58
- translation_error_text: definePhiMessageLabel("The translation could not be fetched."),
59
- redacted_text: definePhiMessageLabel("This message was withdrawn."),
60
- withheld_text: definePhiMessageLabel("This message is not shown to you."),
61
- system_author_label: "System",
59
+ machine_translation_label: D.machineTranslationLabel,
60
+ translation_error_text: definePhiMessageLabel(D.feedback.errorTranslation),
61
+ redacted_text: definePhiMessageLabel(D.redactedText),
62
+ withheld_text: definePhiMessageLabel(D.withheldText),
63
+ system_author_label: D.systemAuthorLabel,
62
64
  /* A projection carries a display name or nothing; nothing is still somebody. */
63
- unnamed_author_label: "Someone",
64
- error_title: "That did not work",
65
- error_generic: definePhiMessageLabel("The conversation could not be loaded."),
66
- error_network: definePhiMessageLabel("The site could not be reached."),
67
- error_not_found: definePhiMessageLabel("This conversation is not there, or is not yours to read."),
65
+ unnamed_author_label: D.unnamedAuthorLabel,
66
+ error_title: D.feedback.errorTitle,
67
+ error_generic: definePhiMessageLabel(D.feedback.errorGeneric),
68
+ error_network: definePhiMessageLabel(D.feedback.errorNetwork),
69
+ error_not_found: definePhiMessageLabel(D.feedback.errorNotFound),
70
+ // The Builder canvas's made-up conversation (`label-defaults.ts`, `sample`).
71
+ sample_tag: D.sample.tag,
72
+ sample_subject: D.sample.subject,
73
+ sample_member_name: D.sample.memberName,
74
+ sample_staff_name: D.sample.staffName,
75
+ sample_question: definePhiMessageLabel(D.sample.question),
76
+ sample_note: definePhiMessageLabel(D.sample.note),
77
+ sample_answer: definePhiMessageLabel(D.sample.answer),
78
+ sample_answer_attachment: D.sample.answerAttachment,
79
+ sample_file_call: definePhiMessageLabel(D.sample.fileCall),
80
+ sample_file_address: definePhiMessageLabel(D.sample.fileAddress),
81
+ sample_file_contract: definePhiMessageLabel(D.sample.fileContract),
82
+ sample_file_attachment: D.sample.fileAttachment,
68
83
  },
69
84
  });
70
85
  /**
@@ -129,5 +144,19 @@ export async function getPhiThreadConversationLabels(options) {
129
144
  errorNotFound: labels.error_not_found,
130
145
  errorTranslation: labels.translation_error_text,
131
146
  },
147
+ sample: {
148
+ tag: labels.sample_tag,
149
+ subject: labels.sample_subject,
150
+ memberName: labels.sample_member_name,
151
+ staffName: labels.sample_staff_name,
152
+ question: labels.sample_question,
153
+ note: labels.sample_note,
154
+ answer: labels.sample_answer,
155
+ answerAttachment: labels.sample_answer_attachment,
156
+ fileCall: labels.sample_file_call,
157
+ fileAddress: labels.sample_file_address,
158
+ fileContract: labels.sample_file_contract,
159
+ fileAttachment: labels.sample_file_attachment,
160
+ },
132
161
  };
133
162
  }
@@ -474,6 +474,20 @@ export declare const PHI_CARD_WIDGET_DEFINITION: {
474
474
  editorPlacement?: "inspector" | "geometry" | "toolbar";
475
475
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
476
476
  heading?: string;
477
+ } & {
478
+ type: "condition-group";
479
+ conditionFields: PhiCmsConfigField[];
480
+ defaultCondition: Record<string, unknown>;
481
+ addLabel?: string;
482
+ emptyLabel?: string;
483
+ }) | ({
484
+ key: string;
485
+ label: string;
486
+ description?: string;
487
+ required?: boolean;
488
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
489
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
490
+ heading?: string;
477
491
  } & {
478
492
  type: "surface";
479
493
  tone?: false;
@@ -359,6 +359,20 @@ export declare const PHI_COMMAND_TOOLBAR_WIDGET_DEFINITION: {
359
359
  editorPlacement?: "inspector" | "geometry" | "toolbar";
360
360
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
361
361
  heading?: string;
362
+ } & {
363
+ type: "condition-group";
364
+ conditionFields: import("../../../../../types").PhiCmsConfigField[];
365
+ defaultCondition: Record<string, unknown>;
366
+ addLabel?: string;
367
+ emptyLabel?: string;
368
+ }) | ({
369
+ key: string;
370
+ label: string;
371
+ description?: string;
372
+ required?: boolean;
373
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
374
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
375
+ heading?: string;
362
376
  } & {
363
377
  type: "surface";
364
378
  tone?: false;
@@ -325,6 +325,20 @@ export declare const PHI_DESCRIPTION_WIDGET_DEFINITION: {
325
325
  editorPlacement?: "inspector" | "geometry" | "toolbar";
326
326
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
327
327
  heading?: string;
328
+ } & {
329
+ type: "condition-group";
330
+ conditionFields: import("../../../../../types").PhiCmsConfigField[];
331
+ defaultCondition: Record<string, unknown>;
332
+ addLabel?: string;
333
+ emptyLabel?: string;
334
+ }) | ({
335
+ key: string;
336
+ label: string;
337
+ description?: string;
338
+ required?: boolean;
339
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
340
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
341
+ heading?: string;
328
342
  } & {
329
343
  type: "surface";
330
344
  tone?: false;
@@ -368,6 +368,20 @@ export declare const PHI_ENTRY_LIST_WIDGET_DEFINITION: {
368
368
  editorPlacement?: "inspector" | "geometry" | "toolbar";
369
369
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
370
370
  heading?: string;
371
+ } & {
372
+ type: "condition-group";
373
+ conditionFields: import("../../../../../types").PhiCmsConfigField[];
374
+ defaultCondition: Record<string, unknown>;
375
+ addLabel?: string;
376
+ emptyLabel?: string;
377
+ }) | ({
378
+ key: string;
379
+ label: string;
380
+ description?: string;
381
+ required?: boolean;
382
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
383
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
384
+ heading?: string;
371
385
  } & {
372
386
  type: "surface";
373
387
  tone?: false;
@@ -372,6 +372,20 @@ export declare const PHI_FLOAT_BUTTON_WIDGET_DEFINITION: {
372
372
  editorPlacement?: "inspector" | "geometry" | "toolbar";
373
373
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
374
374
  heading?: string;
375
+ } & {
376
+ type: "condition-group";
377
+ conditionFields: import("../../../../../types").PhiCmsConfigField[];
378
+ defaultCondition: Record<string, unknown>;
379
+ addLabel?: string;
380
+ emptyLabel?: string;
381
+ }) | ({
382
+ key: string;
383
+ label: string;
384
+ description?: string;
385
+ required?: boolean;
386
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
387
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
388
+ heading?: string;
375
389
  } & {
376
390
  type: "surface";
377
391
  tone?: false;
@@ -339,6 +339,20 @@ export declare const PHI_GALLERY_WIDGET_DEFINITION: {
339
339
  editorPlacement?: "inspector" | "geometry" | "toolbar";
340
340
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
341
341
  heading?: string;
342
+ } & {
343
+ type: "condition-group";
344
+ conditionFields: import("../../../../../types").PhiCmsConfigField[];
345
+ defaultCondition: Record<string, unknown>;
346
+ addLabel?: string;
347
+ emptyLabel?: string;
348
+ }) | ({
349
+ key: string;
350
+ label: string;
351
+ description?: string;
352
+ required?: boolean;
353
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
354
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
355
+ heading?: string;
342
356
  } & {
343
357
  type: "surface";
344
358
  tone?: false;
@@ -390,6 +390,20 @@ export declare const PHI_MARKDOWN_WIDGET_DEFINITION: {
390
390
  editorPlacement?: "inspector" | "geometry" | "toolbar";
391
391
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
392
392
  heading?: string;
393
+ } & {
394
+ type: "condition-group";
395
+ conditionFields: import("../../../../../types").PhiCmsConfigField[];
396
+ defaultCondition: Record<string, unknown>;
397
+ addLabel?: string;
398
+ emptyLabel?: string;
399
+ }) | ({
400
+ key: string;
401
+ label: string;
402
+ description?: string;
403
+ required?: boolean;
404
+ editorPlacement?: "inspector" | "geometry" | "toolbar";
405
+ visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
406
+ heading?: string;
393
407
  } & {
394
408
  type: "surface";
395
409
  tone?: false;