@phis/ui 0.4.1 → 0.4.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 (246) hide show
  1. package/components/cms/phi-cms-layout-renderer.js +4 -3
  2. package/components/cms/phi-cms-page-render-scope.d.ts +4 -5
  3. package/components/cms/phi-cms-page-render-scope.js +43 -22
  4. package/components/cms/phi-cms-render-diagnostic-client.js +7 -3
  5. package/components/cms/phi-cms-render-error-boundary.js +2 -1
  6. package/components/controls/phi-bullet-list-control.js +31 -2
  7. package/components/controls/phi-ribbon-control.d.ts +29 -0
  8. package/components/controls/phi-ribbon-control.js +53 -0
  9. package/components/controls/phi-table-control.d.ts +3 -0
  10. package/components/controls/phi-table-control.js +13 -1
  11. package/components/controls/phi-tree-control.js +3 -3
  12. package/components/forms/shared-form-provider-registry.js +1 -4
  13. package/components/media/asset-collection-runtime.js +6 -16
  14. package/components/media/media-font-metrics.d.ts +3 -0
  15. package/components/media/media-font-metrics.js +43 -0
  16. package/components/media/phi-area-upload-widget.js +53 -97
  17. package/components/media/phi-image-preview-data.d.ts +13 -0
  18. package/components/media/phi-image-preview-data.js +184 -9
  19. package/components/media/phi-media-picker-binding.js +16 -13
  20. package/components/media/phi-media-upload.d.ts +15 -8
  21. package/components/media/phi-media-upload.js +18 -9
  22. package/components/media/phi-site-font-assets.js +7 -8
  23. package/components/overlays/phi-overlay-container-client.js +16 -1
  24. package/components/regions/presets/phi-settings-page-shell-tree.js +48 -1
  25. package/components/runtime/runtime-controller-materialization.js +12 -1
  26. package/components/state/scoped-state-store.js +20 -3
  27. package/components/tables/client/phi-table-binding.d.ts +2 -1
  28. package/components/tables/client/phi-table-binding.js +45 -21
  29. package/components/trees/client/phi-tree-binding.js +19 -11
  30. package/components/widgets/client/bullet-list-entries-editor.d.ts +26 -0
  31. package/components/widgets/client/bullet-list-entries-editor.js +103 -0
  32. package/components/widgets/config/choice-shared.js +12 -13
  33. package/components/widgets/config/command-buttons.d.ts +5 -1
  34. package/components/widgets/config/command-buttons.js +38 -81
  35. package/components/widgets/config/control-signal-config.d.ts +3 -1
  36. package/components/widgets/config/control-signal-config.js +19 -17
  37. package/components/widgets/config/image-source-parser.d.ts +1 -0
  38. package/components/widgets/config/image-source-parser.js +7 -8
  39. package/components/widgets/config/mask.d.ts +6 -1
  40. package/components/widgets/config/mask.js +24 -1
  41. package/components/widgets/config/parser-primitives.js +72 -0
  42. package/components/widgets/config/stack-tabs.d.ts +1 -1
  43. package/components/widgets/config/stack-tabs.js +2 -3
  44. package/components/widgets/config/strict-config-reader.d.ts +40 -0
  45. package/components/widgets/config/strict-config-reader.js +174 -0
  46. package/components/widgets/label-sets/effects.js +2 -0
  47. package/components/widgets/label-types/effects.d.ts +1 -0
  48. package/components/widgets/label-types/effects.js +1 -0
  49. package/components/widgets/navigation-descriptor-resolver.server.js +20 -8
  50. package/components/widgets/shared/bullet-list-vocabulary.d.ts +17 -1
  51. package/components/widgets/shared/bullet-list-vocabulary.js +19 -2
  52. package/components/widgets/shared/card-body-client.d.ts +16 -4
  53. package/components/widgets/shared/card-body-client.js +81 -24
  54. package/components/widgets/shared/card-vocabulary.d.ts +21 -4
  55. package/components/widgets/shared/card-vocabulary.js +28 -2
  56. package/components/widgets/shared/markdown-body-client.d.ts +2 -1
  57. package/components/widgets/shared/markdown-body-client.js +3 -1
  58. package/components/widgets/shared/markdown-render.js +8 -1
  59. package/components/widgets/signals/control-signal-capabilities.d.ts +0 -18
  60. package/components/widgets/signals/control-signal-capabilities.js +10 -22
  61. package/components/workspace/catalog-store.d.ts +4 -3
  62. package/components/workspace/catalog-store.js +6 -5
  63. package/gateway/dashboard-cards-route.js +1 -0
  64. package/gateway/internal-references.d.ts +6 -1
  65. package/gateway/internal-references.js +48 -23
  66. package/gateway/site-cms-write-validation.d.ts +9 -0
  67. package/gateway/site-cms-write-validation.js +78 -0
  68. package/gateway/site-proxy.js +19 -3
  69. package/helpers/renderable-block-serialization.js +1 -1
  70. package/next/config.d.mts +3 -0
  71. package/next/config.mjs +28 -1
  72. package/package.json +2 -2
  73. package/plugins/runtime/phi-slot-child-viewport-effects-observer.js +5 -1
  74. package/plugins/runtime-modules/accounting/presets.d.ts +9 -0
  75. package/plugins/runtime-modules/accounting/presets.js +37 -0
  76. package/plugins/runtime-modules/accounting/server.d.ts +1 -4
  77. package/plugins/runtime-modules/accounting/server.js +4 -7
  78. package/plugins/runtime-modules/app/presets.d.ts +18 -0
  79. package/plugins/runtime-modules/app/presets.js +67 -0
  80. package/plugins/runtime-modules/app/server.d.ts +1 -4
  81. package/plugins/runtime-modules/app/server.js +4 -7
  82. package/plugins/runtime-modules/asset/controller/runtime.js +2 -2
  83. package/plugins/runtime-modules/asset/services/collection.js +9 -1
  84. package/plugins/runtime-modules/asset/services/options.js +2 -2
  85. package/plugins/runtime-modules/builder/area-settings-answer.js +2 -1
  86. package/plugins/runtime-modules/builder/authoring-canvas.js +6 -6
  87. package/plugins/runtime-modules/builder/cards.js +3 -5
  88. package/plugins/runtime-modules/builder/clients/builder-region-overrides.js +3 -3
  89. package/plugins/runtime-modules/builder/clients/canvas-widget.js +15 -54
  90. package/plugins/runtime-modules/builder/clients/inspector-config-field.d.ts +4 -1
  91. package/plugins/runtime-modules/builder/clients/inspector-config-field.js +5 -34
  92. package/plugins/runtime-modules/builder/clients/inspector-link-target-field.js +1 -1
  93. package/plugins/runtime-modules/builder/clients/inspector-section-widget.js +8 -8
  94. package/plugins/runtime-modules/builder/clients/inspector-title.js +6 -6
  95. package/plugins/runtime-modules/builder/clients/layout-inspector.d.ts +1 -1
  96. package/plugins/runtime-modules/builder/clients/layout-inspector.js +11 -25
  97. package/plugins/runtime-modules/builder/clients/mode-switch.js +1 -1
  98. package/plugins/runtime-modules/builder/clients/pages-header.js +11 -11
  99. package/plugins/runtime-modules/builder/clients/pages-workspace.js +1 -1
  100. package/plugins/runtime-modules/builder/clients/region-visibility-fields.js +1 -1
  101. package/plugins/runtime-modules/builder/clients/runtime-module-authoring-boundary.js +1 -1
  102. package/plugins/runtime-modules/builder/clients/shells-workspace.js +15 -31
  103. package/plugins/runtime-modules/builder/clients/structure-canvas.js +1 -1
  104. package/plugins/runtime-modules/builder/clients/use-region-draft-hydration.d.ts +26 -0
  105. package/plugins/runtime-modules/builder/clients/use-region-draft-hydration.js +36 -0
  106. package/plugins/runtime-modules/builder/clients/widget-effects-editor.js +1 -1
  107. package/plugins/runtime-modules/builder/clients/widget-inspector.js +1 -0
  108. package/plugins/runtime-modules/builder/clients/workspace-scope-boundary.js +2 -2
  109. package/plugins/runtime-modules/builder/cms-instance-allocator.js +8 -28
  110. package/plugins/runtime-modules/builder/controller/client.d.ts +0 -15
  111. package/plugins/runtime-modules/builder/controller/definition.d.ts +0 -15
  112. package/plugins/runtime-modules/builder/controller/definition.js +0 -8
  113. package/plugins/runtime-modules/builder/controller/draft-command-controller.d.ts +1 -2
  114. package/plugins/runtime-modules/builder/controller/draft-command-controller.js +11 -30
  115. package/plugins/runtime-modules/builder/controller/draft-status-controller.js +15 -2
  116. package/plugins/runtime-modules/builder/controller/inspector-controller.d.ts +1 -2
  117. package/plugins/runtime-modules/builder/controller/inspector-controller.js +4 -7
  118. package/plugins/runtime-modules/builder/controller/page-controller.d.ts +1 -2
  119. package/plugins/runtime-modules/builder/controller/page-controller.js +16 -68
  120. package/plugins/runtime-modules/builder/controller/server-definition.d.ts +0 -15
  121. package/plugins/runtime-modules/builder/controller/signal-wiring-controller.d.ts +2 -5
  122. package/plugins/runtime-modules/builder/controller/signal-wiring-controller.js +6 -50
  123. package/plugins/runtime-modules/builder/controller/workspace-controller.d.ts +2 -3
  124. package/plugins/runtime-modules/builder/controller/workspace-controller.js +89 -153
  125. package/plugins/runtime-modules/builder/data-providers.d.ts +1 -0
  126. package/plugins/runtime-modules/builder/data-providers.js +1 -0
  127. package/plugins/runtime-modules/builder/definition.d.ts +1 -0
  128. package/plugins/runtime-modules/builder/developer-workspace-store.d.ts +64 -30
  129. package/plugins/runtime-modules/builder/developer-workspace-store.js +255 -61
  130. package/plugins/runtime-modules/builder/edit-scaffold-drawer.js +1 -1
  131. package/plugins/runtime-modules/builder/history.d.ts +3 -1
  132. package/plugins/runtime-modules/builder/options-providers.js +3 -2
  133. package/plugins/runtime-modules/builder/page-catalog-client.js +19 -7
  134. package/plugins/runtime-modules/builder/page-meta-form.js +1 -0
  135. package/plugins/runtime-modules/builder/page-references-provider.js +1 -1
  136. package/plugins/runtime-modules/builder/persistence.js +33 -69
  137. package/plugins/runtime-modules/builder/public-route-collisions.d.ts +2 -2
  138. package/plugins/runtime-modules/builder/public-route-collisions.js +6 -19
  139. package/plugins/runtime-modules/builder/render-root-node-preview.server.js +20 -3
  140. package/plugins/runtime-modules/builder/render-root-node-scaffold.js +3 -3
  141. package/plugins/runtime-modules/builder/runtime-module-selection.d.ts +2 -12
  142. package/plugins/runtime-modules/builder/runtime-module-selection.js +16 -42
  143. package/plugins/runtime-modules/builder/services/navigation-table.js +9 -15
  144. package/plugins/runtime-modules/builder/services/page-source-tree.js +8 -8
  145. package/plugins/runtime-modules/builder/services/runtime-modules-table.js +10 -10
  146. package/plugins/runtime-modules/builder/services/signal-routes-table.js +3 -3
  147. package/plugins/runtime-modules/builder/signal-route-selection.d.ts +1 -2
  148. package/plugins/runtime-modules/builder/signal-route-selection.js +2 -2
  149. package/plugins/runtime-modules/builder/signal-wiring-options.js +3 -2
  150. package/plugins/runtime-modules/builder/structure-dnd.js +8 -61
  151. package/plugins/runtime-modules/builder/trees/phi-default-builder-area-preset-tree.js +13 -10
  152. package/plugins/runtime-modules/builder/widgets/structure-region/built-in.js +12 -18
  153. package/plugins/runtime-modules/builder/workspace-catalog-actions.d.ts +55 -0
  154. package/plugins/runtime-modules/builder/workspace-catalog-actions.js +142 -0
  155. package/plugins/runtime-modules/client-manifests/common.js +1 -1
  156. package/plugins/runtime-modules/{runtime-calendar-adapters.js → core/calendar-adapters.js} +2 -2
  157. package/plugins/runtime-modules/{client-calendar-adapters/core.js → core/client-calendar-adapters.js} +1 -1
  158. package/plugins/runtime-modules/core/content-entries/table.js +1 -1
  159. package/plugins/runtime-modules/core/data-providers.d.ts +3 -0
  160. package/plugins/runtime-modules/core/data-providers.js +2 -1
  161. package/plugins/runtime-modules/core/definition.d.ts +3 -0
  162. package/plugins/runtime-modules/core/definition.js +1 -1
  163. package/plugins/runtime-modules/core/messaging/data-providers.d.ts +1 -0
  164. package/plugins/runtime-modules/core/messaging/data-providers.js +1 -0
  165. package/plugins/runtime-modules/core/messaging/thread-inbox-table.js +1 -1
  166. package/plugins/runtime-modules/core/server.js +1 -1
  167. package/plugins/runtime-modules/core/themes.d.ts +44 -0
  168. package/plugins/runtime-modules/core/themes.js +12 -0
  169. package/plugins/runtime-modules/core/widgets/card/collection-view-binding.js +25 -9
  170. package/plugins/runtime-modules/core/widgets/card/config.d.ts +296 -254
  171. package/plugins/runtime-modules/core/widgets/card/config.js +52 -3
  172. package/plugins/runtime-modules/core/widgets/card/editor.js +30 -3
  173. package/plugins/runtime-modules/core/widgets/card/server.d.ts +3 -0
  174. package/plugins/runtime-modules/core/widgets/card/server.js +31 -3
  175. package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +7 -6
  176. package/plugins/runtime-modules/core/widgets/collection-view/config.js +9 -2
  177. package/plugins/runtime-modules/core/widgets/description/config.d.ts +1 -25
  178. package/plugins/runtime-modules/core/widgets/description/editor.js +4 -61
  179. package/plugins/runtime-modules/core/widgets/entry-list/config.d.ts +1 -25
  180. package/plugins/runtime-modules/core/widgets/gallery/config.d.ts +1 -25
  181. package/plugins/runtime-modules/core/widgets/image/config.js +2 -2
  182. package/plugins/runtime-modules/core/widgets/markdown/config.d.ts +3 -1
  183. package/plugins/runtime-modules/core/widgets/markdown/config.js +14 -0
  184. package/plugins/runtime-modules/core/widgets/markdown/editor.js +2 -3
  185. package/plugins/runtime-modules/core/widgets/result/config.d.ts +4 -25
  186. package/plugins/runtime-modules/core/widgets/result/config.js +2 -0
  187. package/plugins/runtime-modules/core/widgets/result/server.js +25 -19
  188. package/plugins/runtime-modules/core/widgets/simple-text/config.d.ts +1 -25
  189. package/plugins/runtime-modules/core/widgets/slot-upload/client.js +11 -2
  190. package/plugins/runtime-modules/core/widgets/table/client.js +8 -4
  191. package/plugins/runtime-modules/core/widgets/table/config.d.ts +3 -83
  192. package/plugins/runtime-modules/core/widgets/table/config.js +302 -452
  193. package/plugins/runtime-modules/core/widgets/tree/config.js +5 -2
  194. package/plugins/runtime-modules/dashboard/card-rows.d.ts +5 -0
  195. package/plugins/runtime-modules/dashboard/card-rows.js +59 -0
  196. package/plugins/runtime-modules/dashboard/clients/dashboard-card-view.js +4 -6
  197. package/plugins/runtime-modules/dashboard/services/collection.js +17 -7
  198. package/plugins/runtime-modules/groups/data-providers.d.ts +2 -0
  199. package/plugins/runtime-modules/groups/data-providers.js +3 -3
  200. package/plugins/runtime-modules/groups/definition.d.ts +2 -0
  201. package/plugins/runtime-modules/localization/data-providers.d.ts +3 -0
  202. package/plugins/runtime-modules/localization/data-providers.js +2 -0
  203. package/plugins/runtime-modules/localization/definition.d.ts +3 -0
  204. package/plugins/runtime-modules/localization/services/table.js +3 -7
  205. package/plugins/runtime-modules/observability/data-providers.d.ts +1 -0
  206. package/plugins/runtime-modules/observability/data-providers.js +1 -0
  207. package/plugins/runtime-modules/observability/definition.d.ts +1 -0
  208. package/plugins/runtime-modules/observability/module.d.ts +1 -0
  209. package/plugins/runtime-modules/observability/services/table.js +1 -1
  210. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +2 -105
  211. package/plugins/runtime-modules/public/presets.d.ts +115 -0
  212. package/plugins/runtime-modules/{area-base-presets.js → public/presets.js} +19 -119
  213. package/plugins/runtime-modules/public/server.d.ts +1 -4
  214. package/plugins/runtime-modules/public/server.js +4 -7
  215. package/plugins/runtime-modules/public/trees/phi-default-pub-error-page-tree.js +7 -8
  216. package/plugins/runtime-modules/public-base-page-references.d.ts +1 -1
  217. package/plugins/runtime-modules/public-base-page-references.js +1 -1
  218. package/plugins/runtime-modules/revisions/controller/client.js +11 -11
  219. package/plugins/runtime-modules/revisions/services/table.js +3 -3
  220. package/plugins/runtime-modules/theme/trees/phi-default-builder-theme-page-tree.js +22 -0
  221. package/plugins/runtime-modules/theme/widgets/brand-controls/client.d.ts +2 -1
  222. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +93 -58
  223. package/plugins/runtime-modules/theme/widgets/brand-controls/config.d.ts +2 -1
  224. package/plugins/runtime-modules/theme/widgets/brand-controls/config.js +23 -22
  225. package/plugins/runtime-modules/theme/widgets/brand-controls/plugin.js +1 -1
  226. package/plugins/runtime-modules/theme-descriptors.js +1 -1
  227. package/plugins/runtime-modules/user-management/data-providers.d.ts +2 -0
  228. package/plugins/runtime-modules/user-management/data-providers.js +1 -0
  229. package/plugins/runtime-modules/user-management/definition.d.ts +2 -0
  230. package/styles/control-shape.css +11 -11
  231. package/styles/controls.css +29 -3
  232. package/styles/layout.css +16 -7
  233. package/types/cms-config.js +142 -185
  234. package/types/cms-plugins.d.ts +4 -11
  235. package/types/core-widget-placements.d.ts +17 -3
  236. package/types/dashboard-cards.d.ts +9 -0
  237. package/types/media.d.ts +0 -3
  238. package/types/renderable-block.d.ts +6 -1
  239. package/types/table-widget.d.ts +9 -0
  240. package/types/table-widget.js +20 -0
  241. package/types.d.ts +1 -1
  242. package/widget-config.d.ts +2 -0
  243. package/widget-config.js +6 -0
  244. package/plugins/runtime-modules/area-base-presets.d.ts +0 -139
  245. /package/plugins/runtime-modules/{runtime-calendar-adapters.d.ts → core/calendar-adapters.d.ts} +0 -0
  246. /package/plugins/runtime-modules/{client-calendar-adapters/core.d.ts → core/client-calendar-adapters.d.ts} +0 -0
@@ -1,3 +1,4 @@
1
+ import { type PhiTextSource } from "../../../../../helpers/text-source";
1
2
  import { type PhiCmsWidgetConfigBase } from "../../../../../components/widgets/config/parser-primitives";
2
3
  import type { PhiResultWidgetVisualStatus } from "../../../../../types/result-widget";
3
4
  export type PhiCmsResultWidgetConfig = PhiCmsWidgetConfigBase & {
@@ -7,6 +8,8 @@ export type PhiCmsResultWidgetConfig = PhiCmsWidgetConfigBase & {
7
8
  subTitle?: string;
8
9
  homeLink?: boolean;
9
10
  homeLinkLabel?: string;
11
+ /** Whose words `title`, `subTitle` and `homeLinkLabel` are (`helpers/text-source.ts`). */
12
+ textSource?: PhiTextSource;
10
13
  };
11
14
  /**
12
15
  * The way out of a result that ended a journey.
@@ -315,30 +318,6 @@ export declare const PHI_RESULT_WIDGET_DEFINITION: {
315
318
  editorPlacement?: "inspector" | "geometry" | "toolbar";
316
319
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
317
320
  heading?: string;
318
- } & {
319
- type: "background";
320
- section?: string;
321
- storage?: import("../../../../../types").PhiCmsConfigFieldValueStorage;
322
- }) | ({
323
- key: string;
324
- label: string;
325
- description?: string;
326
- required?: boolean;
327
- editorPlacement?: "inspector" | "geometry" | "toolbar";
328
- visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
329
- heading?: string;
330
- } & {
331
- type: "border";
332
- section?: string;
333
- storage?: import("../../../../../types").PhiCmsConfigFieldValueStorage;
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;
342
321
  } & {
343
322
  type: "surface";
344
323
  tone?: false;
@@ -351,7 +330,7 @@ export declare const PHI_RESULT_WIDGET_DEFINITION: {
351
330
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
352
331
  heading?: string;
353
332
  } & {
354
- type: "shadow" | "grid-placement" | "column-count";
333
+ type: "grid-placement" | "column-count";
355
334
  section?: string;
356
335
  }) | {
357
336
  key: string;
@@ -1,5 +1,6 @@
1
1
  import { resolvePhiCmsWidgetPluginKey } from "../../../../../constants/cms-widget-types";
2
2
  import { PHI_RENDERABLE_BLOCK_GEOMETRY_FIELDS } from "../../../../../helpers/renderable-block-plugin-fields";
3
+ import { readPhiTextSource } from "../../../../../helpers/text-source";
3
4
  import { readBoolean, readRenderableBlockConfig, readString, } from "../../../../../components/widgets/config/parser-primitives";
4
5
  /**
5
6
  * The way out of a result that ended a journey.
@@ -36,6 +37,7 @@ function parsePhiCmsResultWidgetConfig(config) {
36
37
  subTitle: readString(config.subTitle),
37
38
  homeLink: readBoolean(config.homeLink) ?? true,
38
39
  homeLinkLabel: readString(config.homeLinkLabel),
40
+ textSource: readPhiTextSource(config.textSource),
39
41
  };
40
42
  }
41
43
  export const PHI_RESULT_WIDGET_DEFINITION = {
@@ -1,37 +1,43 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { PHI_TR_CTX_WEB_UI_LABEL, createSiteTranslator } from "../../../../../gateway/tr";
2
+ import { trWidgetText } from "../../../../../server-helpers/translate";
3
+ import { PHI_TEXT_SOURCE_PRESET } from "../../../../../helpers/text-source";
3
4
  import { PHI_RESULT_HOME_LINK_SOURCE_LABEL } from "./config";
4
5
  import { localizeAreaPath } from "../../../../../helpers/locale";
5
6
  import { PhiResultWidgetBody } from "../../../../../components/widgets/shared/result-body";
6
- import { readPhiServerApiCredentials } from "../../../../../helpers/phis-server-credentials";
7
+ /**
8
+ * The Result's words, each from the store of whoever wrote it (`helpers/text-source.ts`).
9
+ *
10
+ * A Preset's title and subtitle -- the error pages' "Not found" -- are the platform's and come from the
11
+ * global store; an author's are the Site's. The home link's default label is the Widget's own sentence,
12
+ * so it is the platform's whoever placed the Widget.
13
+ */
7
14
  async function resolveResultText({ config, runtime, translate }) {
8
15
  const code = config?.code?.trim();
9
16
  const title = config?.title?.trim();
10
17
  const subTitle = config?.subTitle?.trim();
11
- const homeLinkLabel = config?.homeLinkLabel?.trim() || PHI_RESULT_HOME_LINK_SOURCE_LABEL;
18
+ const authoredHomeLinkLabel = config?.homeLinkLabel?.trim();
19
+ const homeLinkLabel = authoredHomeLinkLabel || PHI_RESULT_HOME_LINK_SOURCE_LABEL;
12
20
  const shouldTranslate = translate &&
13
21
  config?.renderMode !== "preview" &&
14
- config?.renderMode !== "editor" &&
15
- Boolean(readPhiServerApiCredentials().apiBaseUrl.trim()) &&
16
- Boolean(readPhiServerApiCredentials().internalToken.trim()) &&
17
- Boolean(runtime.site.key.trim()) &&
18
- Boolean(runtime.locale.current.trim());
22
+ config?.renderMode !== "editor";
19
23
  if (!shouldTranslate) {
20
24
  return { code, title, subTitle, homeLinkLabel };
21
25
  }
22
- const translator = createSiteTranslator({
23
- apiBaseUrl: readPhiServerApiCredentials().apiBaseUrl,
24
- internalToken: readPhiServerApiCredentials().internalToken,
25
- siteKey: runtime.site.key,
26
- locale: runtime.locale.current,
27
- });
28
- const sourceTexts = [title ?? "", subTitle ?? "", homeLinkLabel];
29
- const translated = await translator.trBulk(sourceTexts, PHI_TR_CTX_WEB_UI_LABEL);
26
+ const locale = runtime.locale.current;
27
+ const textSource = config?.textSource;
28
+ const translateText = async (value) => value ? (await trWidgetText(locale, value, textSource)).trim() || value : value;
29
+ const [translatedTitle, translatedSubTitle, translatedHomeLinkLabel] = await Promise.all([
30
+ translateText(title),
31
+ translateText(subTitle),
32
+ authoredHomeLinkLabel
33
+ ? translateText(authoredHomeLinkLabel)
34
+ : trWidgetText(locale, PHI_RESULT_HOME_LINK_SOURCE_LABEL, PHI_TEXT_SOURCE_PRESET),
35
+ ]);
30
36
  return {
31
37
  code,
32
- title: translated[0]?.trim() || title,
33
- subTitle: translated[1]?.trim() || subTitle,
34
- homeLinkLabel: translated[2]?.trim() || homeLinkLabel,
38
+ title: translatedTitle,
39
+ subTitle: translatedSubTitle,
40
+ homeLinkLabel: translatedHomeLinkLabel?.trim() || homeLinkLabel,
35
41
  };
36
42
  }
37
43
  export async function PhiResultWidget({ config, runtime, translate }) {
@@ -323,30 +323,6 @@ export declare const PHI_SIMPLE_TEXT_WIDGET_DEFINITION: {
323
323
  editorPlacement?: "inspector" | "geometry" | "toolbar";
324
324
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
325
325
  heading?: string;
326
- } & {
327
- type: "background";
328
- section?: string;
329
- storage?: import("../../../../../types").PhiCmsConfigFieldValueStorage;
330
- }) | ({
331
- key: string;
332
- label: string;
333
- description?: string;
334
- required?: boolean;
335
- editorPlacement?: "inspector" | "geometry" | "toolbar";
336
- visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
337
- heading?: string;
338
- } & {
339
- type: "border";
340
- section?: string;
341
- storage?: import("../../../../../types").PhiCmsConfigFieldValueStorage;
342
- }) | ({
343
- key: string;
344
- label: string;
345
- description?: string;
346
- required?: boolean;
347
- editorPlacement?: "inspector" | "geometry" | "toolbar";
348
- visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
349
- heading?: string;
350
326
  } & {
351
327
  type: "surface";
352
328
  tone?: false;
@@ -359,7 +335,7 @@ export declare const PHI_SIMPLE_TEXT_WIDGET_DEFINITION: {
359
335
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
360
336
  heading?: string;
361
337
  } & {
362
- type: "shadow" | "grid-placement" | "column-count";
338
+ type: "grid-placement" | "column-count";
363
339
  section?: string;
364
340
  }) | {
365
341
  key: string;
@@ -8,7 +8,7 @@ import { usePhiMediaUpload } from "../../../../../components/media/phi-media-upl
8
8
  import { runPhiAddonAssetUpload, } from "../../../../../components/media/media-upload-flow";
9
9
  import { PHI_MEDIA_UPLOAD_DEFAULT_LABELS } from "../../../../../components/media/phi-media-upload";
10
10
  import { usePhiSignalListener } from "../../../../../components/runtime/runtime-signal-bus";
11
- import { usePhiSignalIdentity } from "../../../../../components/runtime/runtime-signal-identity";
11
+ import { emitPhiSignalCapability, usePhiSignalEmitter, usePhiSignalIdentity, } from "../../../../../components/runtime/runtime-signal-identity";
12
12
  import { readPhiTableBindingParamsSignalValue } from "../../../../../types/table-signal-values";
13
13
  import { findPhiSignalListenRoute } from "../../../../../helpers/signal-listen-routes";
14
14
  import { PhiFlexControl } from "../../../../../components/controls/phi-flex-control";
@@ -21,6 +21,13 @@ export function PhiSlotUploadWidgetClient({ config }) {
21
21
  const ownerParam = config?.ownerParam?.trim() || "id";
22
22
  const signalIdentity = usePhiSignalIdentity();
23
23
  const listenRoutes = useMemo(() => config?.signalRoutes?.listens ?? [], [config?.signalRoutes?.listens]);
24
+ const emitRoutes = useMemo(() => config?.signalRoutes?.emits ?? [], [config?.signalRoutes?.emits]);
25
+ const emitSignal = usePhiSignalEmitter();
26
+ /*
27
+ * The row's files changed -- a file arrived or went -- so whatever shows the row can read it again.
28
+ * Sent only once the change is through, never for an upload that was refused or a removal that failed.
29
+ */
30
+ const announceChanged = useCallback(() => emitPhiSignalCapability(emitSignal, emitRoutes, "changed", null), [emitRoutes, emitSignal]);
24
31
  const [ownerId, setOwnerId] = useState(null);
25
32
  const [slot, setSlot] = useState(null);
26
33
  /*
@@ -176,6 +183,7 @@ export function PhiSlotUploadWidgetClient({ config }) {
176
183
  runSession,
177
184
  onUploaded: async () => {
178
185
  setFailure(null);
186
+ announceChanged();
179
187
  await reload();
180
188
  },
181
189
  onRejected: (message) => setFailure(message),
@@ -196,8 +204,9 @@ export function PhiSlotUploadWidgetClient({ config }) {
196
204
  setFailure("That file stayed.");
197
205
  return;
198
206
  }
207
+ announceChanged();
199
208
  await reload();
200
- }, [base, ownerId, read, reload]);
209
+ }, [announceChanged, base, ownerId, read, reload]);
201
210
  if (!base || !slotName) {
202
211
  return _jsx(PhiTypographyControl, { type: "secondary", children: "This field names no Add-on, table or slot." });
203
212
  }
@@ -306,7 +306,7 @@ export function PhiTableWidgetClient({ config: inputConfig, externalSearch, exte
306
306
  },
307
307
  validateResource,
308
308
  });
309
- const { resource, bindingError, contractError, rows, total, summary, loading, error, query, resolvedQuery, setQuery, selectedRowIdentities, setSelectedRowIdentities, expandedRowIdentities, setExpandedRowIdentities, reload, executeAction, commitField, commitRow, isFieldMutationPending, moveRow, drop, } = binding;
309
+ const { resource, bindingError, contractError, rows, total, hasMore, summary, loading, error, query, resolvedQuery, setQuery, selectedRowIdentities, setSelectedRowIdentities, expandedRowIdentities, setExpandedRowIdentities, reload, executeAction, commitField, commitRow, isFieldMutationPending, moveRow, drop, } = binding;
310
310
  const toolbarActions = useMemo(() => resolveTableActions(features.actions?.toolbar, resource?.actions), [features.actions?.toolbar, resource?.actions]);
311
311
  const rowActions = useMemo(() => resolveTableActions(features.actions?.row, resource?.actions), [features.actions?.row, resource?.actions]);
312
312
  const bulkActions = useMemo(() => resolveTableActions(features.actions?.bulk, resource?.actions), [features.actions?.bulk, resource?.actions]);
@@ -564,7 +564,7 @@ export function PhiTableWidgetClient({ config: inputConfig, externalSearch, exte
564
564
  }, [emitCapability, resolvedQuery]);
565
565
  useEffect(() => {
566
566
  const state = {
567
- total,
567
+ total: total ?? undefined,
568
568
  page: resolvedQuery.page,
569
569
  pageSize: resolvedQuery.pageSize,
570
570
  loading: effectiveLoading,
@@ -667,14 +667,17 @@ export function PhiTableWidgetClient({ config: inputConfig, externalSearch, exte
667
667
  const resolveSummaryValue = useCallback((item) => {
668
668
  if (item.value.source === "provider")
669
669
  return summary[item.value.fieldKey];
670
+ // Without a count the Provider gives, there is none to show: the rows of this page are not it.
670
671
  if (item.value.fieldKey === "totalRows")
671
- return total;
672
+ return total ?? undefined;
672
673
  if (item.value.fieldKey === "pageRows")
673
674
  return rows.length;
674
675
  if (item.value.fieldKey === "selectedRows")
675
676
  return selectedRowIdentities.length;
676
677
  if (item.value.fieldKey === "page")
677
678
  return resolvedQuery.page ?? 1;
679
+ if (total == null)
680
+ return undefined;
678
681
  const pageSize = resolvedQuery.pageSize ?? rows.length;
679
682
  return pageSize > 0 ? Math.ceil(total / pageSize) : 0;
680
683
  }, [resolvedQuery.page, resolvedQuery.pageSize, rows.length, selectedRowIdentities.length, summary, total]);
@@ -824,7 +827,8 @@ export function PhiTableWidgetClient({ config: inputConfig, externalSearch, exte
824
827
  } : undefined, pagination: features.pagination?.enabled === false ? false : {
825
828
  page: resolvedQuery.page ?? 1,
826
829
  pageSize: resolvedQuery.pageSize ?? 20,
827
- total,
830
+ total: total ?? undefined,
831
+ hasMore,
828
832
  pageSizeOptions: features.pagination?.pageSizes,
829
833
  showSizeChanger: (features.pagination?.pageSizes?.length ?? 0) > 0,
830
834
  onChange: (page, pageSize) => setQuery((current) => ({ ...current, page, pageSize, cursor: null })),
@@ -346,30 +346,6 @@ export declare const PHI_TABLE_WIDGET_DEFINITION: {
346
346
  editorPlacement?: "inspector" | "geometry" | "toolbar";
347
347
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
348
348
  heading?: string;
349
- } & {
350
- type: "background";
351
- section?: string;
352
- storage?: import("../../../../../types").PhiCmsConfigFieldValueStorage;
353
- }) | ({
354
- key: string;
355
- label: string;
356
- description?: string;
357
- required?: boolean;
358
- editorPlacement?: "inspector" | "geometry" | "toolbar";
359
- visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
360
- heading?: string;
361
- } & {
362
- type: "border";
363
- section?: string;
364
- storage?: import("../../../../../types").PhiCmsConfigFieldValueStorage;
365
- }) | ({
366
- key: string;
367
- label: string;
368
- description?: string;
369
- required?: boolean;
370
- editorPlacement?: "inspector" | "geometry" | "toolbar";
371
- visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
372
- heading?: string;
373
349
  } & {
374
350
  type: "surface";
375
351
  tone?: false;
@@ -382,7 +358,7 @@ export declare const PHI_TABLE_WIDGET_DEFINITION: {
382
358
  visibleWhen?: import("../../../../../types").PhiCmsConfigFieldVisibilityRule | readonly import("../../../../../types").PhiCmsConfigFieldVisibilityRule[];
383
359
  heading?: string;
384
360
  } & {
385
- type: "shadow" | "grid-placement" | "column-count";
361
+ type: "grid-placement" | "column-count";
386
362
  section?: string;
387
363
  }) | {
388
364
  visibleWhen: {
@@ -700,34 +676,6 @@ export declare const PHI_TABLE_WIDGET_DEFINITION: {
700
676
  reorderable?: boolean;
701
677
  presentation?: import("../../../../../types").PhiCmsConfigFieldCollectionPresentation;
702
678
  editLabel?: string;
703
- } | {
704
- visibleWhen: {
705
- field: string;
706
- notEquals: string;
707
- };
708
- key: string;
709
- label: string;
710
- description?: string;
711
- required?: boolean;
712
- editorPlacement?: "inspector" | "geometry" | "toolbar";
713
- heading?: string;
714
- type: "background";
715
- section?: string;
716
- storage?: import("../../../../../types").PhiCmsConfigFieldValueStorage;
717
- } | {
718
- visibleWhen: {
719
- field: string;
720
- notEquals: string;
721
- };
722
- key: string;
723
- label: string;
724
- description?: string;
725
- required?: boolean;
726
- editorPlacement?: "inspector" | "geometry" | "toolbar";
727
- heading?: string;
728
- type: "border";
729
- section?: string;
730
- storage?: import("../../../../../types").PhiCmsConfigFieldValueStorage;
731
679
  } | {
732
680
  visibleWhen: {
733
681
  field: string;
@@ -752,7 +700,7 @@ export declare const PHI_TABLE_WIDGET_DEFINITION: {
752
700
  required?: boolean;
753
701
  editorPlacement?: "inspector" | "geometry" | "toolbar";
754
702
  heading?: string;
755
- type: "shadow" | "grid-placement" | "column-count";
703
+ type: "grid-placement" | "column-count";
756
704
  section?: string;
757
705
  } | {
758
706
  key: string;
@@ -1093,34 +1041,6 @@ export declare const PHI_TABLE_WIDGET_DEFINITION: {
1093
1041
  reorderable?: boolean;
1094
1042
  presentation?: import("../../../../../types").PhiCmsConfigFieldCollectionPresentation;
1095
1043
  editLabel?: string;
1096
- } | {
1097
- visibleWhen: {
1098
- field: string;
1099
- equals: boolean;
1100
- };
1101
- key: string;
1102
- label: string;
1103
- description?: string;
1104
- required?: boolean;
1105
- editorPlacement?: "inspector" | "geometry" | "toolbar";
1106
- heading?: string;
1107
- type: "background";
1108
- section?: string;
1109
- storage?: import("../../../../../types").PhiCmsConfigFieldValueStorage;
1110
- } | {
1111
- visibleWhen: {
1112
- field: string;
1113
- equals: boolean;
1114
- };
1115
- key: string;
1116
- label: string;
1117
- description?: string;
1118
- required?: boolean;
1119
- editorPlacement?: "inspector" | "geometry" | "toolbar";
1120
- heading?: string;
1121
- type: "border";
1122
- section?: string;
1123
- storage?: import("../../../../../types").PhiCmsConfigFieldValueStorage;
1124
1044
  } | {
1125
1045
  visibleWhen: {
1126
1046
  field: string;
@@ -1145,7 +1065,7 @@ export declare const PHI_TABLE_WIDGET_DEFINITION: {
1145
1065
  required?: boolean;
1146
1066
  editorPlacement?: "inspector" | "geometry" | "toolbar";
1147
1067
  heading?: string;
1148
- type: "shadow" | "grid-placement" | "column-count";
1068
+ type: "grid-placement" | "column-count";
1149
1069
  section?: string;
1150
1070
  } | {
1151
1071
  key: string;