@phis/ui 0.4.15 → 0.4.17

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 (120) hide show
  1. package/components/cms/phi-cms-layout-renderer.js +2 -1
  2. package/components/controls/phi-table-control.js +15 -0
  3. package/components/forms/compound-form-controls.js +2 -1
  4. package/components/regions/clients/cms-region-container-client.d.ts +3 -1
  5. package/components/regions/clients/cms-region-container-client.js +2 -1
  6. package/components/regions/phi-cms-region-container.d.ts +3 -1
  7. package/components/regions/phi-cms-region-container.js +3 -2
  8. package/components/regions/phi-cms-region-shell.d.ts +16 -1
  9. package/components/regions/phi-cms-region-shell.js +39 -10
  10. package/components/regions/phi-cms-region-static.d.ts +3 -1
  11. package/components/regions/phi-cms-region-static.js +2 -1
  12. package/components/widgets/label-sets/observability-logs.d.ts +2 -0
  13. package/components/widgets/label-sets/observability-logs.js +4 -0
  14. package/components/widgets/label-sets/search.js +2 -0
  15. package/components/widgets/label-types/search.d.ts +2 -0
  16. package/components/widgets/label-types/search.js +1 -0
  17. package/constants/cms-widget-types.js +3 -2
  18. package/helpers/renderable-block-defaults.js +1 -0
  19. package/helpers/renderable-block-serialization.js +7 -1
  20. package/helpers/site-runtime.js +3 -0
  21. package/net/log.d.ts +1 -0
  22. package/net/log.js +19 -1
  23. package/net/phi-next-proxy.js +9 -1
  24. package/package.json +2 -2
  25. package/plugins/runtime/phi-slot-child-viewport-effects-observer.js +13 -0
  26. package/plugins/runtime-modules/app/presets.js +0 -23
  27. package/plugins/runtime-modules/area-contributions/app.d.ts +1 -1
  28. package/plugins/runtime-modules/area-contributions/app.js +2 -0
  29. package/plugins/runtime-modules/area-contributions/public.d.ts +1 -1
  30. package/plugins/runtime-modules/area-contributions/public.js +2 -0
  31. package/plugins/runtime-modules/area-module-defaults.js +21 -2
  32. package/plugins/runtime-modules/builder/page-meta-form.js +11 -0
  33. package/plugins/runtime-modules/client-authoring-providers/app.d.ts +1 -1
  34. package/plugins/runtime-modules/client-authoring-providers/app.js +6 -0
  35. package/plugins/runtime-modules/client-authoring-providers/public.d.ts +1 -1
  36. package/plugins/runtime-modules/client-authoring-providers/public.js +6 -0
  37. package/plugins/runtime-modules/client-manifests/common.js +2 -2
  38. package/plugins/runtime-modules/core/authoring-widgets.js +0 -4
  39. package/plugins/runtime-modules/core/widgets/collection-view/asset-binding.js +1 -1
  40. package/plugins/runtime-modules/core/widgets/markdown-toc/client.js +1 -1
  41. package/plugins/runtime-modules/core/widgets/table/client.js +7 -5
  42. package/plugins/runtime-modules/core/widgets/table/config.js +8 -1
  43. package/plugins/runtime-modules/core/widgets/tree/client.js +1 -1
  44. package/plugins/runtime-modules/core/widgets.js +0 -17
  45. package/plugins/runtime-modules/groups/trees/group-tables.d.ts +44 -0
  46. package/plugins/runtime-modules/groups/trees/group-tables.js +150 -0
  47. package/plugins/runtime-modules/groups/trees/phi-default-admin-groups-page-tree.js +28 -136
  48. package/plugins/runtime-modules/groups/trees/phi-default-app-groups-page-tree.js +9 -106
  49. package/plugins/runtime-modules/localization/trees/phi-default-admin-locales-page-tree.js +17 -5
  50. package/plugins/runtime-modules/observability/data-providers.d.ts +9 -0
  51. package/plugins/runtime-modules/observability/data-providers.js +5 -0
  52. package/plugins/runtime-modules/observability/definition.d.ts +9 -0
  53. package/plugins/runtime-modules/observability/module.d.ts +9 -0
  54. package/plugins/runtime-modules/observability/services/table.js +4 -0
  55. package/plugins/runtime-modules/observability/trees/phi-default-admin-logs-page-tree.js +13 -0
  56. package/plugins/runtime-modules/phi-default-site-area-preset-tree.js +21 -0
  57. package/plugins/runtime-modules/preset-contracts/pub-area.d.ts +1 -1
  58. package/plugins/runtime-modules/preset-contracts/pub-area.js +1 -0
  59. package/plugins/runtime-modules/public/presets.d.ts +0 -16
  60. package/plugins/runtime-modules/public/presets.js +0 -22
  61. package/plugins/runtime-modules/public-base-page-references.d.ts +0 -1
  62. package/plugins/runtime-modules/public-base-page-references.js +0 -1
  63. package/plugins/runtime-modules/search/authoring-widgets.d.ts +2 -0
  64. package/plugins/runtime-modules/search/authoring-widgets.js +8 -0
  65. package/plugins/runtime-modules/search/authoring.d.ts +1 -0
  66. package/plugins/runtime-modules/search/authoring.js +8 -0
  67. package/plugins/runtime-modules/search/definition.d.ts +21 -0
  68. package/plugins/runtime-modules/search/definition.js +23 -0
  69. package/plugins/runtime-modules/search/ids.d.ts +6 -0
  70. package/plugins/runtime-modules/search/ids.js +7 -0
  71. package/plugins/runtime-modules/search/module.d.ts +10 -0
  72. package/plugins/runtime-modules/search/module.js +4 -0
  73. package/plugins/runtime-modules/search/page-references.d.ts +8 -0
  74. package/plugins/runtime-modules/search/page-references.js +17 -0
  75. package/plugins/runtime-modules/{search-page-tree.d.ts → search/page-tree.d.ts} +1 -1
  76. package/plugins/runtime-modules/{search-page-tree.js → search/page-tree.js} +9 -7
  77. package/plugins/runtime-modules/search/presets.d.ts +12 -0
  78. package/plugins/runtime-modules/search/presets.js +33 -0
  79. package/plugins/runtime-modules/search/server.d.ts +1 -0
  80. package/plugins/runtime-modules/search/server.js +16 -0
  81. package/plugins/runtime-modules/search/widgets/search-box/authoring.d.ts +8 -0
  82. package/plugins/runtime-modules/search/widgets/search-box/authoring.js +21 -0
  83. package/plugins/runtime-modules/search/widgets/search-box/client.d.ts +39 -0
  84. package/plugins/runtime-modules/search/widgets/search-box/client.js +114 -0
  85. package/plugins/runtime-modules/search/widgets/search-box/config.d.ts +96 -0
  86. package/plugins/runtime-modules/search/widgets/search-box/config.js +67 -0
  87. package/plugins/runtime-modules/{core → search}/widgets/search-box/plugin.js +1 -4
  88. package/plugins/runtime-modules/search/widgets/search-box/server.d.ts +15 -0
  89. package/plugins/runtime-modules/{core → search}/widgets/search-box/server.js +13 -14
  90. package/plugins/runtime-modules/{core → search}/widgets/search-results/config.d.ts +0 -1
  91. package/plugins/runtime-modules/{core → search}/widgets/search-results/config.js +0 -1
  92. package/plugins/runtime-modules/{core → search}/widgets/search-results/plugin.js +1 -3
  93. package/plugins/runtime-modules/{core → search}/widgets/search-results/server.d.ts +1 -2
  94. package/plugins/runtime-modules/{core → search}/widgets/search-results/server.js +2 -2
  95. package/plugins/runtime-modules/search/widgets.d.ts +2 -0
  96. package/plugins/runtime-modules/search/widgets.js +20 -0
  97. package/plugins/runtime-modules/theme/widgets/brand-controls/client.js +15 -1
  98. package/server-helpers/search-index.js +9 -0
  99. package/styles/root.css +2 -0
  100. package/styles/shell.css +178 -18
  101. package/theme/phi-theme-tokens.d.ts +1 -1
  102. package/theme/phi-theme-tokens.js +2 -0
  103. package/types/renderable-block.d.ts +5 -0
  104. package/types/table-widget.d.ts +10 -1
  105. package/types/table-widget.js +1 -0
  106. package/plugins/runtime-modules/core/widgets/search-box/authoring.d.ts +0 -6
  107. package/plugins/runtime-modules/core/widgets/search-box/authoring.js +0 -10
  108. package/plugins/runtime-modules/core/widgets/search-box/client.d.ts +0 -21
  109. package/plugins/runtime-modules/core/widgets/search-box/client.js +0 -17
  110. package/plugins/runtime-modules/core/widgets/search-box/config.d.ts +0 -63
  111. package/plugins/runtime-modules/core/widgets/search-box/config.js +0 -48
  112. package/plugins/runtime-modules/core/widgets/search-box/server.d.ts +0 -21
  113. package/plugins/runtime-modules/search-page-references.d.ts +0 -20
  114. package/plugins/runtime-modules/search-page-references.js +0 -35
  115. /package/plugins/runtime-modules/{core → search}/widgets/search-box/plugin.d.ts +0 -0
  116. /package/plugins/runtime-modules/{core → search}/widgets/search-results/authoring.d.ts +0 -0
  117. /package/plugins/runtime-modules/{core → search}/widgets/search-results/authoring.js +0 -0
  118. /package/plugins/runtime-modules/{core → search}/widgets/search-results/client.d.ts +0 -0
  119. /package/plugins/runtime-modules/{core → search}/widgets/search-results/client.js +0 -0
  120. /package/plugins/runtime-modules/{core → search}/widgets/search-results/plugin.d.ts +0 -0
@@ -15,18 +15,37 @@ const PHI_USER_MANAGEMENT_RUNTIME_MODULE_ID = firstPartyModuleId("user-managemen
15
15
  const PHI_DASHBOARD_RUNTIME_MODULE_ID = firstPartyModuleId("dashboard");
16
16
  const PHI_NEWS_RUNTIME_MODULE_ID = firstPartyModuleId("news");
17
17
  const PHI_REVISIONS_RUNTIME_MODULE_ID = firstPartyModuleId("revisions");
18
+ /*
19
+ * The Site's search starts on where it is read (SEARCH.md): the Public header carries its magnifier and
20
+ * the App's sider its box, and both go with the Module when a Site switches it off.
21
+ */
22
+ const PHI_SEARCH_RUNTIME_MODULE_ID = firstPartyModuleId("search");
18
23
  /*
19
24
  * Conversations are a Site's communication system, so every Area with a sidebar starts with them: the
20
25
  * Area ships the Page and its sidebar offers the entry, and a default without the Module would offer an
21
26
  * entry leading nowhere. Public has neither.
22
27
  */
23
28
  const PHI_THREADS_RUNTIME_MODULE_ID = firstPartyModuleId("threads");
29
+ /*
30
+ * Tours explain the working Areas, so every Area but Public starts with the Module that runs them: the
31
+ * Pages carry their Tours either way, and without it their buttons stay hidden. Public has no Tour to give.
32
+ */
33
+ const PHI_TOUR_RUNTIME_MODULE_ID = firstPartyModuleId("tour");
24
34
  export function createPhiDefaultAreaRuntimeModuleIds(area) {
35
+ const moduleIds = listAreaRuntimeModuleIds(area);
36
+ return area === "public" ? moduleIds : [...moduleIds, PHI_TOUR_RUNTIME_MODULE_ID];
37
+ }
38
+ function listAreaRuntimeModuleIds(area) {
25
39
  if (area === "public") {
26
- return [PHI_AUTH_RUNTIME_MODULE_ID];
40
+ return [PHI_AUTH_RUNTIME_MODULE_ID, PHI_SEARCH_RUNTIME_MODULE_ID];
27
41
  }
28
42
  if (area === "app") {
29
- return [PHI_AUTH_RUNTIME_MODULE_ID, PHI_DASHBOARD_RUNTIME_MODULE_ID, PHI_THREADS_RUNTIME_MODULE_ID];
43
+ return [
44
+ PHI_AUTH_RUNTIME_MODULE_ID,
45
+ PHI_DASHBOARD_RUNTIME_MODULE_ID,
46
+ PHI_THREADS_RUNTIME_MODULE_ID,
47
+ PHI_SEARCH_RUNTIME_MODULE_ID,
48
+ ];
30
49
  }
31
50
  if (area === "builder") {
32
51
  return [
@@ -390,6 +390,14 @@ const effectsDescriptors = {
390
390
  label: label("fields.clamp", "Clamp"),
391
391
  initialValue: true,
392
392
  },
393
+ {
394
+ key: "viewportPerspectivePx",
395
+ fieldProviderKey: PHI_FORM_FIELD_PROVIDER_KEYS.number,
396
+ label: label("fields.perspective", "Perspective"),
397
+ initialValue: 800,
398
+ config: { min: 0 },
399
+ visibleWhen: formEquals("viewportProperty", "rotate"),
400
+ },
393
401
  {
394
402
  key: "viewportEffects",
395
403
  fieldProviderKey: PHI_FORM_FIELD_PROVIDER_KEYS.table,
@@ -413,6 +421,7 @@ const effectsDescriptors = {
413
421
  rangeEnd: "exit",
414
422
  easing: "linear",
415
423
  clamp: true,
424
+ perspectivePx: 800,
416
425
  },
417
426
  sourceFields: {
418
427
  property: "viewportProperty",
@@ -424,6 +433,7 @@ const effectsDescriptors = {
424
433
  rangeEnd: "viewportRangeEnd",
425
434
  easing: "viewportEasing",
426
435
  clamp: "viewportClamp",
436
+ perspectivePx: "viewportPerspectivePx",
427
437
  },
428
438
  resetFields: {
429
439
  viewportProperty: "translate",
@@ -435,6 +445,7 @@ const effectsDescriptors = {
435
445
  viewportRangeEnd: "exit",
436
446
  viewportEasing: "linear",
437
447
  viewportClamp: true,
448
+ viewportPerspectivePx: 800,
438
449
  },
439
450
  },
440
451
  remove: { enabled: true, label: "Remove viewport effect" },
@@ -1 +1 @@
1
- export declare const PHI_APP_RUNTIME_MODULE_AUTHORING_CLIENT_CONTRIBUTIONS: readonly [import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution];
1
+ export declare const PHI_APP_RUNTIME_MODULE_AUTHORING_CLIENT_CONTRIBUTIONS: readonly [import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution];
@@ -5,6 +5,7 @@ import { PHI_AUTH_RUNTIME_MODULE_ID } from "../auth/ids";
5
5
  import { PHI_GROUPS_RUNTIME_MODULE_ID } from "../groups/ids";
6
6
  import { PHI_AVATAR_RUNTIME_MODULE_ID } from "../avatar/ids";
7
7
  import { PHI_VIDEO_RUNTIME_MODULE_ID } from "../video/ids";
8
+ import { PHI_SEARCH_RUNTIME_MODULE_ID } from "../search/ids";
8
9
  import { PHI_COMMON_RUNTIME_MODULE_AUTHORING_CLIENT_CONTRIBUTIONS } from "./common";
9
10
  import { PHI_DASHBOARD_RUNTIME_MODULE_AUTHORING_CLIENT_CONTRIBUTION } from "../dashboard/authoring-client";
10
11
  export const PHI_APP_RUNTIME_MODULE_AUTHORING_CLIENT_CONTRIBUTIONS = [
@@ -25,6 +26,11 @@ export const PHI_APP_RUNTIME_MODULE_AUTHORING_CLIENT_CONTRIBUTIONS = [
25
26
  loadAuthoring: () => import("../avatar/authoring")
26
27
  .then((module) => module.PhiAvatarRuntimeModuleAuthoringClient),
27
28
  }),
29
+ definePhiRuntimeModuleAuthoringClientContribution({
30
+ moduleId: PHI_SEARCH_RUNTIME_MODULE_ID,
31
+ loadAuthoring: () => import("../search/authoring")
32
+ .then((module) => module.PhiSearchRuntimeModuleAuthoringClient),
33
+ }),
28
34
  definePhiRuntimeModuleAuthoringClientContribution({
29
35
  moduleId: PHI_VIDEO_RUNTIME_MODULE_ID,
30
36
  loadAuthoring: () => import("../video/authoring")
@@ -1 +1 @@
1
- export declare const PHI_PUBLIC_RUNTIME_MODULE_AUTHORING_CLIENT_CONTRIBUTIONS: readonly [import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution];
1
+ export declare const PHI_PUBLIC_RUNTIME_MODULE_AUTHORING_CLIENT_CONTRIBUTIONS: readonly [import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution, import("../authoring-contributions-client").PhiRuntimeModuleAuthoringClientContribution];
@@ -3,6 +3,7 @@ import { definePhiRuntimeModuleAuthoringClientContribution, } from "../authoring
3
3
  import { PHI_PUBLIC_RUNTIME_MODULE_ID } from "../public/ids";
4
4
  import { PHI_AUTH_RUNTIME_MODULE_ID } from "../auth/ids";
5
5
  import { PHI_VIDEO_RUNTIME_MODULE_ID } from "../video/ids";
6
+ import { PHI_SEARCH_RUNTIME_MODULE_ID } from "../search/ids";
6
7
  import { PHI_NEWS_RUNTIME_MODULE_ID } from "../news/ids";
7
8
  import { PHI_BLOG_RUNTIME_MODULE_ID } from "../blog/ids";
8
9
  import { PHI_COMMON_RUNTIME_MODULE_AUTHORING_CLIENT_CONTRIBUTIONS } from "./common";
@@ -18,6 +19,11 @@ export const PHI_PUBLIC_RUNTIME_MODULE_AUTHORING_CLIENT_CONTRIBUTIONS = [
18
19
  loadAuthoring: () => import("../auth/authoring")
19
20
  .then((module) => module.PhiAuthRuntimeModuleAuthoringClient),
20
21
  }),
22
+ definePhiRuntimeModuleAuthoringClientContribution({
23
+ moduleId: PHI_SEARCH_RUNTIME_MODULE_ID,
24
+ loadAuthoring: () => import("../search/authoring")
25
+ .then((module) => module.PhiSearchRuntimeModuleAuthoringClient),
26
+ }),
21
27
  definePhiRuntimeModuleAuthoringClientContribution({
22
28
  moduleId: PHI_VIDEO_RUNTIME_MODULE_ID,
23
29
  loadAuthoring: () => import("../video/authoring")
@@ -257,11 +257,11 @@ export const PHI_COMMON_RUNTIME_MODULE_RENDER_CLIENT_MANIFEST = createPhiRuntime
257
257
  ],
258
258
  [
259
259
  PhiCmsWidgetType.SearchBox,
260
- definePhiRuntimeModuleRenderClient(dynamic(() => import("../core/widgets/search-box/client").then((module) => module.PhiSearchBoxWidgetClient))),
260
+ definePhiRuntimeModuleRenderClient(dynamic(() => import("../search/widgets/search-box/client").then((module) => module.PhiSearchBoxWidgetClient))),
261
261
  ],
262
262
  [
263
263
  PhiCmsWidgetType.SearchResults,
264
- definePhiRuntimeModuleRenderClient(dynamic(() => import("../core/widgets/search-results/client").then((module) => module.PhiSearchResultsWidgetClient))),
264
+ definePhiRuntimeModuleRenderClient(dynamic(() => import("../search/widgets/search-results/client").then((module) => module.PhiSearchResultsWidgetClient))),
265
265
  ],
266
266
  [
267
267
  PhiCmsWidgetType.EntryDetail,
@@ -45,8 +45,6 @@ import { PHI_GALLERY_WIDGET_DEFINITION } from "./widgets/gallery/config";
45
45
  import { PHI_STEPS_WIDGET_DEFINITION } from "./widgets/steps/config";
46
46
  import { PHI_TIMELINE_WIDGET_DEFINITION } from "./widgets/timeline/config";
47
47
  import { PHI_ENTRY_LIST_WIDGET_DEFINITION } from "./widgets/entry-list/config";
48
- import { PHI_SEARCH_BOX_WIDGET_DEFINITION } from "./widgets/search-box/config";
49
- import { PHI_SEARCH_RESULTS_WIDGET_DEFINITION } from "./widgets/search-results/config";
50
48
  import { PHI_ENTRY_DETAIL_WIDGET_DEFINITION } from "./widgets/entry-detail/config";
51
49
  import { PHI_ENTRY_HEADER_WIDGET_DEFINITION } from "./widgets/entry-header/config";
52
50
  import { PHI_THREAD_CONVERSATION_WIDGET_DEFINITION } from "./widgets/thread-conversation/config";
@@ -105,8 +103,6 @@ export default createPhiAuthoringWidgetModule([
105
103
  definePhiAuthoringWidgetModuleLoader(PHI_GALLERY_WIDGET_DEFINITION, () => import("./widgets/gallery/authoring").then((module) => module.PHI_GALLERY_WIDGET_BUILDER_PLUGIN)),
106
104
  definePhiAuthoringWidgetModuleLoader(PHI_STEPS_WIDGET_DEFINITION, () => import("./widgets/steps/authoring").then((module) => module.PHI_STEPS_WIDGET_BUILDER_PLUGIN)),
107
105
  definePhiAuthoringWidgetModuleLoader(PHI_TIMELINE_WIDGET_DEFINITION, () => import("./widgets/timeline/authoring").then((module) => module.PHI_TIMELINE_WIDGET_BUILDER_PLUGIN)),
108
- definePhiAuthoringWidgetModuleLoader(PHI_SEARCH_BOX_WIDGET_DEFINITION, () => import("./widgets/search-box/authoring").then((module) => module.PHI_SEARCH_BOX_WIDGET_BUILDER_PLUGIN)),
109
- definePhiAuthoringWidgetModuleLoader(PHI_SEARCH_RESULTS_WIDGET_DEFINITION, () => import("./widgets/search-results/authoring").then((module) => module.PHI_SEARCH_RESULTS_WIDGET_BUILDER_PLUGIN)),
110
106
  definePhiAuthoringWidgetModuleLoader(PHI_ENTRY_LIST_WIDGET_DEFINITION, () => import("./widgets/entry-list/authoring").then((module) => module.PHI_ENTRY_LIST_WIDGET_BUILDER_PLUGIN)),
111
107
  definePhiAuthoringWidgetModuleLoader(PHI_ENTRY_DETAIL_WIDGET_DEFINITION, () => import("./widgets/entry-detail/authoring").then((module) => module.PHI_ENTRY_DETAIL_WIDGET_BUILDER_PLUGIN)),
112
108
  definePhiAuthoringWidgetModuleLoader(PHI_ENTRY_HEADER_WIDGET_DEFINITION, () => import("./widgets/entry-header/authoring").then((module) => module.PHI_ENTRY_HEADER_WIDGET_BUILDER_PLUGIN)),
@@ -245,7 +245,7 @@ export function PhiAssetCollectionViewBinding({ config, binding, labels: rawLabe
245
245
  const display = action.display ?? "icon";
246
246
  const label = action.label ?? (action.key === "upload" ? labels.tool.uploadToggleLabel : action.key);
247
247
  return (_jsx(PhiButtonControl, { label: display === "icon" ? undefined : label, ariaLabel: label, tooltip: action.description, icon: display === "label" || !action.icon ? undefined : resolvePhiButtonIcon(action.icon), type: action.mode === "primary" ? "primary" : "default", danger: action.mode === "danger", size: controlSize, onClick: action.key === "upload" ? () => binding.setOpenPanelKey(state.uploadPanelOpen ? null : "upload") : undefined }, action.key));
248
- }), features.tools.reset ? (_jsx(PhiButtonControl, { ariaLabel: labels.tool.resetLabel, tooltip: labels.tool.resetLabel, icon: resolvePhiButtonIcon("antd:clear-outlined"), size: controlSize, onClick: () => binding.setQuery({
248
+ }), features.tools.reset ? (_jsx(PhiButtonControl, { ariaLabel: labels.tool.resetLabel, tooltip: labels.tool.resetLabel, icon: resolvePhiButtonIcon("antd:rollback-outlined"), size: controlSize, onClick: () => binding.setQuery({
249
249
  ...(config.initialQuery ?? {}),
250
250
  page: config.initialQuery?.page ?? 1,
251
251
  pageSize: config.initialQuery?.pageSize ?? features.pagination?.pageSize ?? 20,
@@ -67,5 +67,5 @@ export function PhiMarkdownTocWidgetClient({ config }) {
67
67
  overflowY: "auto",
68
68
  overflowX: "hidden",
69
69
  minWidth: 0,
70
- }, children: _jsxs("div", { style: { display: "grid", gap: token.paddingSM, width: "100%", minWidth: 0 }, children: [showTitle ? (_jsx(PhiTypographyControl, { strong: true, style: { color: token.colorTextHeading }, children: title })) : null, headings.length > 0 ? (_jsx(PhiAnchorNavControl, { offsetTop: config?.offsetTop ?? 0, items: buildAnchorItems(headings, token.paddingSM), style: { width: "100%" } })) : (_jsx(PhiEmptyControl, { description: "No markdown headings" }))] }) }));
70
+ }, children: _jsxs("div", { style: { display: "grid", gap: token.paddingSM, width: "100%", minWidth: 0 }, children: [showTitle ? (_jsx(PhiTypographyControl, { strong: true, style: { color: token.colorTextHeading, paddingInlineStart: token.lineWidthBold + token.padding }, children: title })) : null, headings.length > 0 ? (_jsx(PhiAnchorNavControl, { offsetTop: config?.offsetTop ?? 0, items: buildAnchorItems(headings, token.paddingSM), style: { width: "100%" } })) : (_jsx(PhiEmptyControl, { description: "No markdown headings" }))] }) }));
71
71
  }
@@ -4,7 +4,7 @@ import { PHI_TABLE_WIDGET_DEFAULT_LABELS } from "../../../../../components/widge
4
4
  import { formatPhiTableWidgetLabel } from "../../../../../components/widgets/label-types/table";
5
5
  import { PhiNameControl } from "../../../../../components/controls/phi-name-control";
6
6
  import { PhiDescriptionHint } from "../../../../../components/controls/phi-description-tooltip-icon";
7
- import { Fragment, useCallback, useEffect, useEffectEvent, useMemo, useRef, useState } from "react";
7
+ import { useCallback, useEffect, useEffectEvent, useMemo, useRef, useState } from "react";
8
8
  import { PhiMultiSelectControl } from "../../../../../components/controls/phi-multi-select-control";
9
9
  import { PhiAlertControl } from "../../../../../components/controls/phi-alert-control";
10
10
  import { PhiWidgetFailure } from "../../../../../components/widgets/shared/widget-failure-client";
@@ -760,13 +760,15 @@ export function PhiTableWidgetClient({ config: inputConfig, renderMode, external
760
760
  filters: updateTableQueryFilters(current.filters, filter, value),
761
761
  }));
762
762
  } }));
763
+ // The description goes where every Control's goes: behind the glyph after a shown label, and
764
+ // as the Control's own hover text where the label is dropped.
763
765
  if (filter.labelPlacement === "none") {
764
- return _jsx(Fragment, { children: control }, filter.key);
766
+ return _jsx(PhiLabeledControl, { description: filter.description, children: control }, filter.key);
765
767
  }
766
768
  if (filter.labelPlacement === "inline") {
767
- return _jsx(PhiLabeledControl, { label: filter.label, children: control }, filter.key);
769
+ return _jsx(PhiLabeledControl, { label: filter.label, description: filter.description, children: control }, filter.key);
768
770
  }
769
- return (_jsxs(PhiFlexControl, { vertical: true, gap: "small", children: [_jsx(PhiTypographyControl, { type: "secondary", children: filter.label }), control] }, filter.key));
771
+ return (_jsxs(PhiFlexControl, { vertical: true, gap: "small", children: [_jsxs(PhiFlexControl, { align: "center", gap: token.paddingXXS, children: [_jsx(PhiTypographyControl, { type: "secondary", children: filter.label }), filter.description ? _jsx(PhiDescriptionHint, { description: filter.description }) : null] }), control] }, filter.key));
770
772
  }), features.search?.enabled ? (_jsx(PhiTextControl, { inputType: "search", allowClear: true, placeholder: features.search.placeholder ?? labels.search, value: searchDraft, size: resolvedControlSize, onChange: (value) => setSearchDraft(value ?? ""), style: { width: 260 } })) : null] })) : null;
771
773
  const collectionToolbar = hasSelfContainedTools && (toolbarActions.length > 0 ||
772
774
  bulkActions.length > 0 ||
@@ -781,7 +783,7 @@ export function PhiTableWidgetClient({ config: inputConfig, renderMode, external
781
783
  return null;
782
784
  const disabled = findMatchingCondition(null, action.disabledWhen, conditionSources);
783
785
  return _jsx(TableAction, { action: action, size: resolvedControlSize, disabled: selectedRowIdentities.length === 0 || Boolean(disabled), disabledReason: disabled && "reason" in disabled ? disabled.reason : undefined, templateValue: selectedRowIdentities.length, onActivate: () => activateAction(action, undefined, selectedRowIdentities) }, action.key);
784
- }), hasQueryTools && features.tools?.reset !== false ? (_jsx(PhiButtonControl, { icon: _jsx(PhiIcon, { name: "clear-outlined", size: "inherit" }), ariaLabel: labels.reset, tooltip: labels.reset, size: resolvedControlSize, onClick: resetQuery })) : null, features.tools?.reload ? (_jsx(PhiButtonControl, { icon: _jsx(PhiIcon, { name: "reload", size: "inherit" }), ariaLabel: labels.reload, tooltip: labels.reload, size: resolvedControlSize, onClick: reload })) : null] })) : null;
786
+ }), hasQueryTools && features.tools?.reset !== false ? (_jsx(PhiButtonControl, { icon: _jsx(PhiIcon, { name: "rollback-outlined", size: "inherit" }), ariaLabel: labels.reset, tooltip: labels.reset, size: resolvedControlSize, onClick: resetQuery })) : null, features.tools?.reload ? (_jsx(PhiButtonControl, { icon: _jsx(PhiIcon, { name: "reload", size: "inherit" }), ariaLabel: labels.reload, tooltip: labels.reload, size: resolvedControlSize, onClick: reload })) : null] })) : null;
785
787
  /*
786
788
  * The source's failures end the Table here: a binding that does not hold, a resource the
787
789
  * configuration does not fit, a read that failed. A refused edit is not one of them -- it stays in
@@ -125,7 +125,7 @@ const PHI_TABLE_COLUMN_RENDERERS = [
125
125
  "text", "email", "date", "datetime", "badge", "tags", "link", "code", "json", "switch", "checkbox", "icon",
126
126
  ];
127
127
  const PHI_TABLE_COLUMN_EDITOR_CONTROLS = [
128
- "switch", "checkbox", "select", "radio", "segmented", "multi-select", "checkbox-group", "icon-picker",
128
+ "switch", "checkbox", "select", "radio", "segmented", "multi-select", "checkbox-group", "icon-picker", "textarea",
129
129
  ];
130
130
  const PHI_TABLE_ALIGNS = ["left", "center", "right"];
131
131
  function readCondition(reader, key) {
@@ -269,6 +269,7 @@ function readFilter(reader) {
269
269
  const key = requireString(reader, "key");
270
270
  const label = requireString(reader, "label");
271
271
  const labelPlacement = reader.oneOf("labelPlacement", ["inline", "none"]);
272
+ const description = reader.string("description");
272
273
  const type = reader.oneOf("type", ["text", "select", "boolean", "dateRange"]) ?? "text";
273
274
  if (type === "select") {
274
275
  return {
@@ -276,6 +277,7 @@ function readFilter(reader) {
276
277
  type,
277
278
  label,
278
279
  labelPlacement,
280
+ description,
279
281
  multiple: reader.boolean("multiple"),
280
282
  options: reader.list("options", (optionReader) => ({
281
283
  label: requireString(optionReader, "label"),
@@ -295,6 +297,7 @@ function readFilter(reader) {
295
297
  control: reader.oneOf("control", ["switch"]),
296
298
  label,
297
299
  labelPlacement,
300
+ description,
298
301
  defaultValue: reader.boolean("defaultValue"),
299
302
  };
300
303
  }
@@ -304,6 +307,7 @@ function readFilter(reader) {
304
307
  type,
305
308
  label,
306
309
  labelPlacement,
310
+ description,
307
311
  startKey: requireString(reader, "startKey"),
308
312
  endKey: requireString(reader, "endKey"),
309
313
  startPlaceholder: reader.string("startPlaceholder"),
@@ -319,6 +323,7 @@ function readFilter(reader) {
319
323
  type,
320
324
  label,
321
325
  labelPlacement,
326
+ description,
322
327
  placeholder: reader.string("placeholder"),
323
328
  defaultValue: reader.string("defaultValue"),
324
329
  };
@@ -698,6 +703,7 @@ export const PHI_TABLE_WIDGET_DEFINITION = {
698
703
  { value: "multi-select", label: "Multi-select" },
699
704
  { value: "checkbox-group", label: "Checkbox group" },
700
705
  { value: "icon-picker", label: "Icon picker" },
706
+ { value: "textarea", label: "Text area" },
701
707
  ],
702
708
  },
703
709
  // The unit beside a number editor; the column title names the value, not its unit.
@@ -736,6 +742,7 @@ export const PHI_TABLE_WIDGET_DEFINITION = {
736
742
  { value: "dateRange", label: "Date Range" },
737
743
  ],
738
744
  },
745
+ { key: "description", type: "string", label: "Description" },
739
746
  { key: "placeholder", type: "string", label: "Placeholder", visibleWhen: { field: "type", equals: "text" } },
740
747
  { key: "defaultValue", type: "string", label: "Default", visibleWhen: { field: "type", equals: "text" } },
741
748
  { key: "multiple", type: "boolean", label: "Multiple", visibleWhen: { field: "type", equals: "select" } },
@@ -184,7 +184,7 @@ export function PhiTreeWidgetClient({ config, labels, renderMode }) {
184
184
  const toolbar = selfContained && ((config.features.actions?.selection?.length ?? 0) > 0 ||
185
185
  (config.features.actions?.toolbar?.length ?? 0) > 0 ||
186
186
  hasResettableQuery && tools?.reset !== false ||
187
- tools?.reload === true) ? (_jsxs(PhiToolbarControl, { size: controlSize, compact: true, children: [(config.features.actions?.toolbar ?? []).map((action) => (_jsx(PhiTreeActionButton, { action: action, size: controlSize, onActivate: () => activate(action) }, action.key))), (config.features.actions?.selection ?? []).map((action) => (_jsx(PhiTreeActionButton, { action: action, size: controlSize, disabled: binding.selectedNodeIdentities.length === 0, onActivate: () => activate(action) }, action.key))), hasResettableQuery && tools?.reset !== false ? (_jsx(PhiButtonControl, { icon: _jsx(PhiIcon, { name: "clear-outlined", size: "inherit" }), ariaLabel: labels.reset, tooltip: labels.reset, size: controlSize, onClick: resetTools })) : null, tools?.reload ? (_jsx(PhiButtonControl, { icon: _jsx(PhiIcon, { name: "reload", size: "inherit" }), ariaLabel: labels.reload, tooltip: labels.reload, size: controlSize, onClick: binding.reload })) : null] })) : null;
187
+ tools?.reload === true) ? (_jsxs(PhiToolbarControl, { size: controlSize, compact: true, children: [(config.features.actions?.toolbar ?? []).map((action) => (_jsx(PhiTreeActionButton, { action: action, size: controlSize, onActivate: () => activate(action) }, action.key))), (config.features.actions?.selection ?? []).map((action) => (_jsx(PhiTreeActionButton, { action: action, size: controlSize, disabled: binding.selectedNodeIdentities.length === 0, onActivate: () => activate(action) }, action.key))), hasResettableQuery && tools?.reset !== false ? (_jsx(PhiButtonControl, { icon: _jsx(PhiIcon, { name: "rollback-outlined", size: "inherit" }), ariaLabel: labels.reset, tooltip: labels.reset, size: controlSize, onClick: resetTools })) : null, tools?.reload ? (_jsx(PhiButtonControl, { icon: _jsx(PhiIcon, { name: "reload", size: "inherit" }), ariaLabel: labels.reload, tooltip: labels.reload, size: controlSize, onClick: binding.reload })) : null] })) : null;
188
188
  /*
189
189
  * The source's failures end the Tree here: a binding that does not hold, a resource the configuration
190
190
  * does not fit, a read that failed. A refused change stays in `binding.error` alone, said above the
@@ -45,8 +45,6 @@ import { PHI_GALLERY_WIDGET_DEFINITION } from "./widgets/gallery/config";
45
45
  import { PHI_STEPS_WIDGET_DEFINITION } from "./widgets/steps/config";
46
46
  import { PHI_TIMELINE_WIDGET_DEFINITION } from "./widgets/timeline/config";
47
47
  import { PHI_ENTRY_LIST_WIDGET_DEFINITION } from "./widgets/entry-list/config";
48
- import { PHI_SEARCH_BOX_WIDGET_DEFINITION } from "./widgets/search-box/config";
49
- import { PHI_SEARCH_RESULTS_WIDGET_DEFINITION } from "./widgets/search-results/config";
50
48
  import { PHI_ENTRY_DETAIL_WIDGET_DEFINITION } from "./widgets/entry-detail/config";
51
49
  import { PHI_ENTRY_HEADER_WIDGET_DEFINITION } from "./widgets/entry-header/config";
52
50
  import { PHI_THREAD_CONVERSATION_WIDGET_DEFINITION } from "./widgets/thread-conversation/config";
@@ -371,21 +369,6 @@ export const PHI_RUNTIME_MODULE_WIDGETS = [
371
369
  loadRuntime: () => import("./widgets/timeline/plugin").then((module) => module.PHI_TIMELINE_WIDGET_PLUGIN),
372
370
  loadPreview: () => import("./widgets/timeline/plugin").then((module) => module.PHI_TIMELINE_WIDGET_PLUGIN),
373
371
  }),
374
- // The Site's own search (SEARCH.md): the box a visitor types into and the Page that answers it.
375
- definePhiFirstPartyWidget({
376
- definition: PHI_SEARCH_BOX_WIDGET_DEFINITION,
377
- ownerModuleId: PHI_CORE_RUNTIME_MODULE_ID,
378
- renderPolicies: { "runtime": "custom", "preview": "custom", "authoring": "custom" },
379
- loadRuntime: () => import("./widgets/search-box/plugin").then((module) => module.PHI_SEARCH_BOX_WIDGET_PLUGIN),
380
- loadPreview: () => import("./widgets/search-box/plugin").then((module) => module.PHI_SEARCH_BOX_WIDGET_PLUGIN),
381
- }),
382
- definePhiFirstPartyWidget({
383
- definition: PHI_SEARCH_RESULTS_WIDGET_DEFINITION,
384
- ownerModuleId: PHI_CORE_RUNTIME_MODULE_ID,
385
- renderPolicies: { "runtime": "custom", "preview": "custom", "authoring": "custom" },
386
- loadRuntime: () => import("./widgets/search-results/plugin").then((module) => module.PHI_SEARCH_RESULTS_WIDGET_PLUGIN),
387
- loadPreview: () => import("./widgets/search-results/plugin").then((module) => module.PHI_SEARCH_RESULTS_WIDGET_PLUGIN),
388
- }),
389
372
  // A content kind's entries and one entry of it, for every kind's Module (`CONTENT_ENTRIES.md`).
390
373
  definePhiFirstPartyWidget({
391
374
  definition: PHI_ENTRY_LIST_WIDGET_DEFINITION,
@@ -0,0 +1,44 @@
1
+ import type { PhiTableActionDefinition, PhiTableColumnDefinition, PhiTableFooterConfig, PhiTableToolsConfig, PhiTableWidgetFeatures, PhiTableWidgetPresentation } from "../../../../types/table-widget";
2
+ import type { PhiProviderResourceSource } from "../../../../types/runtime-data-provider";
3
+ import type { getPhiGroupFormLabels } from "../labels";
4
+ type PhiGroupLabels = Awaited<ReturnType<typeof getPhiGroupFormLabels>>;
5
+ type PhiGroupRowCondition = {
6
+ valuePath: string;
7
+ operator: "truthy" | "falsy";
8
+ };
9
+ /** A membership level as the word the reader knows it by, for a badge and for the level editor. */
10
+ export declare function buildPhiGroupLevelValueMap(labels: PhiGroupLabels): Record<string, string>;
11
+ /** The switches someone who manages a group sets on it, each with its hint behind the heading. */
12
+ export declare function buildPhiGroupSettingColumns(labels: PhiGroupLabels): PhiTableColumnDefinition[];
13
+ /** How many groups the list holds, under it. */
14
+ export declare function buildPhiGroupsFooter(labels: PhiGroupLabels): PhiTableFooterConfig;
15
+ /**
16
+ * Ending a group, from its row. `blockedWhen` names what makes a row one this reader cannot end -- the
17
+ * two Pages differ in that and in nothing else about the action.
18
+ */
19
+ export declare function buildPhiGroupRetireAction(labels: PhiGroupLabels, blockedWhen: readonly PhiGroupRowCondition[]): PhiTableActionDefinition;
20
+ /**
21
+ * The members of the selected group: source, presentation and features of the Table. The Page adds
22
+ * its own signal routes, because whom the Table speaks to is the Page's arrangement.
23
+ *
24
+ * `audience` is the one real difference. `colleagues` is what a member sees of the others -- a name, a
25
+ * level, the company where the group shows it; no address and no source, because a colleague is
26
+ * recognized by name and where a membership comes from is an administration question. There a row may
27
+ * be removed where the control plane says this reader administers the group (`manageable`).
28
+ * `administration` adds address, source and date, and removes any membership the Site itself holds
29
+ * (`local`); one a Directory contributes is read here and changed at its source.
30
+ *
31
+ * The level is edited in the cell it is read in on both: the provider states per row, through the
32
+ * field's `mutableWhen`, whether this reader may -- a member sees the same table without an editor.
33
+ */
34
+ export declare function buildPhiGroupMembersTable({ labels, audience, tools, toolbar, }: {
35
+ labels: PhiGroupLabels;
36
+ audience: "colleagues" | "administration";
37
+ tools?: PhiTableToolsConfig;
38
+ toolbar?: PhiTableActionDefinition[];
39
+ }): {
40
+ source: PhiProviderResourceSource;
41
+ presentation: PhiTableWidgetPresentation;
42
+ features: PhiTableWidgetFeatures;
43
+ };
44
+ export {};
@@ -0,0 +1,150 @@
1
+ import { PhiGroupMembershipFlags } from "../../../../constants/site-groups";
2
+ import { PHI_GROUPS_RUNTIME_DATA_PROVIDER_KEYS } from "../ids";
3
+ /** A membership level as the word the reader knows it by, for a badge and for the level editor. */
4
+ export function buildPhiGroupLevelValueMap(labels) {
5
+ return {
6
+ [String(PhiGroupMembershipFlags.Member)]: labels.levels.member,
7
+ [String(PhiGroupMembershipFlags.Author)]: labels.levels.author,
8
+ [String(PhiGroupMembershipFlags.Editor)]: labels.levels.editor,
9
+ [String(PhiGroupMembershipFlags.Manager)]: labels.levels.manager,
10
+ };
11
+ }
12
+ /** The switches someone who manages a group sets on it, each with its hint behind the heading. */
13
+ export function buildPhiGroupSettingColumns(labels) {
14
+ const setting = (key, title, description) => ({
15
+ key,
16
+ fieldKey: key,
17
+ title,
18
+ description,
19
+ renderer: "switch",
20
+ editor: { control: "switch" },
21
+ sizing: { mode: "content" },
22
+ });
23
+ return [
24
+ setting("showMemberCompany", labels.columns.showCompany, labels.columns.showCompanyHint),
25
+ setting("threads", labels.columns.threads, labels.columns.threadsHint),
26
+ setting("crossGroupThreads", labels.columns.crossGroupThreads, labels.columns.crossGroupThreadsHint),
27
+ ];
28
+ }
29
+ /** How many groups the list holds, under it. */
30
+ export function buildPhiGroupsFooter(labels) {
31
+ return {
32
+ template: labels.groups.footer,
33
+ values: [{ key: "groups", value: { source: "core", fieldKey: "totalRows" } }],
34
+ align: "start",
35
+ };
36
+ }
37
+ /**
38
+ * Ending a group, from its row. `blockedWhen` names what makes a row one this reader cannot end -- the
39
+ * two Pages differ in that and in nothing else about the action.
40
+ */
41
+ export function buildPhiGroupRetireAction(labels, blockedWhen) {
42
+ return {
43
+ key: "retire",
44
+ label: labels.actions.retire,
45
+ icon: "antd:stop",
46
+ display: "icon",
47
+ mode: "danger",
48
+ execution: "provider",
49
+ disabledWhen: {
50
+ match: "any",
51
+ conditions: blockedWhen.map((condition) => ({
52
+ source: "row",
53
+ ...condition,
54
+ reason: labels.actions.retire,
55
+ })),
56
+ },
57
+ confirm: {
58
+ title: labels.actions.retireConfirmTitle,
59
+ description: labels.actions.retireConfirmText,
60
+ okText: labels.actions.retireConfirmOk,
61
+ cancelText: labels.actions.removeConfirmCancel,
62
+ },
63
+ };
64
+ }
65
+ /**
66
+ * The members of the selected group: source, presentation and features of the Table. The Page adds
67
+ * its own signal routes, because whom the Table speaks to is the Page's arrangement.
68
+ *
69
+ * `audience` is the one real difference. `colleagues` is what a member sees of the others -- a name, a
70
+ * level, the company where the group shows it; no address and no source, because a colleague is
71
+ * recognized by name and where a membership comes from is an administration question. There a row may
72
+ * be removed where the control plane says this reader administers the group (`manageable`).
73
+ * `administration` adds address, source and date, and removes any membership the Site itself holds
74
+ * (`local`); one a Directory contributes is read here and changed at its source.
75
+ *
76
+ * The level is edited in the cell it is read in on both: the provider states per row, through the
77
+ * field's `mutableWhen`, whether this reader may -- a member sees the same table without an editor.
78
+ */
79
+ export function buildPhiGroupMembersTable({ labels, audience, tools, toolbar, }) {
80
+ const administration = audience === "administration";
81
+ const columns = [
82
+ { key: "displayName", fieldKey: "displayName", title: labels.columns.name, sizing: { mode: "fill", minWidth: 200 } },
83
+ administration
84
+ ? { key: "email", fieldKey: "email", title: labels.columns.email, sizing: { mode: "content" } }
85
+ : { key: "companyName", fieldKey: "companyName", title: labels.columns.company, sizing: { mode: "content" } },
86
+ {
87
+ key: "membershipFlags",
88
+ fieldKey: "membershipFlags",
89
+ title: labels.columns.level,
90
+ renderer: "badge",
91
+ valueMap: buildPhiGroupLevelValueMap(labels),
92
+ editor: { control: "select" },
93
+ sizing: { mode: "content" },
94
+ },
95
+ ...(administration ? [
96
+ { key: "sourceProviderId", fieldKey: "sourceProviderId", title: labels.columns.source, renderer: "badge", sizing: { mode: "content" } },
97
+ { key: "createdAt", fieldKey: "createdAt", title: labels.columns.since, renderer: "datetime", sizing: { mode: "content" } },
98
+ ] : []),
99
+ ];
100
+ return {
101
+ source: {
102
+ providerKey: PHI_GROUPS_RUNTIME_DATA_PROVIDER_KEYS.table,
103
+ resourceKey: "groupMembers",
104
+ },
105
+ presentation: {
106
+ title: labels.members.title,
107
+ description: labels.members.description,
108
+ layout: { mode: "auto", overflowX: "auto" },
109
+ controlSize: "small",
110
+ columns,
111
+ emptyState: { title: labels.members.empty, description: "" },
112
+ footer: {
113
+ template: labels.members.footer,
114
+ values: [{ key: "members", value: { source: "core", fieldKey: "totalRows" } }],
115
+ align: "start",
116
+ },
117
+ },
118
+ features: {
119
+ pagination: { enabled: true, pageSize: 25, pageSizes: [25, 50, 100] },
120
+ sorting: { mode: "none" },
121
+ search: { enabled: false },
122
+ ...(tools ? { tools } : {}),
123
+ editing: { mode: "cell" },
124
+ actions: {
125
+ rowLayout: "compact",
126
+ ...(toolbar ? { toolbar } : {}),
127
+ row: [{
128
+ key: "delete",
129
+ label: labels.actions.remove,
130
+ icon: "antd:delete",
131
+ display: "icon",
132
+ mode: "danger",
133
+ execution: "provider",
134
+ disabledWhen: { match: "any", conditions: [{
135
+ source: "row",
136
+ valuePath: administration ? "local" : "manageable",
137
+ operator: "falsy",
138
+ reason: labels.actions.remove,
139
+ }] },
140
+ confirm: {
141
+ title: labels.actions.removeConfirmTitle,
142
+ description: labels.actions.removeConfirmText,
143
+ okText: labels.actions.removeConfirmOk,
144
+ cancelText: labels.actions.removeConfirmCancel,
145
+ },
146
+ }],
147
+ },
148
+ },
149
+ };
150
+ }