@phis/ui 0.4.8 → 0.4.12

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 (221) hide show
  1. package/components/cms/phi-cms-area-access-guard.js +9 -1
  2. package/components/cms/phi-cms-area-render-scope.d.ts +8 -4
  3. package/components/cms/phi-cms-area-render-scope.js +26 -11
  4. package/components/cms/phi-cms-root-layout.js +4 -2
  5. package/components/cms/phi-cms-runtime-registry.d.ts +2 -1
  6. package/components/cms/phi-cms-runtime-registry.js +1 -1
  7. package/components/controls/phi-color-control.js +2 -1
  8. package/components/controls/phi-drawer-control-adapter.js +2 -3
  9. package/components/controls/phi-drawer-control.js +3 -3
  10. package/components/controls/phi-dropdown-control.js +2 -1
  11. package/components/controls/phi-float-button-control.js +3 -3
  12. package/components/controls/phi-modal-control-adapter.js +2 -2
  13. package/components/controls/phi-modal-control.js +3 -3
  14. package/components/controls/phi-ribbon-wrap-control.js +2 -1
  15. package/components/controls/phi-zoom-image-overlay.js +11 -5
  16. package/components/forms/auth-admin-settings-labels.d.ts +35 -0
  17. package/components/forms/auth-admin-settings-labels.js +27 -0
  18. package/components/forms/content-entry-forms.js +1 -5
  19. package/components/forms/form-descriptor-runtime-client.js +2 -1
  20. package/components/forms/form-descriptor-text.d.ts +17 -0
  21. package/components/forms/form-descriptor-text.js +14 -0
  22. package/components/forms/runtime-form-controller-plugin.d.ts +0 -115
  23. package/components/forms/runtime-form-controller-plugin.js +1 -1
  24. package/components/forms/upload-form-control.d.ts +0 -7
  25. package/components/forms/upload-form-control.js +1 -1
  26. package/components/layouts/clients/phi-collapsible-layout-client.js +2 -1
  27. package/components/layouts/clients/phi-flex-layout-client.js +7 -1
  28. package/components/layouts/clients/phi-sequence-slot-editor.js +2 -1
  29. package/components/layouts/clients/phi-split-card-half.js +2 -1
  30. package/components/layouts/phi-base-layout.js +2 -1
  31. package/components/layouts/phi-layout-surface-box.js +2 -1
  32. package/components/media/phi-media-picker-server.js +3 -11
  33. package/components/navigation/use-phi-protected-mail.js +1 -9
  34. package/components/regions/presets/clients/sider-context.js +4 -2
  35. package/components/root/phi-config-provider.js +2 -1
  36. package/components/root/phi-dayjs-locale.d.ts +4 -1
  37. package/components/root/phi-dayjs-locale.js +2 -2
  38. package/components/root/phi-intl-locale.d.ts +7 -1
  39. package/components/root/phi-intl-locale.js +20 -15
  40. package/components/root/phi-root-layout.js +2 -1
  41. package/components/runtime/core-runtime-controller-plugin.d.ts +0 -84
  42. package/components/runtime/core-runtime-controller-plugin.js +1 -1
  43. package/components/runtime/runtime-controller-server-host.js +20 -9
  44. package/components/runtime/runtime-signal-bus.js +39 -4
  45. package/components/shell/phi-antd-icon.d.ts +3 -0
  46. package/components/shell/phi-antd-icon.js +9 -0
  47. package/components/state/use-phi-hydrated.d.ts +6 -0
  48. package/components/state/use-phi-hydrated.js +11 -0
  49. package/components/tables/phi-plain-table.d.ts +4 -0
  50. package/components/tables/phi-plain-table.js +1 -1
  51. package/components/widgets/client/shared/phi-rendered-value.js +4 -3
  52. package/components/widgets/config/parser-primitives.d.ts +5 -0
  53. package/components/widgets/config/parser-primitives.js +11 -0
  54. package/components/widgets/label-sets/runtime-options.d.ts +1 -1
  55. package/components/widgets/server/builder-chrome.js +2 -6
  56. package/components/widgets/server/search.js +2 -6
  57. package/components/widgets/shared/markdown-body-client.d.ts +7 -0
  58. package/components/widgets/shared/markdown-body-client.js +2 -0
  59. package/components/widgets/shared/markdown-render.js +48 -1
  60. package/controls.d.ts +2 -0
  61. package/controls.js +3 -0
  62. package/gateway/dashboard-cards-route.js +5 -7
  63. package/gateway/navigation-target-route.js +7 -9
  64. package/gateway/page-references-route.js +6 -8
  65. package/gateway/site-config.js +3 -0
  66. package/gateway/site-proxy.js +13 -2
  67. package/helpers/class-names.d.ts +7 -0
  68. package/helpers/class-names.js +10 -0
  69. package/helpers/cms-navigation-catalog.js +4 -2
  70. package/helpers/cms-page-catalog.js +35 -6
  71. package/helpers/cms-region-keys.d.ts +0 -1
  72. package/helpers/cms-region-keys.js +1 -1
  73. package/helpers/format-date-time.d.ts +14 -3
  74. package/helpers/format-date-time.js +27 -11
  75. package/helpers/region-page-scope.d.ts +1 -3
  76. package/helpers/region-page-scope.js +0 -4
  77. package/helpers/translation-format.d.ts +6 -0
  78. package/helpers/translation-format.js +15 -8
  79. package/package.json +2 -2
  80. package/plugins/runtime/phi-slot-child-frame-view.js +2 -1
  81. package/plugins/runtime/phi-slot-child-viewport-effects-observer.js +1 -1
  82. package/plugins/runtime-modules/admin/forms.js +1 -1
  83. package/plugins/runtime-modules/admin/trees/phi-default-admin-settings-page-tree.js +2 -5
  84. package/plugins/runtime-modules/app/forms.js +1 -1
  85. package/plugins/runtime-modules/app/trees/phi-default-app-profile-page-tree.js +2 -6
  86. package/plugins/runtime-modules/asset/metadata-form.js +2 -6
  87. package/plugins/runtime-modules/asset/settings-forms.js +1 -1
  88. package/plugins/runtime-modules/asset/trees/phi-default-admin-media-settings-page-tree.js +2 -5
  89. package/plugins/runtime-modules/asset/trees/phi-default-builder-media-page-tree.js +2 -6
  90. package/plugins/runtime-modules/asset/widgets/area-upload/server.js +2 -6
  91. package/plugins/runtime-modules/asset/widgets/image-inspector/authoring.js +1 -3
  92. package/plugins/runtime-modules/asset/widgets/image-inspector/server.js +2 -6
  93. package/plugins/runtime-modules/asset/widgets.js +5 -7
  94. package/plugins/runtime-modules/auth/admin-settings-forms.js +1 -1
  95. package/plugins/runtime-modules/auth/data-providers.d.ts +5 -0
  96. package/plugins/runtime-modules/auth/data-providers.js +3 -0
  97. package/plugins/runtime-modules/auth/definition.d.ts +5 -0
  98. package/plugins/runtime-modules/auth/ids.d.ts +7 -7
  99. package/plugins/runtime-modules/auth/ids.js +7 -7
  100. package/plugins/runtime-modules/auth/services/installations-table.js +3 -1
  101. package/plugins/runtime-modules/auth/trees/phi-auth-area-overlay-tree.server.js +2 -6
  102. package/plugins/runtime-modules/auth/trees/phi-default-admin-auth-settings-page-tree.js +26 -14
  103. package/plugins/runtime-modules/auth/widgets/security/client.js +5 -1
  104. package/plugins/runtime-modules/auth/widgets.d.ts +1 -2
  105. package/plugins/runtime-modules/auth/widgets.js +5 -7
  106. package/plugins/runtime-modules/avatar/overlay-tree.server.js +2 -6
  107. package/plugins/runtime-modules/avatar/widgets/account-avatar/server.js +2 -6
  108. package/plugins/runtime-modules/avatar/widgets/account-avatar-picker/server.js +2 -6
  109. package/plugins/runtime-modules/avatar/widgets.js +3 -5
  110. package/plugins/runtime-modules/builder/clients/pages-workspace.d.ts +2 -3
  111. package/plugins/runtime-modules/builder/clients/pages-workspace.js +5 -18
  112. package/plugins/runtime-modules/builder/controller/draft-command-controller.js +1 -0
  113. package/plugins/runtime-modules/builder/controller/page-controller.js +1 -1
  114. package/plugins/runtime-modules/builder/controller/server-definition.js +3 -11
  115. package/plugins/runtime-modules/builder/controller/workspace-controller.js +2 -6
  116. package/plugins/runtime-modules/builder/developer-workspace-store.d.ts +2 -8
  117. package/plugins/runtime-modules/builder/developer-workspace-store.js +24 -44
  118. package/plugins/runtime-modules/builder/developer-workspace-types.d.ts +0 -5
  119. package/plugins/runtime-modules/builder/edit-scaffold-drawer.js +2 -1
  120. package/plugins/runtime-modules/builder/inspector-section-widget.js +6 -31
  121. package/plugins/runtime-modules/builder/navigation-persistence.js +12 -3
  122. package/plugins/runtime-modules/builder/page-meta-form.js +4 -12
  123. package/plugins/runtime-modules/builder/page-presets.server.d.ts +0 -1
  124. package/plugins/runtime-modules/builder/page-presets.server.js +0 -24
  125. package/plugins/runtime-modules/builder/pages-workspace.js +6 -16
  126. package/plugins/runtime-modules/builder/persistence.d.ts +6 -4
  127. package/plugins/runtime-modules/builder/persistence.js +6 -7
  128. package/plugins/runtime-modules/builder/render-root-node-scaffold.js +0 -1
  129. package/plugins/runtime-modules/builder/shells-workspace.js +3 -11
  130. package/plugins/runtime-modules/builder/signal-wiring-form.js +3 -7
  131. package/plugins/runtime-modules/builder/trees/phi-builder-inspector-area-overlay-tree.server.js +2 -6
  132. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +6 -26
  133. package/plugins/runtime-modules/builder/trees/phi-default-builder-settings-page-tree.js +2 -6
  134. package/plugins/runtime-modules/builder/widgets/developer-builder-pages-header/plugin.js +2 -6
  135. package/plugins/runtime-modules/builder/widgets/inspector-header/plugin.js +2 -6
  136. package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +3 -2
  137. package/plugins/runtime-modules/builder/widgets/structure-region/plugin.js +1 -6
  138. package/plugins/runtime-modules/builder/widgets.js +10 -12
  139. package/plugins/runtime-modules/client-authoring-module.js +18 -1
  140. package/plugins/runtime-modules/contracts.d.ts +15 -1
  141. package/plugins/runtime-modules/contracts.js +10 -0
  142. package/plugins/runtime-modules/core/messaging/forms.js +1 -1
  143. package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +1 -1
  144. package/plugins/runtime-modules/core/widgets/description/server.js +12 -9
  145. package/plugins/runtime-modules/core/widgets/dimension/plugin.js +2 -6
  146. package/plugins/runtime-modules/core/widgets/draft-status/plugin.js +2 -6
  147. package/plugins/runtime-modules/core/widgets/entry-list/config.js +2 -9
  148. package/plugins/runtime-modules/core/widgets/entry-list/view.server.js +1 -1
  149. package/plugins/runtime-modules/core/widgets/form-preview/client.js +2 -15
  150. package/plugins/runtime-modules/core/widgets/gallery/server.js +2 -6
  151. package/plugins/runtime-modules/core/widgets/image/server.js +2 -6
  152. package/plugins/runtime-modules/core/widgets/length/plugin.js +2 -6
  153. package/plugins/runtime-modules/core/widgets/markdown-toc/plugin.js +2 -6
  154. package/plugins/runtime-modules/core/widgets/page-title/server.js +2 -6
  155. package/plugins/runtime-modules/core/widgets/pagination/config.js +4 -8
  156. package/plugins/runtime-modules/core/widgets/result/config.d.ts +3 -0
  157. package/plugins/runtime-modules/core/widgets/result/config.js +15 -10
  158. package/plugins/runtime-modules/core/widgets/result/server.js +1 -1
  159. package/plugins/runtime-modules/core/widgets/search-results/config.js +2 -8
  160. package/plugins/runtime-modules/core/widgets/sidebar-navigation/server.d.ts +2 -2
  161. package/plugins/runtime-modules/core/widgets/sidebar-navigation/server.js +8 -13
  162. package/plugins/runtime-modules/core/widgets/table/client.js +1 -1
  163. package/plugins/runtime-modules/core/widgets/theme-mode-switch/server.js +2 -6
  164. package/plugins/runtime-modules/core/widgets/thread-conversation/client.js +16 -31
  165. package/plugins/runtime-modules/core/widgets/timeline/client.js +9 -4
  166. package/plugins/runtime-modules/core/widgets/tour-button/server.js +2 -6
  167. package/plugins/runtime-modules/core/widgets/tree/client.js +1 -1
  168. package/plugins/runtime-modules/core/widgets.js +59 -61
  169. package/plugins/runtime-modules/dashboard/clients/dashboard-card-view.js +7 -5
  170. package/plugins/runtime-modules/dashboard/trees/phi-default-admin-dashboard-page-tree.js +2 -6
  171. package/plugins/runtime-modules/dashboard/trees/phi-default-area-dashboard-page-tree.js +2 -6
  172. package/plugins/runtime-modules/dashboard/trees/phi-default-builder-dashboard-page-tree.js +2 -6
  173. package/plugins/runtime-modules/descriptor-compiler.js +6 -6
  174. package/plugins/runtime-modules/groups/controller/client.d.ts +0 -56
  175. package/plugins/runtime-modules/groups/controller/client.js +1 -1
  176. package/plugins/runtime-modules/groups/forms.js +1 -5
  177. package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +2 -6
  178. package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +2 -6
  179. package/plugins/runtime-modules/localization/forms.js +2 -6
  180. package/plugins/runtime-modules/localization/services/options.js +19 -9
  181. package/plugins/runtime-modules/localization/trees/phi-default-admin-locales-page-tree.js +3 -11
  182. package/plugins/runtime-modules/localization/trees/phi-default-editor-translations-page-tree.js +3 -11
  183. package/plugins/runtime-modules/observability/trees/phi-default-admin-logs-page-tree.js +3 -11
  184. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +4 -109
  185. package/plugins/runtime-modules/preset-contracts/pub-area.d.ts +2 -2
  186. package/plugins/runtime-modules/preset-contracts/pub-area.js +0 -4
  187. package/plugins/runtime-modules/pub-area-preset.js +0 -20
  188. package/plugins/runtime-modules/public/trees/phi-default-pub-error-page-tree.js +5 -5
  189. package/plugins/runtime-modules/revisions/forms.js +1 -1
  190. package/plugins/runtime-modules/revisions/services/table.js +6 -2
  191. package/plugins/runtime-modules/revisions/trees/phi-default-builder-revisions-page-tree.js +2 -2
  192. package/plugins/runtime-modules/theme/controller/server-definition.js +2 -6
  193. package/plugins/runtime-modules/theme/trees/phi-default-builder-theme-page-tree.js +2 -6
  194. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +17 -21
  195. package/plugins/runtime-modules/theme/widgets/brand-controls/config.d.ts +0 -2
  196. package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +0 -8
  197. package/plugins/runtime-modules/theme/widgets.js +6 -8
  198. package/plugins/runtime-modules/threads/controller/client.d.ts +0 -78
  199. package/plugins/runtime-modules/threads/controller/client.js +1 -1
  200. package/plugins/runtime-modules/threads/forms.js +1 -1
  201. package/plugins/runtime-modules/threads/ids.d.ts +0 -1
  202. package/plugins/runtime-modules/threads/ids.js +0 -2
  203. package/plugins/runtime-modules/threads/trees/phi-default-threads-page-tree.js +8 -6
  204. package/plugins/runtime-modules/user-management/controller/client.d.ts +0 -73
  205. package/plugins/runtime-modules/user-management/controller/client.js +1 -1
  206. package/plugins/runtime-modules/user-management/forms.js +1 -5
  207. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +3 -7
  208. package/plugins/runtime-modules/video/widgets.js +2 -4
  209. package/server-helpers/cms-request.d.ts +19 -0
  210. package/server-helpers/cms-request.js +26 -8
  211. package/server-helpers/cms-root.js +27 -21
  212. package/server-helpers/public-login-route.js +6 -8
  213. package/server-helpers/runtime.js +1 -1
  214. package/server-helpers/search-index.js +34 -14
  215. package/styles/controls.css +11 -0
  216. package/styles/shell.css +11 -1
  217. package/types/length.js +8 -3
  218. package/types/site-config.d.ts +6 -4
  219. package/types/widget-runtime.d.ts +2 -3
  220. package/types.d.ts +5 -3
  221. package/types.js +3 -0
@@ -1,57 +1 @@
1
- import { type PhiGroupsControllerConfig } from "../controller/definition";
2
- export declare const PHI_GROUPS_RUNTIME_CONTROLLER_PLUGIN: {
3
- renderController: ({ key, address, config }: import("../../../../types").PhiRuntimeControllerRenderArgs<PhiGroupsControllerConfig, unknown>) => import("react").JSX.Element;
4
- kind: "controller";
5
- pluginKey: string;
6
- key: string;
7
- title: string;
8
- description: string;
9
- iconFamily: string;
10
- allowedMountScopes: "page"[];
11
- runtimeSignals: {
12
- emits: ({
13
- id: string;
14
- action: "change";
15
- valueType: "json";
16
- valueSchema: `${string}/signals/${string}`;
17
- } | {
18
- id: string;
19
- action: "activate";
20
- valueType: "none";
21
- valueSchema?: undefined;
22
- } | {
23
- id: string;
24
- action: "close";
25
- valueType: "none";
26
- valueSchema?: undefined;
27
- })[];
28
- listens: ({
29
- id: string;
30
- channel: string;
31
- action: "change";
32
- valueType: "json";
33
- valueSchema: `${string}/signals/${string}`;
34
- } | {
35
- id: string;
36
- channel: string;
37
- action: "reload";
38
- valueType: "none";
39
- valueSchema?: undefined;
40
- } | {
41
- id: string;
42
- channel: string;
43
- action: "activate";
44
- valueType: "json";
45
- valueSchema: `${string}/signals/${string}`;
46
- } | {
47
- id: string;
48
- channel: string;
49
- action: "activate";
50
- valueType: "string";
51
- valueSchema?: undefined;
52
- })[];
53
- };
54
- defaultConfig: {};
55
- parseConfig: (raw: Record<string, unknown>) => PhiGroupsControllerConfig;
56
- };
57
1
  export declare const PhiGroupsRuntimeControllerClient: (props: import("../../contracts").PhiRuntimeModuleControllerClientProps) => import("react").JSX.Element;
@@ -90,7 +90,7 @@ function PhiGroupsControllerView({ address, config, }) {
90
90
  });
91
91
  return null;
92
92
  }
93
- export const PHI_GROUPS_RUNTIME_CONTROLLER_PLUGIN = {
93
+ const PHI_GROUPS_RUNTIME_CONTROLLER_PLUGIN = {
94
94
  ...PHI_GROUPS_RUNTIME_CONTROLLER_DEFINITION,
95
95
  renderController: ({ key, address, config }) => _jsx(PhiGroupsControllerView, { address: address, config: config }, key),
96
96
  };
@@ -6,6 +6,7 @@ import { PHI_FORM_FIELD_PROVIDER_KEYS, PHI_FORM_VALIDATION_PROVIDER_KEYS, create
6
6
  import { definePhiRuntimeModuleForm } from "../../../components/forms/form-registry";
7
7
  import { PHI_GROUPS_RUNTIME_DATA_PROVIDER_KEYS } from "./ids";
8
8
  import { PhiGroupMembershipFlags } from "../../../constants/site-groups";
9
+ import { phiFormLabel as label, phiFormRequired as required } from "../../../components/forms/form-descriptor-text";
9
10
  export const PHI_GROUPS_FORM_IDS = {
10
11
  create: createPhiFormId(PHI_SHARED_PACKAGE_NAME, "groups/create"),
11
12
  membership: createPhiFormId(PHI_SHARED_PACKAGE_NAME, "groups/membership"),
@@ -17,11 +18,6 @@ const PHI_GROUPS_FORM_HANDLER_KEYS = {
17
18
  myMembership: "site.groups.my-membership",
18
19
  };
19
20
  const LABEL_SET_KEY = "@phis/ui/modules/groups/labels/forms";
20
- const label = (key, fallback) => ({ kind: "label", key, fallback });
21
- const required = (key, fallback) => [{
22
- providerKey: PHI_FORM_VALIDATION_PROVIDER_KEYS.required,
23
- message: label(key, fallback),
24
- }];
25
21
  /**
26
22
  * Creating a group is Site administration, not group membership: a group is an authorization unit that
27
23
  * Pages, Navigation, and Assets refer to. The Core route this relays to enforces that -- the form only
@@ -9,7 +9,7 @@ import { PHI_GROUPS_PAGE_LAYOUT_IDS, PHI_GROUPS_PAGE_OVERLAY_IDS, PHI_GROUPS_PAG
9
9
  import { buildPhiBasePageContentScaffold, PHI_BASE_PAGE_LAYOUT_NODE_ID } from "../../../../components/regions/presets/phi-base-page-layout";
10
10
  import { getPhiGroupFormLabels } from "../labels";
11
11
  import { PHI_GROUPS_FORM_IDS } from "../forms";
12
- import { readPhiServerApiCredentials } from "../../../../helpers/phis-server-credentials";
12
+ import { buildPhiWidgetLabelTranslatorOptions } from "../../../../components/widgets/label-sets/runtime-options";
13
13
  const SYNTHETIC_ADMIN_GROUPS_REGION_IDS = {
14
14
  regionContent: -451,
15
15
  };
@@ -25,11 +25,7 @@ const SYNTHETIC_ADMIN_GROUPS_REGION_IDS = {
25
25
  * lists and closes the dialog.
26
26
  */
27
27
  export async function buildPhiDefaultAdminGroupsPageTree({ page, runtime, }) {
28
- const labels = await getPhiGroupFormLabels({
29
- apiBaseUrl: readPhiServerApiCredentials().apiBaseUrl,
30
- internalToken: readPhiServerApiCredentials().internalToken,
31
- locale: runtime.locale.current,
32
- });
28
+ const labels = await getPhiGroupFormLabels(buildPhiWidgetLabelTranslatorOptions(runtime));
33
29
  const controllerAddress = createPhiGroupsControllerAddress();
34
30
  const membersTableAddress = createPhiSignalAddress("cms", PHI_GROUPS_PAGE_WIDGET_IDS.widgetMembersTable);
35
31
  const createFormAddress = createPhiSignalAddress("cms", PHI_GROUPS_PAGE_WIDGET_IDS.widgetCreateForm);
@@ -11,7 +11,7 @@ import { getPhiGroupFormLabels } from "../labels";
11
11
  import { canPhiViewerManageSomeGroup } from "../page-visibility";
12
12
  import { canPhiViewerAccess, PHI_VIEWER_ACCESS_DEVELOPER_TOOLS } from "../../../../types/access";
13
13
  import { PHI_GROUPS_FORM_IDS } from "../forms";
14
- import { readPhiServerApiCredentials } from "../../../../helpers/phis-server-credentials";
14
+ import { buildPhiWidgetLabelTranslatorOptions } from "../../../../components/widgets/label-sets/runtime-options";
15
15
  const SYNTHETIC_APP_GROUPS_REGION_IDS = {
16
16
  regionContent: -452,
17
17
  };
@@ -24,11 +24,7 @@ const SYNTHETIC_APP_GROUPS_REGION_IDS = {
24
24
  * possible later. Managing a group happens in Site administration.
25
25
  */
26
26
  export async function buildPhiDefaultAppGroupsPageTree({ page, runtime, }) {
27
- const labels = await getPhiGroupFormLabels({
28
- apiBaseUrl: readPhiServerApiCredentials().apiBaseUrl,
29
- internalToken: readPhiServerApiCredentials().internalToken,
30
- locale: runtime.locale.current,
31
- });
27
+ const labels = await getPhiGroupFormLabels(buildPhiWidgetLabelTranslatorOptions(runtime));
32
28
  const controllerAddress = createPhiGroupsControllerAddress();
33
29
  const myGroupsTableAddress = createPhiSignalAddress("cms", PHI_APP_GROUPS_PAGE_WIDGET_IDS.widgetMyGroupsTable);
34
30
  const membersTableAddress = createPhiSignalAddress("cms", PHI_APP_GROUPS_PAGE_WIDGET_IDS.widgetMembersTable);
@@ -1,10 +1,11 @@
1
1
  import { createPhiFormLabelSetLoader } from "../../../components/forms/shared-form-loaders";
2
2
  import { definePhiRuntimeModuleForm } from "../../../components/forms/form-registry";
3
- import { PHI_FORM_FIELD_PROVIDER_KEYS, PHI_FORM_VALIDATION_PROVIDER_KEYS, createPhiSharedFormProviderKey, } from "../../../components/forms/form-provider-contract";
3
+ import { PHI_FORM_FIELD_PROVIDER_KEYS, createPhiSharedFormProviderKey, } from "../../../components/forms/form-provider-contract";
4
4
  import { createPhiFormId } from "../../../types/form-id";
5
5
  import { PHI_LOCALIZATION_RUNTIME_MODULE_ID } from "../../../plugins/runtime-modules/localization/ids";
6
6
  import { PHI_SHARED_PACKAGE_NAME } from "../../../types/signals";
7
7
  import { PHI_LOCALIZATION_RUNTIME_DATA_PROVIDER_KEYS } from "./ids";
8
+ import { phiFormLabel as label, phiFormRequired as required } from "../../../components/forms/form-descriptor-text";
8
9
  export const PHI_LOCALIZATION_FORM_IDS = {
9
10
  siteLocales: createPhiFormId(PHI_SHARED_PACKAGE_NAME, "localization/site-locales"),
10
11
  editorTranslation: createPhiFormId(PHI_SHARED_PACKAGE_NAME, "localization/editor-translation"),
@@ -23,11 +24,6 @@ const PHI_LOCALIZATION_FORM_HANDLER_LEAVES = {
23
24
  editorTranslation: "editor-translation",
24
25
  };
25
26
  const LABEL_SET_KEY = "@phis/ui/modules/localization/labels/forms";
26
- const label = (key, fallback) => ({ kind: "label", key, fallback });
27
- const required = (key, fallback) => [{
28
- providerKey: PHI_FORM_VALIDATION_PROVIDER_KEYS.required,
29
- message: label(key, fallback),
30
- }];
31
27
  const translationFields = [
32
28
  { key: "action", fieldProviderKey: PHI_FORM_FIELD_PROVIDER_KEYS.hidden, initialValue: "translation" },
33
29
  { key: "msgId", fieldProviderKey: PHI_FORM_FIELD_PROVIDER_KEYS.hidden },
@@ -54,16 +54,26 @@ function readContextOptions(value) {
54
54
  value: "all",
55
55
  };
56
56
  }
57
- async function loadPlatformLocales() {
58
- const response = await fetch("/api/site/admin/locales?page=1&pageSize=1", {
59
- cache: "no-store",
60
- credentials: "include",
61
- headers: { accept: "application/json" },
57
+ /**
58
+ * One request for the two providers below. Each provider deduplicates its own loads, not another's, and
59
+ * both read this endpoint when a page with both controls builds; the one in flight answers both.
60
+ */
61
+ let platformLocalesInFlight = null;
62
+ function loadPlatformLocales() {
63
+ platformLocalesInFlight ??= (async () => {
64
+ const response = await fetch("/api/site/admin/locales?page=1&pageSize=1", {
65
+ cache: "no-store",
66
+ credentials: "include",
67
+ headers: { accept: "application/json" },
68
+ });
69
+ const payload = await response.json().catch(() => null);
70
+ if (!response.ok)
71
+ throw new Error("Failed to load available locales.");
72
+ return payload;
73
+ })().finally(() => {
74
+ platformLocalesInFlight = null;
62
75
  });
63
- const payload = await response.json().catch(() => null);
64
- if (!response.ok)
65
- throw new Error("Failed to load available locales.");
66
- return payload;
76
+ return platformLocalesInFlight;
67
77
  }
68
78
  function resolveAdminSiteLocales(context) {
69
79
  return readSiteLocaleOptions(context.asyncData, "targetLocales");
@@ -10,7 +10,7 @@ import { getPhiAdminLocalesWidgetLabels } from "../../../../components/widgets/l
10
10
  import { PHI_SPACE } from "../../../../theme/antd-css-var-contract";
11
11
  import { PHI_LOCALIZATION_RUNTIME_DATA_PROVIDER_KEYS } from "../ids";
12
12
  import { PHI_LOCALIZATION_FORM_IDS } from "../forms";
13
- import { readPhiServerApiCredentials } from "../../../../helpers/phis-server-credentials";
13
+ import { buildPhiWidgetLabelTranslatorOptions } from "../../../../components/widgets/label-sets/runtime-options";
14
14
  const SYNTHETIC_ADMIN_LOCALES_REGION_IDS = {
15
15
  regionContent: -461,
16
16
  };
@@ -30,16 +30,8 @@ export const SYNTHETIC_ADMIN_LOCALES_WIDGET_IDS = createPhiPresetCmsInstanceIdMa
30
30
  "widgetSiteLocalesForm",
31
31
  ]);
32
32
  export async function buildPhiDefaultAdminLocalesPageTree({ page, runtime, }) {
33
- const labels = await getPhiAdminLocalesPageLabels({
34
- apiBaseUrl: readPhiServerApiCredentials().apiBaseUrl,
35
- internalToken: readPhiServerApiCredentials().internalToken,
36
- locale: runtime.locale.current,
37
- });
38
- const widgetLabels = await getPhiAdminLocalesWidgetLabels({
39
- apiBaseUrl: readPhiServerApiCredentials().apiBaseUrl,
40
- internalToken: readPhiServerApiCredentials().internalToken,
41
- locale: runtime.locale.current,
42
- });
33
+ const translator = buildPhiWidgetLabelTranslatorOptions(runtime);
34
+ const [labels, widgetLabels] = await Promise.all([getPhiAdminLocalesPageLabels(translator), getPhiAdminLocalesWidgetLabels(translator)]);
43
35
  const scaffold = buildPhiBasePageContentScaffold({
44
36
  page,
45
37
  regionId: SYNTHETIC_ADMIN_LOCALES_REGION_IDS.regionContent,
@@ -10,20 +10,12 @@ import { PHI_LOCALIZATION_RUNTIME_DATA_PROVIDER_KEYS } from "../ids";
10
10
  import { PHI_LOCALIZATION_FORM_IDS } from "../forms";
11
11
  import { PHI_SIGNAL_VALUE_SCHEMAS } from "../../../../types/signals";
12
12
  import { PHI_LOCALIZATION_CONTROLLER_INSTANCE_KEY, PHI_LOCALIZATION_CONTROLLER_TYPE, createPhiLocalizationControllerAddress, } from "../controller/address";
13
- import { readPhiServerApiCredentials } from "../../../../helpers/phis-server-credentials";
14
13
  import { PHI_DIALOG_BODY_CONFIG, PHI_DIALOG_COMMANDS_CONFIG } from "../../../../helpers/cms-dialog";
14
+ import { buildPhiWidgetLabelTranslatorOptions } from "../../../../components/widgets/label-sets/runtime-options";
15
15
  const SYNTHETIC_EDITOR_TRANSLATIONS_REGION_IDS = { regionContent: -561 };
16
16
  export async function buildPhiDefaultEditorTranslationsPageTree({ page, runtime, }) {
17
- const labels = await getPhiEditorTranslationsPageLabels({
18
- apiBaseUrl: readPhiServerApiCredentials().apiBaseUrl,
19
- internalToken: readPhiServerApiCredentials().internalToken,
20
- locale: runtime.locale.current,
21
- });
22
- const widgetLabels = await getPhiEditorTranslationsWidgetLabels({
23
- apiBaseUrl: readPhiServerApiCredentials().apiBaseUrl,
24
- internalToken: readPhiServerApiCredentials().internalToken,
25
- locale: runtime.locale.current,
26
- });
17
+ const translator = buildPhiWidgetLabelTranslatorOptions(runtime);
18
+ const [labels, widgetLabels] = await Promise.all([getPhiEditorTranslationsPageLabels(translator), getPhiEditorTranslationsWidgetLabels(translator)]);
27
19
  const scaffold = buildPhiBasePageContentScaffold({
28
20
  page,
29
21
  regionId: SYNTHETIC_EDITOR_TRANSLATIONS_REGION_IDS.regionContent,
@@ -8,8 +8,8 @@ import { getPhiAdminLogsPageLabels } from "./admin-logs-label-set";
8
8
  import { getPhiObservabilityLogsWidgetLabels } from "../../../../components/widgets/label-sets/observability-logs";
9
9
  import { PHI_OBSERVABILITY_RUNTIME_DATA_PROVIDER_KEYS } from "../ids";
10
10
  import { createPhiSignalAddress, PHI_SIGNAL_VALUE_SCHEMAS } from "../../../../types/signals";
11
- import { readPhiServerApiCredentials } from "../../../../helpers/phis-server-credentials";
12
11
  import { PHI_DIALOG_BODY_CONFIG } from "../../../../helpers/cms-dialog";
12
+ import { buildPhiWidgetLabelTranslatorOptions } from "../../../../components/widgets/label-sets/runtime-options";
13
13
  const SYNTHETIC_ADMIN_LOGS_REGION_IDS = {
14
14
  regionContent: -441,
15
15
  };
@@ -36,16 +36,8 @@ const SYNTHETIC_ADMIN_LOGS_WIDGET_IDS = createPhiPresetCmsInstanceIdMap({
36
36
  "widgetDetail",
37
37
  ]);
38
38
  export async function buildPhiDefaultAdminLogsPageTree({ page, runtime, }) {
39
- const labels = await getPhiAdminLogsPageLabels({
40
- apiBaseUrl: readPhiServerApiCredentials().apiBaseUrl,
41
- internalToken: readPhiServerApiCredentials().internalToken,
42
- locale: runtime.locale.current,
43
- });
44
- const widgetLabels = await getPhiObservabilityLogsWidgetLabels({
45
- apiBaseUrl: readPhiServerApiCredentials().apiBaseUrl,
46
- internalToken: readPhiServerApiCredentials().internalToken,
47
- locale: runtime.locale.current,
48
- });
39
+ const translator = buildPhiWidgetLabelTranslatorOptions(runtime);
40
+ const [labels, widgetLabels] = await Promise.all([getPhiAdminLogsPageLabels(translator), getPhiObservabilityLogsWidgetLabels(translator)]);
49
41
  const scaffold = buildPhiBasePageContentScaffold({
50
42
  page,
51
43
  regionId: SYNTHETIC_ADMIN_LOGS_REGION_IDS.regionContent,
@@ -15,7 +15,6 @@ import { PHI_DEFAULT_PUB_AREA_PRESET } from "./pub-area-preset";
15
15
  import { createPhiDefaultAreaRuntimeModuleIds } from "./area-module-defaults";
16
16
  import { PHI_DEFAULT_PUB_AREA_LAYOUT_NODE_KEYS, PHI_DEFAULT_PUB_AREA_WIDGET_NODE_KEYS, } from "./preset-contracts/pub-area";
17
17
  const SYNTHETIC_REGION_IDS = {
18
- regionHeaderTop: -1,
19
18
  regionHeaderMain: -2,
20
19
  regionFooterTop: -27,
21
20
  regionFooterMain: -28,
@@ -33,7 +32,6 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
33
32
  presetKey,
34
33
  }, PHI_DEFAULT_PUB_AREA_WIDGET_NODE_KEYS);
35
34
  const headerMainRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "header_main");
36
- const headerTopRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "header_top");
37
35
  const footerMainRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "footer_main");
38
36
  const footerTopRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "footer_top");
39
37
  const footerBottomRegion = PHI_DEFAULT_PUB_AREA_PRESET.regions.find((region) => region.key === "footer_bottom");
@@ -41,7 +39,8 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
41
39
  /*
42
40
  * The Preset's words stay in the source language and say they are the Preset's; the Widgets translate
43
41
  * them through the global store (`helpers/text-source.ts`). The contact label is the Preset's only
44
- * while the Site's theme names none.
42
+ * while the Site's theme names none. It stands in the Footer; the Header has no strip above its main
43
+ * band, which a Site adds in the Builder when it wants one.
45
44
  */
46
45
  const contactLabelIsPreset = !runtime.site.theme?.contact?.label?.trim();
47
46
  /*
@@ -53,11 +52,6 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
53
52
  * `helpers/text-placeholders.ts` has the names it may use.
54
53
  */
55
54
  const footerBottomText = "© {year} {site.name}. All rights reserved.";
56
- const shellHeaderTopHeight = resolvePhiShellHeaderHeight(runtime.site.theme?.shell, "top");
57
- const shellHeaderTopOffsetTop = resolvePhiShellMetric(runtime.site.theme?.shell, "offsetTop", {
58
- family: "header",
59
- region: "top",
60
- });
61
55
  const shellHeaderMainHeight = resolvePhiShellHeaderHeight(runtime.site.theme?.shell, "main");
62
56
  const shellHeaderMainOffsetTop = resolvePhiShellMetric(runtime.site.theme?.shell, "offsetTop", {
63
57
  family: "header",
@@ -81,24 +75,6 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
81
75
  runtimeModuleIds: createPhiDefaultAreaRuntimeModuleIds(runtimeModuleArea),
82
76
  overlays: [],
83
77
  regions: [
84
- ...(headerTopRegion
85
- ? [
86
- nodes.region({
87
- id: SYNTHETIC_REGION_IDS.regionHeaderTop,
88
- regionType: PhiCmsRegionType.HeaderTop,
89
- rootLayoutNodeId: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutHeaderTop,
90
- status: headerTopRegion.status,
91
- flags: headerTopRegion.flags,
92
- visibilityMask: headerTopRegion.visibilityMask,
93
- sortOrder: headerTopRegion.sortOrder,
94
- config: {
95
- ...headerTopRegion.config,
96
- size: { ...(headerTopRegion.config.size ?? {}), height: `${shellHeaderTopHeight}px` },
97
- ...(typeof shellHeaderTopOffsetTop === "number" ? { offsetTop: shellHeaderTopOffsetTop } : {}),
98
- },
99
- }),
100
- ]
101
- : []),
102
78
  ...(headerMainRegion
103
79
  ? [
104
80
  nodes.region({
@@ -176,26 +152,6 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
176
152
  : []),
177
153
  ],
178
154
  layoutNodes: [
179
- ...(headerTopRegion
180
- ? [
181
- {
182
- id: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutHeaderTop,
183
- siteId: page.siteId,
184
- parentLayoutNodeId: null,
185
- widgetType: buildPhiCmsLayoutNamespacedTypeKey(resolvePhiCmsLayoutPluginKey("three-column"), "three-column"),
186
- slotIndex: PHI_CMS_DEFAULT_SLOT_INDEX,
187
- sortOrder: -10,
188
- status: 1,
189
- flags: 0,
190
- visibilityMask: page.visibilityMask,
191
- label: "pub header top three column",
192
- config: {
193
- ...resolvePhiLayoutCreationPreset("threecol", "panel"),
194
- balancedSides: true,
195
- },
196
- },
197
- ]
198
- : []),
199
155
  {
200
156
  id: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutHeaderMain,
201
157
  siteId: page.siteId,
@@ -323,69 +279,6 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
323
279
  : []),
324
280
  ],
325
281
  contentWidgets: [
326
- ...(headerTopRegion
327
- ? [
328
- /*
329
- * The Brand's own two lines, drawn by the Brand Widget rather than copied into a Text one.
330
- *
331
- * They say what the Site says about itself, so they are read from the Theme record when the
332
- * page renders and are set where the rest of the Brand is set, in the Theme workspace. A
333
- * Site that has stated neither shows neither: the strip keeps its shape, and an invented
334
- * slogan in everybody's header was never this Preset's to write.
335
- */
336
- {
337
- id: PHI_DEFAULT_PUB_AREA_WIDGET_IDS.widgetHeaderTopLeft,
338
- siteId: page.siteId,
339
- parentLayoutNodeId: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutHeaderTop,
340
- widgetType: buildPhiCmsWidgetNamespacedTypeKey(resolvePhiCmsWidgetPluginKey("brand"), "brand"),
341
- slotIndex: PHI_CMS_THREE_COLUMN_LAYOUT_SLOT_INDEX.Left,
342
- sortOrder: 0,
343
- status: 1,
344
- flags: PhiCmsFlags.NoTranslate,
345
- visibilityMask: page.visibilityMask,
346
- label: "pub header top left",
347
- config: {
348
- mode: "slogan",
349
- },
350
- contentVersionId: null,
351
- },
352
- {
353
- id: PHI_DEFAULT_PUB_AREA_WIDGET_IDS.widgetHeaderTopMiddle,
354
- siteId: page.siteId,
355
- parentLayoutNodeId: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutHeaderTop,
356
- widgetType: buildPhiCmsWidgetNamespacedTypeKey(resolvePhiCmsWidgetPluginKey("brand"), "brand"),
357
- slotIndex: PHI_CMS_THREE_COLUMN_LAYOUT_SLOT_INDEX.Middle,
358
- sortOrder: 10,
359
- status: 1,
360
- flags: PhiCmsFlags.NoTranslate,
361
- visibilityMask: page.visibilityMask,
362
- label: "pub header top middle",
363
- config: {
364
- mode: "location",
365
- },
366
- contentVersionId: null,
367
- },
368
- {
369
- id: PHI_DEFAULT_PUB_AREA_WIDGET_IDS.widgetHeaderTopRight,
370
- siteId: page.siteId,
371
- parentLayoutNodeId: PHI_DEFAULT_PUB_AREA_LAYOUT_IDS.layoutHeaderTop,
372
- widgetType: buildPhiCmsWidgetNamespacedTypeKey(resolvePhiCmsWidgetPluginKey("simple-text"), "simple-text"),
373
- slotIndex: PHI_CMS_THREE_COLUMN_LAYOUT_SLOT_INDEX.Right,
374
- sortOrder: 20,
375
- status: 1,
376
- flags: 0,
377
- visibilityMask: page.visibilityMask,
378
- label: "pub header top right",
379
- config: {
380
- text: contactLabel,
381
- ...(contactLabelIsPreset ? { textSource: PHI_TEXT_SOURCE_PRESET } : {}),
382
- href: contactHref,
383
- icon: contactIcon,
384
- },
385
- contentVersionId: null,
386
- },
387
- ]
388
- : []),
389
282
  {
390
283
  id: PHI_DEFAULT_PUB_AREA_WIDGET_IDS.widgetBrand,
391
284
  siteId: page.siteId,
@@ -412,8 +305,10 @@ export async function buildPhiDefaultSiteAreaPresetTree({ page, runtime, presetK
412
305
  flags: 0,
413
306
  visibilityMask: page.visibilityMask,
414
307
  label: "pub header main navigation",
308
+ /* The current entry on a rounded ground rather than a bar under it, in either mode. */
415
309
  config: {
416
310
  navKey: `${runtimeModuleArea}:header`,
311
+ selectionStyle: "pill",
417
312
  },
418
313
  contentVersionId: null,
419
314
  },
@@ -1,4 +1,4 @@
1
1
  export declare const PHI_DEFAULT_PUB_AREA_PRESET_KEY = "public-area-preset";
2
- export declare const PHI_DEFAULT_PUB_AREA_LAYOUT_NODE_KEYS: readonly ["layoutHeaderTop", "layoutHeaderMain", "layoutHeaderActions", "layoutHeaderBottom", "layoutSiderRight", "layoutFooterTop", "layoutFooterMain", "layoutFooterBottom"];
3
- export declare const PHI_DEFAULT_PUB_AREA_WIDGET_NODE_KEYS: readonly ["widgetHeaderTopLeft", "widgetHeaderTopMiddle", "widgetHeaderTopRight", "widgetBrand", "widgetNav", "widgetLocale", "widgetAccount", "widgetSiderRightNav", "widgetFooterLeft", "widgetFooterMiddle", "widgetFooterRight", "widgetFooterBottomText"];
2
+ export declare const PHI_DEFAULT_PUB_AREA_LAYOUT_NODE_KEYS: readonly ["layoutHeaderMain", "layoutHeaderActions", "layoutHeaderBottom", "layoutSiderRight", "layoutFooterTop", "layoutFooterMain", "layoutFooterBottom"];
3
+ export declare const PHI_DEFAULT_PUB_AREA_WIDGET_NODE_KEYS: readonly ["widgetBrand", "widgetNav", "widgetLocale", "widgetAccount", "widgetSiderRightNav", "widgetFooterLeft", "widgetFooterMiddle", "widgetFooterRight", "widgetFooterBottomText"];
4
4
  export declare const PHI_DEFAULT_PUB_AREA_COMPOSITION_NODE_KEYS: readonly ["widgetBrand", "widgetNav", "widgetLocale"];
@@ -1,6 +1,5 @@
1
1
  export const PHI_DEFAULT_PUB_AREA_PRESET_KEY = "public-area-preset";
2
2
  export const PHI_DEFAULT_PUB_AREA_LAYOUT_NODE_KEYS = [
3
- "layoutHeaderTop",
4
3
  "layoutHeaderMain",
5
4
  "layoutHeaderActions",
6
5
  "layoutHeaderBottom",
@@ -10,9 +9,6 @@ export const PHI_DEFAULT_PUB_AREA_LAYOUT_NODE_KEYS = [
10
9
  "layoutFooterBottom",
11
10
  ];
12
11
  export const PHI_DEFAULT_PUB_AREA_WIDGET_NODE_KEYS = [
13
- "widgetHeaderTopLeft",
14
- "widgetHeaderTopMiddle",
15
- "widgetHeaderTopRight",
16
12
  "widgetBrand",
17
13
  "widgetNav",
18
14
  "widgetLocale",
@@ -1,25 +1,6 @@
1
1
  import { PhiCmsFlags } from "../../constants/phi-cms";
2
2
  import { PHI_PADDING } from "../../theme/phi-tokens";
3
3
  import { createPhiDefaultAreaRuntimeModuleIds } from "./area-module-defaults";
4
- const PUB_HEADER_TOP_REGION = {
5
- key: "header_top",
6
- status: 1,
7
- flags: 0,
8
- visibilityMask: 0,
9
- sortOrder: -10,
10
- config: {
11
- offsetTop: 0,
12
- /*
13
- * The strip of Brand lines stands on the Area's own `/` alone. A rule the Region carries, so it is
14
- * still the rule after an author has saved the Area and the code no longer answers.
15
- */
16
- pageScope: { mode: "root" },
17
- },
18
- rootLayoutNodeId: null,
19
- rootLayoutNode: null,
20
- source: "fallback",
21
- allowedPageSlotInjections: [],
22
- };
23
4
  const PUB_HEADER_MAIN_REGION = {
24
5
  key: "header_main",
25
6
  status: 1,
@@ -125,7 +106,6 @@ export const PHI_DEFAULT_PUB_AREA_PRESET = {
125
106
  runtimeModules: createPhiDefaultAreaRuntimeModuleIds("public"),
126
107
  },
127
108
  regions: [
128
- PUB_HEADER_TOP_REGION,
129
109
  PUB_HEADER_MAIN_REGION,
130
110
  PUB_CONTENT_REGION,
131
111
  PUB_FOOTER_TOP_REGION,
@@ -96,12 +96,12 @@ export async function buildPhiDefaultPubErrorPageTree({ code, page, }) {
96
96
  title: copy.title,
97
97
  subTitle: copy.subTitle,
98
98
  /*
99
- * Only the 404 offers the way out, and only because only the 404 has one.
100
- *
101
- * The link goes to the root of the Area the refusal happened in. For a missing page that is
102
- * somewhere the visitor may go; for 401 and 403 it is the same door that just refused them.
99
+ * Every error page offers a way out: it draws no Shell, so there is nothing else to press. A
100
+ * missing page goes to the root of its own Area, which the visitor may open. A refusal goes to
101
+ * the Site's public home instead -- the Area's root is the same door that just refused them.
103
102
  */
104
- homeLink: code === 404,
103
+ homeLink: true,
104
+ homeLinkTarget: code === 404 ? "area" : "site",
105
105
  },
106
106
  }),
107
107
  ],
@@ -4,11 +4,11 @@ import { PHI_SHARED_PACKAGE_NAME } from "../../../types/signals";
4
4
  import { PHI_FORM_FIELD_PROVIDER_KEYS, PHI_FORM_VALIDATION_PROVIDER_KEYS, } from "../../../components/forms/form-provider-contract";
5
5
  import { definePhiRuntimeModuleForm } from "../../../components/forms/form-registry";
6
6
  import { PHI_REVISIONS_RUNTIME_MODULE_ID } from "./ids";
7
+ import { phiFormLabel as label } from "../../../components/forms/form-descriptor-text";
7
8
  export const PHI_REVISIONS_FORM_IDS = {
8
9
  deleteArea: createPhiFormId(PHI_SHARED_PACKAGE_NAME, "revisions/delete-area"),
9
10
  };
10
11
  const LABEL_SET_KEY = "@phis/ui/modules/revisions/labels/forms";
11
- const label = (key, fallback) => ({ kind: "label", key, fallback });
12
12
  /**
13
13
  * The typed confirmation for deleting an Area's own shell.
14
14
  *
@@ -41,10 +41,12 @@ function readRevisionScope(value) {
41
41
  };
42
42
  }
43
43
  function readParams(value) {
44
- if (!isPhiRecord(value) || !isPhiRecord(value.labels) || typeof value.locale !== "string") {
44
+ if (!isPhiRecord(value) || !isPhiRecord(value.labels) || typeof value.locale !== "string"
45
+ || typeof value.timeZone !== "string") {
45
46
  throw new Error("Revisions table parameters are missing.");
46
47
  }
47
48
  const locale = value.locale;
49
+ const timeZone = value.timeZone;
48
50
  if (!isPhiRecord(value.scope) && typeof window !== "undefined") {
49
51
  const state = getPhiWorkspaceCatalogSnapshot();
50
52
  const search = new URLSearchParams(window.location.search);
@@ -94,6 +96,7 @@ function readParams(value) {
94
96
  navScopeKey,
95
97
  labels: value.labels,
96
98
  locale,
99
+ timeZone,
97
100
  };
98
101
  }
99
102
  const scope = readRevisionScope(value.scope);
@@ -111,6 +114,7 @@ function readParams(value) {
111
114
  navScopeKey: value.navScopeKey,
112
115
  labels: value.labels,
113
116
  locale,
117
+ timeZone,
114
118
  };
115
119
  }
116
120
  async function readJson(response) {
@@ -267,7 +271,7 @@ function formatRevisionMessageWithLastSave(params, row) {
267
271
  const message = formatRevisionMessage(params.labels, row);
268
272
  if (!row.savedAt)
269
273
  return message;
270
- return formatTemplate(params.labels.messages.lastSaved, message, formatPhiDateTime(row.savedAt, params.locale), row.savedByLabel ?? params.labels.systemLabel);
274
+ return formatTemplate(params.labels.messages.lastSaved, message, formatPhiDateTime(row.savedAt, params.locale, params.timeZone), row.savedByLabel ?? params.labels.systemLabel);
271
275
  }
272
276
  function formatRevisionMessage(labels, row) {
273
277
  const meta = isPhiRecord(row.meta) ? row.meta : null;
@@ -32,7 +32,7 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
32
32
  const credentials = {
33
33
  apiBaseUrl: readPhiServerApiCredentials().apiBaseUrl,
34
34
  internalToken: readPhiServerApiCredentials().internalToken,
35
- locale: runtime.locale.current,
35
+ locale: runtime.locale.current, timeZone: runtime.site.timeZone,
36
36
  };
37
37
  const [chromeLabels, revisionsLabels] = await Promise.all([
38
38
  getPhiBuilderChromeWidgetLabels(credentials),
@@ -399,7 +399,7 @@ export async function buildPhiDefaultBuilderRevisionsPageTree({ page, runtime, }
399
399
  source: {
400
400
  providerKey: PHI_REVISIONS_RUNTIME_DATA_PROVIDER_KEYS.table,
401
401
  resourceKey: "history",
402
- params: { labels: revisionsLabels, locale: runtime.locale.current },
402
+ params: { labels: revisionsLabels, locale: runtime.locale.current, timeZone: runtime.site.timeZone },
403
403
  },
404
404
  presentation: {
405
405
  borders: true,
@@ -2,16 +2,12 @@ import "server-only";
2
2
  import { resolvePhiCmsDescriptorCatalog } from "../../descriptor-compiler";
3
3
  import { buildPhiThemeSetSelectOptions } from "../set-options";
4
4
  import { getPhiHistoryLabels } from "../../../../components/widgets/label-sets/history";
5
- import { readPhiServerApiCredentials } from "../../../../helpers/phis-server-credentials";
6
5
  import { PHI_THEME_RUNTIME_CONTROLLER_DEFINITION, } from "./definition";
6
+ import { buildPhiWidgetLabelTranslatorOptions } from "../../../../components/widgets/label-sets/runtime-options";
7
7
  export const PHI_THEME_RUNTIME_CONTROLLER_SERVER_DEFINITION = {
8
8
  ...PHI_THEME_RUNTIME_CONTROLLER_DEFINITION,
9
9
  serverPreload: async ({ runtime, runtimeModuleCatalog }) => ({
10
10
  setOptions: buildPhiThemeSetSelectOptions(resolvePhiCmsDescriptorCatalog(runtimeModuleCatalog)),
11
- historyLabels: await getPhiHistoryLabels({
12
- apiBaseUrl: readPhiServerApiCredentials().apiBaseUrl,
13
- internalToken: readPhiServerApiCredentials().internalToken,
14
- locale: runtime.locale.current,
15
- }),
11
+ historyLabels: await getPhiHistoryLabels(buildPhiWidgetLabelTranslatorOptions(runtime)),
16
12
  }),
17
13
  };