@phis/ui 0.6.0 → 0.6.2

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 (92) hide show
  1. package/components/controls/phi-form-control.d.ts +6 -0
  2. package/components/controls/phi-form-control.js +23 -7
  3. package/components/controls/phi-media-picker-control.d.ts +3 -1
  4. package/components/controls/phi-media-picker-control.js +2 -2
  5. package/components/forms/form-descriptor-runtime-client.d.ts +3 -1
  6. package/components/forms/form-descriptor-runtime-client.js +2 -2
  7. package/components/forms/form-field-provider-modules.d.ts +23 -0
  8. package/components/forms/form-field-provider-modules.js +28 -0
  9. package/components/forms/form-provider-contract.d.ts +7 -0
  10. package/components/forms/form-provider-contract.js +7 -0
  11. package/components/forms/lazy-form-field-control.d.ts +14 -0
  12. package/components/forms/lazy-form-field-control.js +35 -0
  13. package/components/forms/phi-form-widget.d.ts +3 -2
  14. package/components/forms/phi-form-widget.js +21 -3
  15. package/components/forms/shared-form-provider-registry.js +1 -33
  16. package/components/media/phi-area-upload-widget.js +6 -58
  17. package/components/media/phi-media-picker-binding.d.ts +16 -1
  18. package/components/media/phi-media-picker-binding.js +3 -2
  19. package/components/media/phi-media-upload.d.ts +12 -0
  20. package/components/media/phi-media-upload.js +22 -0
  21. package/components/media/phi-upload-drop-area.d.ts +22 -0
  22. package/components/media/phi-upload-drop-area.js +49 -0
  23. package/components/widgets/helpers/semantic-html-translation.d.ts +4 -1
  24. package/components/widgets/helpers/semantic-html-translation.js +4 -2
  25. package/components/widgets/label-sets/admin-users.d.ts +9 -1
  26. package/components/widgets/label-sets/admin-users.js +14 -2
  27. package/components/widgets/label-sets/slot-upload.js +6 -3
  28. package/components/widgets/label-types/slot-upload.d.ts +7 -1
  29. package/components/widgets/label-types/slot-upload.js +2 -1
  30. package/components/widgets/shared/markdown-render.js +6 -6
  31. package/constants/media-library-provider-keys.d.ts +9 -0
  32. package/constants/media-library-provider-keys.js +9 -0
  33. package/constants/runtime-module-ownership.js +2 -0
  34. package/controls.d.ts +2 -0
  35. package/controls.js +1 -0
  36. package/gateway/signet-route.js +11 -6
  37. package/helpers/phi-signet-head.d.ts +4 -3
  38. package/helpers/phi-signet-head.js +17 -5
  39. package/helpers/phi-signet.d.ts +12 -0
  40. package/helpers/phi-signet.js +11 -0
  41. package/net/phi-next-proxy.d.ts +10 -8
  42. package/net/phi-next-proxy.js +27 -84
  43. package/next/proxy-runtime.js +15 -0
  44. package/next/site-proxy.js +5 -0
  45. package/package.json +1 -1
  46. package/plugins/runtime-modules/asset/definition.d.ts +44 -2
  47. package/plugins/runtime-modules/asset/definition.js +5 -2
  48. package/plugins/runtime-modules/asset/form-providers.d.ts +63 -0
  49. package/plugins/runtime-modules/asset/form-providers.js +54 -0
  50. package/plugins/runtime-modules/asset/form-ui-provider.js +13 -3
  51. package/plugins/runtime-modules/asset/media-asset-field.d.ts +20 -0
  52. package/plugins/runtime-modules/asset/media-asset-field.js +33 -0
  53. package/plugins/runtime-modules/asset/media-asset-form-control.d.ts +21 -0
  54. package/plugins/runtime-modules/asset/media-asset-form-control.js +74 -0
  55. package/plugins/runtime-modules/builder/clients/pages-workspace.js +4 -4
  56. package/plugins/runtime-modules/builder/controller/draft-command-controller.js +2 -2
  57. package/plugins/runtime-modules/builder/controller/page-controller.js +5 -5
  58. package/plugins/runtime-modules/builder/persistence.js +4 -4
  59. package/plugins/runtime-modules/builder/region-keys.d.ts +10 -0
  60. package/plugins/runtime-modules/builder/region-keys.js +10 -0
  61. package/plugins/runtime-modules/core/widgets/html/server.js +1 -1
  62. package/plugins/runtime-modules/core/widgets/slot-upload/client.js +28 -23
  63. package/plugins/runtime-modules/core/widgets/slot-upload/slot.d.ts +19 -0
  64. package/plugins/runtime-modules/core/widgets/slot-upload/slot.js +16 -0
  65. package/plugins/runtime-modules/resolver.js +38 -4
  66. package/plugins/runtime-modules/user-management/addon-roles.d.ts +35 -0
  67. package/plugins/runtime-modules/user-management/addon-roles.js +76 -0
  68. package/plugins/runtime-modules/user-management/cards.js +1 -1
  69. package/plugins/runtime-modules/user-management/client-data-providers.js +6 -0
  70. package/plugins/runtime-modules/user-management/data-providers.d.ts +11 -2
  71. package/plugins/runtime-modules/user-management/data-providers.js +12 -1
  72. package/plugins/runtime-modules/user-management/definition.d.ts +11 -2
  73. package/plugins/runtime-modules/user-management/ids.d.ts +1 -0
  74. package/plugins/runtime-modules/user-management/ids.js +1 -0
  75. package/plugins/runtime-modules/user-management/services/options.d.ts +8 -0
  76. package/plugins/runtime-modules/user-management/services/options.js +25 -0
  77. package/plugins/runtime-modules/user-management/services/table.js +9 -1
  78. package/plugins/runtime-modules/user-management/trees/phi-default-admin-users-page-tree.js +20 -2
  79. package/server-helpers/cms-widget-texts.js +1 -1
  80. package/server-helpers/search-index.js +29 -19
  81. package/server-helpers/search-text.d.ts +3 -2
  82. package/server-helpers/search-text.js +6 -5
  83. package/server-helpers/site-build-id.d.ts +25 -0
  84. package/server-helpers/site-build-id.js +27 -0
  85. package/server-helpers/translate.d.ts +13 -2
  86. package/server-helpers/translate.js +10 -6
  87. package/theme/phi-theme-signet.d.ts +6 -0
  88. package/theme/phi-theme-signet.js +37 -1
  89. package/theme/phi-tokens.d.ts +1 -1
  90. package/theme/phi-tokens.js +5 -1
  91. package/types/cms-plugins.d.ts +10 -1
  92. package/types/site-theme.d.ts +14 -2
@@ -5,7 +5,7 @@ import { usePhiConfirmDialog } from "../../../../components/controls/phi-confirm
5
5
  import { formatPhiHistoryMoveMessage, } from "../../../../components/widgets/label-types/history";
6
6
  import { usePhiApplicationFeedback } from "../../../../components/runtime/use-phi-application-feedback";
7
7
  import { createPhiDefaultAreaRuntimeModuleIds } from "../../area-module-defaults";
8
- import { getPhiBuilderRegionDraftKey } from "../region-keys";
8
+ import { getPhiBuilderPageDraftKey } from "../region-keys";
9
9
  import { resolvePhiBuilderCmsStoragePath } from "../../../../helpers/cms-paths";
10
10
  import { resolvePhiBuilderActivePageCatalog, resolvePhiBuilderActivePageKey, resolvePhiBuilderPagePresetSource, } from "../../../../helpers/cms-page-catalog";
11
11
  import { deleteCmsDraft } from "../../../../helpers/cms-draft-delete";
@@ -388,7 +388,7 @@ export function usePhiBuilderDraftCommandController({ effectiveArea, effectiveNa
388
388
  pageKey: effectivePageKey,
389
389
  title: "",
390
390
  });
391
- const pageDeleteDraftKey = getPhiBuilderRegionDraftKey(effectiveArea, "page_delete", effectivePageKey);
391
+ const pageDeleteDraftKey = getPhiBuilderPageDraftKey(effectiveArea, "page_delete", effectivePageKey);
392
392
  mergePhiDeveloperRegionDrafts(nextDrafts);
393
393
  markPhiBuilderPageDeleted(pageDeleteDraftKey);
394
394
  const result = await savePhiDeveloperBuilderDraft({
@@ -17,7 +17,7 @@ import { describePhiBuilderModuleAddressConflict, describePhiBuilderPageAddressC
17
17
  import { PHI_BUILDER_AREA_SEARCH_PARAM, PHI_BUILDER_PAGE_SEARCH_PARAM, } from "../../../../helpers/cms-scope-search-params";
18
18
  import { PHI_BUILDER_PREVIEW_SEARCH_PARAM } from "../preview-transport";
19
19
  import { mergePhiDeveloperRegionDrafts, openPhiBuilderPage, setPhiBuilderPageMetaDraft, startPhiBuilderNewPageDrafts, getPhiDeveloperBuilderStateSnapshot, } from "../developer-workspace-store";
20
- import { getPhiBuilderRegionDraftKey } from "../region-keys";
20
+ import { getPhiBuilderPageDraftKey } from "../region-keys";
21
21
  import { capturePhiBuilderWorkspaceHistoryState, createPhiBuilderHistoryContext, phiBuilderHistory, } from "../history";
22
22
  import { createPhiBuilderControllerAddress } from "../controller/address";
23
23
  import { PHI_SIGNAL_VALUE_SCHEMAS } from "../../../../types/signals";
@@ -80,7 +80,7 @@ export function usePhiBuilderPageController({ emitCapability, effectiveArea, eff
80
80
  }
81
81
  }
82
82
  function openPageMetaDialog(mode) {
83
- const pageMetaDraftKey = getPhiBuilderRegionDraftKey(effectiveArea, "page_meta", effectivePageKey);
83
+ const pageMetaDraftKey = getPhiBuilderPageDraftKey(effectiveArea, "page_meta", effectivePageKey);
84
84
  const currentMetaDraft = state.pageMetaDrafts[pageMetaDraftKey] ?? {};
85
85
  const pageTitle = currentMetaDraft.title?.trim() || resolvePageTitleForInput(effectivePageKey);
86
86
  const currentPath = normalizePhiBuilderCmsCatalogPath(resolvePhiBuilderCmsStoragePath(effectiveArea, effectivePageKey, currentPageTree));
@@ -188,7 +188,7 @@ export function usePhiBuilderPageController({ emitCapability, effectiveArea, eff
188
188
  path: requestedPath,
189
189
  })
190
190
  : null;
191
- const pageMetaDraftKey = getPhiBuilderRegionDraftKey(effectiveArea, "page_meta", effectivePageKey);
191
+ const pageMetaDraftKey = getPhiBuilderPageDraftKey(effectiveArea, "page_meta", effectivePageKey);
192
192
  const historyBefore = capturePhiBuilderWorkspaceHistoryState(getPhiDeveloperBuilderStateSnapshot());
193
193
  setPhiBuilderPageMetaDraft(pageMetaDraftKey, { title: editedTitle, description, ...indexPatch });
194
194
  phiBuilderHistory.record(createPhiBuilderHistoryContext({
@@ -283,9 +283,9 @@ export function usePhiBuilderPageController({ emitCapability, effectiveArea, eff
283
283
  addPhiWorkspaceCustomPage(effectiveArea, { key: requestedKey, title, storagePath: requestedStoragePath });
284
284
  // The page's meta and delete drafts are edits in progress, so they stay with the Builder.
285
285
  startPhiBuilderNewPageDrafts({
286
- metaDraftKey: getPhiBuilderRegionDraftKey(effectiveArea, "page_meta", requestedKey),
286
+ metaDraftKey: getPhiBuilderPageDraftKey(effectiveArea, "page_meta", requestedKey),
287
287
  meta: { title, description, ...indexPatch },
288
- deleteDraftKey: getPhiBuilderRegionDraftKey(effectiveArea, "page_delete", requestedKey),
288
+ deleteDraftKey: getPhiBuilderPageDraftKey(effectiveArea, "page_delete", requestedKey),
289
289
  });
290
290
  await reloadPersistedPageCatalog(effectiveArea);
291
291
  navigateToBuilderPage(requestedKey);
@@ -3,7 +3,7 @@ import { phiAreaPath } from "../../../helpers/locale";
3
3
  import { resolvePhiBuilderAreaAsCmsArea, resolvePhiBuilderAreaMask } from "../../../constants/cms-areas";
4
4
  import { PhiCmsFlags, PhiCmsStatus } from "../../../constants/phi-cms";
5
5
  import { readPhiCmsInstanceId } from "../../../types/cms-instance-id";
6
- import { getPhiBuilderRegionDraftKey, PHI_BUILDER_PAGE_REGION_KEYS, PHI_BUILDER_SHELL_REGION_KEYS, } from "./region-keys";
6
+ import { getPhiBuilderPageDraftKey, getPhiBuilderRegionDraftKey, PHI_BUILDER_PAGE_REGION_KEYS, PHI_BUILDER_SHELL_REGION_KEYS, } from "./region-keys";
7
7
  import { getPhiBuilderDefaultRegionDraft } from "./region-defaults";
8
8
  import { serializePhiDeveloperBuilderRegionConfig } from "./region-hydration";
9
9
  import { stripPhiResolvedAssetProjections } from "../../../components/media/image-presentation";
@@ -546,7 +546,7 @@ export async function savePhiDeveloperBuilderDraft(state, regionDrafts, workspac
546
546
  const pagePath = resolvePhiBuilderCmsStoragePath(area, pageKey, pages);
547
547
  const currentPagePresetSource = resolvePhiBuilderPagePresetSource(pageKey, pages);
548
548
  const currentAreaPresetSource = state.areaPresetSourcesByArea[area] ?? null;
549
- const pageMetaDraft = state.pageMetaDrafts?.[getPhiBuilderRegionDraftKey(area, "page_meta", pageKey)] ?? null;
549
+ const pageMetaDraft = state.pageMetaDrafts?.[getPhiBuilderPageDraftKey(area, "page_meta", pageKey)] ?? null;
550
550
  /*
551
551
  * The Page flags travel apart from the rest of the meta draft: the titles become translated
552
552
  * messages and this is a column on the row, so the payload splits them even though the dialog
@@ -563,7 +563,7 @@ export async function savePhiDeveloperBuilderDraft(state, regionDrafts, workspac
563
563
  const pageFlags = pageMetaDraft?.index == null
564
564
  ? resolvePhiBuilderPageDefaultFlags(pageKey, pages)
565
565
  : pageMetaDraft.index === false ? PhiCmsFlags.NoIndex : 0;
566
- const isDeletedPageDraft = state.deletedPageDrafts?.[getPhiBuilderRegionDraftKey(area, "page_delete", pageKey)] === true;
566
+ const isDeletedPageDraft = state.deletedPageDrafts?.[getPhiBuilderPageDraftKey(area, "page_delete", pageKey)] === true;
567
567
  const allocationKey = createPhiBuilderDraftAllocationKey(area, pageKey, workspaceKind === "pages" ? "page" : "area");
568
568
  const draftAllocation = state.draftAllocations[allocationKey] ??
569
569
  await getPhiDeveloperBuilderDraftAllocation({
@@ -657,7 +657,7 @@ export async function savePhiDeveloperBuilderDraft(state, regionDrafts, workspac
657
657
  overlays: [],
658
658
  layoutNodes,
659
659
  contentWidgets,
660
- controllerSettings: requirePhiBuilderControllerSettings(state.pageControllerSettings, getPhiBuilderRegionDraftKey(area, "page_meta", pageKey), `Page "${pageKey}"`),
660
+ controllerSettings: requirePhiBuilderControllerSettings(state.pageControllerSettings, getPhiBuilderPageDraftKey(area, "page_meta", pageKey), `Page "${pageKey}"`),
661
661
  });
662
662
  storePhiDeveloperBuilderDraftAllocation(allocationKey, result);
663
663
  savedDraftState = result;
@@ -5,3 +5,13 @@ export type PhiBuilderPageRegionKey = (typeof PHI_BUILDER_PAGE_REGION_KEYS)[numb
5
5
  export type PhiBuilderRegionKey = PhiBuilderShellRegionKey | PhiBuilderPageRegionKey;
6
6
  export declare function isPhiBuilderPageScopedRegion(regionKey: string): regionKey is PhiBuilderPageRegionKey;
7
7
  export declare function getPhiBuilderRegionDraftKey(area: string, regionKey: string, pageKey?: string | null): string;
8
+ /** What the Builder keeps per Page beside its Regions: the meta as edited, and that the Page is to be deleted. */
9
+ export type PhiBuilderPageDraftKind = "page_meta" | "page_delete";
10
+ /**
11
+ * The key of a Page's own draft state in the workspace.
12
+ *
13
+ * Not a Region key: `page_meta` and `page_delete` are not Regions, so `getPhiBuilderRegionDraftKey` leaves the
14
+ * Page out of them and every Page of an Area would share one slot -- the first Page opened would fill it, and
15
+ * the rest would save its title, description and indexing as their own.
16
+ */
17
+ export declare function getPhiBuilderPageDraftKey(area: string, kind: PhiBuilderPageDraftKind, pageKey: string): string;
@@ -10,3 +10,13 @@ export function getPhiBuilderRegionDraftKey(area, regionKey, pageKey) {
10
10
  }
11
11
  return `${area}:${regionKey}`;
12
12
  }
13
+ /**
14
+ * The key of a Page's own draft state in the workspace.
15
+ *
16
+ * Not a Region key: `page_meta` and `page_delete` are not Regions, so `getPhiBuilderRegionDraftKey` leaves the
17
+ * Page out of them and every Page of an Area would share one slot -- the first Page opened would fill it, and
18
+ * the rest would save its title, description and indexing as their own.
19
+ */
20
+ export function getPhiBuilderPageDraftKey(area, kind, pageKey) {
21
+ return `${area}:${pageKey}:${kind}`;
22
+ }
@@ -57,7 +57,7 @@ export async function resolvePhiHtmlWidgetTranslatedHtml(config, runtime) {
57
57
  }
58
58
  return (sourceMode !== "url" && config?.resolvedContent != null) || config?.preferSource === true
59
59
  ? sourceHtml
60
- : translateSemanticHtml(sourceHtml, sourceMode === "url" ? config?.sourceLocale?.trim() : undefined, runtime.locale.current);
60
+ : translateSemanticHtml(sourceHtml, sourceMode === "url" ? config?.sourceLocale?.trim() : undefined, runtime.locale.current, runtime);
61
61
  }
62
62
  export async function PhiHtmlWidget({ blockId, config, runtime, }) {
63
63
  const translatedHtml = await resolvePhiHtmlWidgetTranslatedHtml(config, runtime);
@@ -3,10 +3,13 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import { PhiEntryListControl } from "../../../../../components/controls/phi-entry-list-control";
4
4
  import { PhiProgressControl } from "../../../../../components/controls/phi-progress-control";
5
5
  import { PhiButtonControl } from "../../../../../components/controls/phi-button-control";
6
- import { useCallback, useEffect, useMemo, useRef, useState } from "react";
6
+ import { useCallback, useEffect, useMemo, useState } from "react";
7
7
  import { usePhiMediaUpload } from "../../../../../components/media/phi-media-upload";
8
8
  import { runPhiAddonAssetUpload, } from "../../../../../components/media/media-upload-flow";
9
- import { PHI_MEDIA_UPLOAD_DEFAULT_LABELS } from "../../../../../components/media/phi-media-upload";
9
+ import { resolvePhiAreaUploadLabels, resolvePhiUploadStatusLabel } from "../../../../../components/media/phi-media-upload";
10
+ import { PhiUploadDropArea } from "../../../../../components/media/phi-upload-drop-area";
11
+ import { PhiTagControl } from "../../../../../components/controls/phi-tag-control";
12
+ import { readPhiSlotUploadAcceptance } from "./slot";
10
13
  import { usePhiSignalListener } from "../../../../../components/runtime/runtime-signal-bus";
11
14
  import { emitPhiSignalCapability, usePhiSignalEmitter, usePhiSignalIdentity, } from "../../../../../components/runtime/runtime-signal-identity";
12
15
  import { readPhiTableBindingParamsSignalValue } from "../../../../../types/table-signal-values";
@@ -189,18 +192,11 @@ export function PhiSlotUploadWidgetClient({ config, labels }) {
189
192
  });
190
193
  return { asset: { id: view.mediaAssetId } };
191
194
  }, [base, ownerId, read, slotName]);
192
- const fileInputRef = useRef(null);
195
+ const slotUpload = useMemo(() => readPhiSlotUploadAcceptance(slot), [slot]);
196
+ const uploadLabels = useMemo(() => resolvePhiAreaUploadLabels(labels.upload), [labels.upload]);
193
197
  const upload = usePhiMediaUpload({
194
- labels: PHI_MEDIA_UPLOAD_DEFAULT_LABELS,
195
- ...(slot
196
- ? {
197
- acceptance: {
198
- contentTypes: slot.contentTypes,
199
- maxBytes: slot.maxBytes,
200
- multiple: slot.cardinality === "many",
201
- },
202
- }
203
- : {}),
198
+ labels: uploadLabels,
199
+ ...(slotUpload ? { acceptance: slotUpload.acceptance } : {}),
204
200
  runSession,
205
201
  onUploaded: async () => {
206
202
  setFailure(null);
@@ -210,6 +206,20 @@ export function PhiSlotUploadWidgetClient({ config, labels }) {
210
206
  onRejected: (message) => setFailure(message),
211
207
  });
212
208
  const files = loaded?.ownerId === ownerId ? loaded.files : [];
209
+ /*
210
+ * A file still on its way or one that failed, as a line above the files that arrived: its name, then
211
+ * the percentage or "Failed" the Media folder's tiles say, a bar while it travels, and Retry for a
212
+ * failure. The reason for a failure is the alert's, which `onRejected` fills for both.
213
+ */
214
+ const pending = upload.items.filter((item) => item.status !== "done").map((item) => ({
215
+ key: item.localId,
216
+ title: (_jsxs(PhiFlexControl, { vertical: true, gap: 4, children: [_jsxs(PhiFlexControl, { align: "center", gap: 8, wrap: true, children: [_jsx("span", { children: item.file.name }), _jsx(PhiTagControl, { color: item.status === "error" ? "red" : "blue", children: resolvePhiUploadStatusLabel(item, labels.upload) })] }), item.status === "uploading" ? _jsx(PhiProgressControl, { percent: item.progress, size: "small" }) : null] })),
217
+ ...(item.status === "error"
218
+ ? {
219
+ action: (_jsx(PhiButtonControl, { size: "small", label: labels.upload.retryLabel, onClick: () => { void upload.retry(item.localId); } })),
220
+ }
221
+ : {}),
222
+ }));
213
223
  /*
214
224
  * The removal and the read after it fail apart: a DELETE that went through and a list that could not
215
225
  * be read again are two answers, and saying "That file stayed" for the second was untrue.
@@ -231,14 +241,9 @@ export function PhiSlotUploadWidgetClient({ config, labels }) {
231
241
  if (!base || !slotName) {
232
242
  return (_jsx(PhiLabeledControl, { label: config?.label, children: _jsx(PhiTypographyControl, { type: "secondary", children: labels.unconfigured }) }));
233
243
  }
234
- return (_jsx(PhiLabeledControl, { label: config?.label, fill: true, children: _jsxs(PhiFlexControl, { vertical: true, gap: 8, "data-phis-slot-upload": slotName, children: [ownerId === null ? (_jsx(PhiTypographyControl, { type: "secondary", children: labels.noRow })) : (_jsxs(_Fragment, { children: [_jsx("input", { ref: fileInputRef, type: "file", hidden: true, multiple: slot?.cardinality === "many", accept: slot?.contentTypes.join(","), onChange: (event) => {
235
- for (const file of Array.from(event.target.files ?? []))
236
- void upload.upload(file);
237
- // Cleared so choosing the same file again is a change, and uploads again.
238
- event.target.value = "";
239
- } }), _jsx(PhiButtonControl, { icon: _jsx(PhiIcon, { name: "upload", size: "inherit" }), label: labels.choose, onClick: () => fileInputRef.current?.click() })] })), upload.items.filter((item) => item.status === "uploading").map((item) => (_jsx(PhiProgressControl, { percent: item.progress, size: "small" }, item.localId))), slotFailure ?? failure ? (_jsx(PhiTypographyControl, { type: "danger", role: "alert", children: slotFailure ?? failure })) : null, _jsx(PhiEntryListControl, { emptyDescription: labels.empty, entries: [...files].map((file) => ({
240
- key: String(file.id),
241
- title: (_jsx(SlotFileTitle, { file: file, text: formatPhiSlotUploadWidgetLabel(labels.fileTitle, file.contentType, file.byteSize) })),
242
- action: (_jsx(PhiButtonControl, { size: "small", icon: _jsx(PhiIcon, { name: "delete", size: "inherit" }), ariaLabel: labels.remove, tooltip: labels.remove, onClick: () => { void remove(file.id); } })),
243
- })) })] }) }));
244
+ return (_jsx(PhiLabeledControl, { label: config?.label, fill: true, children: _jsxs(PhiFlexControl, { vertical: true, gap: 8, "data-phis-slot-upload": slotName, children: [ownerId === null ? (_jsx(PhiTypographyControl, { type: "secondary", children: labels.noRow })) : (_jsx(_Fragment, { children: _jsx(PhiUploadDropArea, { ...(slotUpload ? { accept: slotUpload.accept, multiple: slotUpload.multiple } : {}), disabled: !slotUpload, title: labels.upload.dropTitle, hint: labels.upload.dropHint, onFile: (file) => void upload.upload(file) }) })), slotFailure ?? failure ? (_jsx(PhiTypographyControl, { type: "danger", role: "alert", children: slotFailure ?? failure })) : null, _jsx(PhiEntryListControl, { emptyDescription: labels.empty, entries: [...pending, ...files.map((file) => ({
245
+ key: String(file.id),
246
+ title: (_jsx(SlotFileTitle, { file: file, text: formatPhiSlotUploadWidgetLabel(labels.fileTitle, file.contentType, file.byteSize) })),
247
+ action: (_jsx(PhiButtonControl, { size: "small", icon: _jsx(PhiIcon, { name: "delete", size: "inherit" }), ariaLabel: labels.remove, tooltip: labels.remove, onClick: () => { void remove(file.id); } })),
248
+ }))] })] }) }));
244
249
  }
@@ -0,0 +1,19 @@
1
+ import type { PhiMediaUploadAcceptance } from "../../../../../components/media/phi-media-upload";
2
+ /** One slot as Core's `_assets` manifest declares it. */
3
+ export type PhiSlotDescriptor = {
4
+ name: string;
5
+ cardinality: "one" | "many";
6
+ maxBytes: number;
7
+ contentTypes: string[];
8
+ };
9
+ /**
10
+ * What the drop area offers and what the upload checks before it sends, both from the one descriptor:
11
+ * the file dialog's `accept` and `multiple` are the same facts the acceptance holds, so they cannot
12
+ * disagree. A slot that is not known yet takes nothing -- `null` -- rather than an upload that would
13
+ * skip the check.
14
+ */
15
+ export declare function readPhiSlotUploadAcceptance(slot: PhiSlotDescriptor | null): {
16
+ accept: string;
17
+ multiple: boolean;
18
+ acceptance: PhiMediaUploadAcceptance;
19
+ } | null;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * What the drop area offers and what the upload checks before it sends, both from the one descriptor:
3
+ * the file dialog's `accept` and `multiple` are the same facts the acceptance holds, so they cannot
4
+ * disagree. A slot that is not known yet takes nothing -- `null` -- rather than an upload that would
5
+ * skip the check.
6
+ */
7
+ export function readPhiSlotUploadAcceptance(slot) {
8
+ if (!slot)
9
+ return null;
10
+ const multiple = slot.cardinality === "many";
11
+ return {
12
+ accept: slot.contentTypes.join(","),
13
+ multiple,
14
+ acceptance: { contentTypes: slot.contentTypes, maxBytes: slot.maxBytes, multiple },
15
+ };
16
+ }
@@ -8,6 +8,7 @@ import { PHI_VIEWER_ACCESS_ANYONE, } from "../../types/access";
8
8
  import { stripRenderableBlockDefaults } from "../../helpers/renderable-block-serialization";
9
9
  import { PhiCmsWidgetType } from "../../constants/cms-widget-types";
10
10
  import { parsePhiFormWidgetConfig } from "../../components/forms/form-widget-config";
11
+ import { PHI_MEDIA_ASSET_FORM_FIELD_PROVIDER_KEY, PHI_MEDIA_LIBRARY_DATA_PROVIDER_KEYS, } from "../../constants/media-library-provider-keys";
11
12
  import { buildPhiRecordDeclarationsByKey } from "../../helpers/record-fields";
12
13
  function loadRuntimeWidgetPlugin(entry) {
13
14
  return entry.loadRuntime();
@@ -72,7 +73,11 @@ export async function resolvePhiRuntimeModuleSet({ catalog, moduleIds, area, ser
72
73
  }
73
74
  const installedOwnerModuleIdByWidgetType = new Map();
74
75
  const installedOwnerModuleIdByLayoutType = new Map();
76
+ const installedOwnerModuleIdByFormFieldTypeKey = new Map();
75
77
  for (const [moduleId, entry] of catalog) {
78
+ for (const descriptor of entry.definition.formProviders?.fieldTypes ?? []) {
79
+ installedOwnerModuleIdByFormFieldTypeKey.set(descriptor.key, moduleId);
80
+ }
76
81
  for (const widget of entry.widgets) {
77
82
  const type = buildPhiRuntimeModuleWidgetType(widget);
78
83
  installedOwnerModuleIdByWidgetType.set(type, moduleId);
@@ -210,7 +215,13 @@ export async function resolvePhiRuntimeModuleSet({ catalog, moduleIds, area, ser
210
215
  }
211
216
  for (const form of formDefinitionsById.values()) {
212
217
  for (const field of form.descriptor.fields) {
213
- if (!formFieldTypeProviderDescriptorsByKey.has(field.fieldProviderKey)) {
218
+ /*
219
+ * A field type that an installed Module owns, but that is not active in this Area, is not an error:
220
+ * the Form still stands there, and the field says that its Module is not available
221
+ * (`PhiFormControl`'s `unavailableFieldKeys`). A key nobody installed declares is one.
222
+ */
223
+ if (!formFieldTypeProviderDescriptorsByKey.has(field.fieldProviderKey) &&
224
+ !installedOwnerModuleIdByFormFieldTypeKey.has(field.fieldProviderKey)) {
214
225
  throw new Error(`Form "${form.formId}" requires unavailable field provider "${field.fieldProviderKey}".`);
215
226
  }
216
227
  for (const rule of field.validation ?? []) {
@@ -247,6 +258,7 @@ export async function resolvePhiRuntimeModuleSet({ catalog, moduleIds, area, ser
247
258
  platformModuleId,
248
259
  installedOwnerModuleIdByWidgetType,
249
260
  installedOwnerModuleIdByLayoutType,
261
+ installedOwnerModuleIdByFormFieldTypeKey,
250
262
  ownerModuleIdByControllerType,
251
263
  areaControllerSettings,
252
264
  };
@@ -348,6 +360,15 @@ export function collectPhiRuntimeDataProviderKeys({ moduleSet, trees, }) {
348
360
  const form = formId ? moduleSet.formDefinitionsById.get(formId) : null;
349
361
  if (form) {
350
362
  collectDataProviderKeysFromValue(form.descriptor, knownProviderKeys, collected);
363
+ /*
364
+ * A `media-asset` field reads the Media library through the picker, and a field descriptor names
365
+ * no Provider of its own to find it by. The field type is what needs it, so the scan says so
366
+ * once, here, instead of every Form that has one repeating the Provider in its descriptor.
367
+ */
368
+ if (form.descriptor.fields.some((field) => field.fieldProviderKey === PHI_MEDIA_ASSET_FORM_FIELD_PROVIDER_KEY) &&
369
+ knownProviderKeys.has(PHI_MEDIA_LIBRARY_DATA_PROVIDER_KEYS.collection)) {
370
+ collected.add(PHI_MEDIA_LIBRARY_DATA_PROVIDER_KEYS.collection);
371
+ }
351
372
  }
352
373
  }
353
374
  }
@@ -382,7 +403,12 @@ export function collectPhiRuntimeDataProviderKeys({ moduleSet, trees, }) {
382
403
  }
383
404
  return collected;
384
405
  }
385
- function collectPhiRuntimeFormOwnerModuleIds({ moduleSet, trees, }) {
406
+ /**
407
+ * The Modules the Forms on these Pages need mounted: each Form's owner, and the owner of every field
408
+ * type the Form uses, where that Module is active. A field type is a Module's to offer, and the Form
409
+ * widget mounts that Module's field Providers beside the Form owner's (`PhiFormWidget`).
410
+ */
411
+ function collectPhiRuntimeFormModuleIds({ moduleSet, trees, }) {
386
412
  const collected = new Set();
387
413
  for (const tree of trees) {
388
414
  for (const widget of tree.contentWidgets) {
@@ -400,6 +426,12 @@ function collectPhiRuntimeFormOwnerModuleIds({ moduleSet, trees, }) {
400
426
  const form = moduleSet.formDefinitionsById.get(config.formId);
401
427
  if (form) {
402
428
  collected.add(form.ownerModuleId);
429
+ for (const field of form.descriptor.fields) {
430
+ const fieldOwner = moduleSet.formFieldTypeProviderDescriptorsByKey.get(field.fieldProviderKey)?.ownerModuleId;
431
+ if (fieldOwner) {
432
+ collected.add(fieldOwner);
433
+ }
434
+ }
403
435
  }
404
436
  }
405
437
  }
@@ -420,7 +452,7 @@ export async function resolvePhiRuntimeRenderRegistry({ catalog, moduleSet, tree
420
452
  const widgetImplementationModes = collectTreeWidgetImplementationModes({ moduleSet, trees });
421
453
  const layoutTypes = collectTreeLayoutTypes(trees);
422
454
  const dataProviderKeys = collectPhiRuntimeDataProviderKeys({ moduleSet, trees });
423
- const formOwnerModuleIds = collectPhiRuntimeFormOwnerModuleIds({ moduleSet, trees });
455
+ const formModuleIds = collectPhiRuntimeFormModuleIds({ moduleSet, trees });
424
456
  const renderIssuesByWidgetType = new Map();
425
457
  const runtimeWidgetRenderIssuesByType = new Map();
426
458
  const previewWidgetRenderIssuesByType = new Map();
@@ -474,7 +506,7 @@ export async function resolvePhiRuntimeRenderRegistry({ catalog, moduleSet, tree
474
506
  const usedModuleIds = new Set([
475
507
  ...widgetEntries.map(([, entry]) => entry.ownerModuleId),
476
508
  ...layoutEntries.map(([, entry]) => entry.ownerModuleId),
477
- ...formOwnerModuleIds,
509
+ ...formModuleIds,
478
510
  ]);
479
511
  const dataProviderDescriptorsByKey = new Map([...dataProviderKeys].flatMap((providerKey) => {
480
512
  const descriptor = moduleSet.dataProviderDescriptorsByKey.get(providerKey);
@@ -604,6 +636,8 @@ export async function resolvePhiRuntimeRenderRegistry({ catalog, moduleSet, tree
604
636
  })),
605
637
  ownerModuleIdByLayoutType: new Map(layoutEntries.map(([type, entry]) => [type, entry.ownerModuleId])),
606
638
  uiProviderModuleIds,
639
+ activeModuleIds: moduleSet.activeModuleIds,
640
+ ownerModuleIdByFormFieldTypeKey: moduleSet.installedOwnerModuleIdByFormFieldTypeKey,
607
641
  /*
608
642
  * Every active Module's published facts, whether or not its Widgets happen to be on this page.
609
643
  *
@@ -0,0 +1,35 @@
1
+ export type PhiAddonRole = {
2
+ name: string;
3
+ };
4
+ export type PhiAddonRoleCatalogEntry = {
5
+ addonId: string;
6
+ /** The Add-on's `title`: its id until its manifest carries a display name; shown as stated. */
7
+ title: string;
8
+ roles: readonly PhiAddonRole[];
9
+ };
10
+ export type PhiAddonRoleAssignment = {
11
+ addonId: string;
12
+ role: string;
13
+ };
14
+ /** The catalog of an `GET /api/site/addon-roles` answer; entries and roles that do not read are left out. */
15
+ export declare function readPhiAddonRoleCatalog(payload: unknown): PhiAddonRoleCatalogEntry[];
16
+ /** The stored assignments in a user row's `addonRoles` or an answer's `held`. */
17
+ export declare function readPhiAddonRoleAssignments(value: unknown): PhiAddonRoleAssignment[];
18
+ /** The tag a Site Admin's row carries in place of single roles; the Table maps it to its label. */
19
+ export declare const PHI_USER_MANAGEMENT_ADDON_ALL_ROLES_TAG = "all";
20
+ /**
21
+ * The tags of a row's Add-on roles column: one tag per Add-on with its stored roles, so the column stays
22
+ * narrow, and for a Site Admin the one tag that says every role is held. Stored assignments for a Site Admin
23
+ * are not listed (they apply when the person is no longer one; the dialog shows them).
24
+ */
25
+ export declare function buildPhiAddonRoleTags(row: Record<string, unknown>): string[];
26
+ /** The filter's options: each Add-on (any role), then each of its roles. Values are `<addonId>` and `<addonId>:<role>`. */
27
+ export declare function buildPhiAddonRoleFilterOptions(catalog: readonly PhiAddonRoleCatalogEntry[]): {
28
+ value: string;
29
+ label: string;
30
+ }[];
31
+ /** The Core's `addonId` and optional `addonRole` filters from the one value the Table filter holds. */
32
+ export declare function parsePhiAddonRoleFilter(value: string): {
33
+ addonId: string;
34
+ addonRole: string | null;
35
+ } | null;
@@ -0,0 +1,76 @@
1
+ import { isPhiRecord } from "../../../helpers/is-record";
2
+ const ROLE_NAME = /^[a-z][a-z0-9-]{0,63}$/u;
3
+ function readString(value) {
4
+ return typeof value === "string" && value.trim() ? value.trim() : null;
5
+ }
6
+ /** The catalog of an `GET /api/site/addon-roles` answer; entries and roles that do not read are left out. */
7
+ export function readPhiAddonRoleCatalog(payload) {
8
+ const addons = isPhiRecord(payload) && Array.isArray(payload.addons) ? payload.addons : [];
9
+ return addons.flatMap((addon) => {
10
+ if (!isPhiRecord(addon))
11
+ return [];
12
+ const addonId = readString(addon.addonId);
13
+ if (!addonId)
14
+ return [];
15
+ const roles = (Array.isArray(addon.roles) ? addon.roles : []).flatMap((role) => {
16
+ if (!isPhiRecord(role))
17
+ return [];
18
+ const name = readString(role.name);
19
+ if (!name || !ROLE_NAME.test(name))
20
+ return [];
21
+ return [{ name }];
22
+ });
23
+ return roles.length > 0 ? [{ addonId, title: readString(addon.title) ?? addonId, roles }] : [];
24
+ });
25
+ }
26
+ /** The stored assignments in a user row's `addonRoles` or an answer's `held`. */
27
+ export function readPhiAddonRoleAssignments(value) {
28
+ return (Array.isArray(value) ? value : []).flatMap((entry) => {
29
+ if (!isPhiRecord(entry))
30
+ return [];
31
+ const addonId = readString(entry.addonId);
32
+ const role = readString(entry.role);
33
+ return addonId && role ? [{ addonId, role }] : [];
34
+ });
35
+ }
36
+ /** The tag a Site Admin's row carries in place of single roles; the Table maps it to its label. */
37
+ export const PHI_USER_MANAGEMENT_ADDON_ALL_ROLES_TAG = "all";
38
+ /**
39
+ * Whether a list row is a Site Admin, who holds every declared role of every enabled Add-on without a stored
40
+ * assignment: an enabled account whose `roleTags` hold `admin` (the Core states no flag of its own).
41
+ */
42
+ function isPhiAddonRoleHolderOfAll(row) {
43
+ return row.enabled === true && Array.isArray(row.roleTags) && row.roleTags.includes("admin");
44
+ }
45
+ /**
46
+ * The tags of a row's Add-on roles column: one tag per Add-on with its stored roles, so the column stays
47
+ * narrow, and for a Site Admin the one tag that says every role is held. Stored assignments for a Site Admin
48
+ * are not listed (they apply when the person is no longer one; the dialog shows them).
49
+ */
50
+ export function buildPhiAddonRoleTags(row) {
51
+ if (isPhiAddonRoleHolderOfAll(row))
52
+ return [PHI_USER_MANAGEMENT_ADDON_ALL_ROLES_TAG];
53
+ const byAddon = new Map();
54
+ for (const { addonId, role } of readPhiAddonRoleAssignments(row.addonRoles)) {
55
+ byAddon.set(addonId, [...(byAddon.get(addonId) ?? []), role]);
56
+ }
57
+ return [...byAddon].map(([addonId, roles]) => `${addonId}: ${roles.join(", ")}`);
58
+ }
59
+ /** The filter's options: each Add-on (any role), then each of its roles. Values are `<addonId>` and `<addonId>:<role>`. */
60
+ export function buildPhiAddonRoleFilterOptions(catalog) {
61
+ return catalog.flatMap((entry) => [
62
+ { value: entry.addonId, label: entry.title },
63
+ ...entry.roles.map((role) => ({ value: `${entry.addonId}:${role.name}`, label: `${entry.title}: ${role.name}` })),
64
+ ]);
65
+ }
66
+ /** The Core's `addonId` and optional `addonRole` filters from the one value the Table filter holds. */
67
+ export function parsePhiAddonRoleFilter(value) {
68
+ const trimmed = value.trim();
69
+ if (!trimmed)
70
+ return null;
71
+ const cut = trimmed.lastIndexOf(":");
72
+ const role = cut > 0 ? trimmed.slice(cut + 1) : null;
73
+ if (role !== null && ROLE_NAME.test(role))
74
+ return { addonId: trimmed.slice(0, cut), addonRole: role };
75
+ return { addonId: trimmed, addonRole: null };
76
+ }
@@ -20,7 +20,7 @@ const PHI_USER_MANAGEMENT_DASHBOARD_CARD_LABEL_SET = definePhiRuntimeModuleLabel
20
20
  accounts_eyebrow: "Accounts",
21
21
  accounts_title: "Site users",
22
22
  accounts_description: "User accounts on this site",
23
- accounts_meta: "Admin, editor, accounting, auth, and shop accounts",
23
+ accounts_meta: "Admin, editor, accounting, auth, and external accounts",
24
24
  },
25
25
  });
26
26
  const PHI_USER_MANAGEMENT_ACCOUNTS_CARD_ID = createPhiDashboardCardId(PHI_USER_MANAGEMENT_RUNTIME_MODULE_ID, "accounts");
@@ -2,6 +2,12 @@
2
2
  import { PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS } from "./ids";
3
3
  import { PHI_USER_MANAGEMENT_RUNTIME_MODULE_ID } from "./ids";
4
4
  export const PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_CLIENT_DEFINITIONS = [
5
+ {
6
+ key: PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS.addonRoleOptions,
7
+ ownerModuleId: PHI_USER_MANAGEMENT_RUNTIME_MODULE_ID,
8
+ loadLive: async () => (await import("../../../plugins/runtime-modules/user-management/services/options"))
9
+ .PhiUserManagementAddonRoleOptionsProviderClient,
10
+ },
5
11
  {
6
12
  key: PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS.table,
7
13
  ownerModuleId: PHI_USER_MANAGEMENT_RUNTIME_MODULE_ID,
@@ -1,4 +1,13 @@
1
- export declare const PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS: {
1
+ export declare const PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS: ({
2
+ key: `${string}/${string}`;
3
+ ownerModuleId: "@phis/ui/modules/user-management";
4
+ kind: "options";
5
+ executionMode: "live";
6
+ authoringMode: "none";
7
+ title: string;
8
+ description: string;
9
+ resources?: undefined;
10
+ } | {
2
11
  key: `${string}/${string}`;
3
12
  ownerModuleId: "@phis/ui/modules/user-management";
4
13
  kind: "table";
@@ -156,4 +165,4 @@ export declare const PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS: {
156
165
  summaryFields?: undefined;
157
166
  actions?: undefined;
158
167
  })[];
159
- }[];
168
+ })[];
@@ -2,6 +2,15 @@ import { PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS } from "./ids";
2
2
  import { PHI_USER_MANAGEMENT_RUNTIME_MODULE_ID } from "./ids";
3
3
  import { createPhiUserManagementControllerAddress } from "../../../plugins/runtime-modules/user-management/controller/address";
4
4
  export const PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS = [
5
+ {
6
+ key: PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS.addonRoleOptions,
7
+ ownerModuleId: PHI_USER_MANAGEMENT_RUNTIME_MODULE_ID,
8
+ kind: "options",
9
+ executionMode: "live",
10
+ authoringMode: "none",
11
+ title: "Add-on roles",
12
+ description: "The Add-ons enabled for the Site and their declared roles, for filtering users by them.",
13
+ },
5
14
  {
6
15
  key: PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS.table,
7
16
  ownerModuleId: PHI_USER_MANAGEMENT_RUNTIME_MODULE_ID,
@@ -35,6 +44,8 @@ export const PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS = [
35
44
  { key: "email", title: "Email", type: "string" },
36
45
  { key: "accountType", title: "Account type", type: "string" },
37
46
  { key: "roleTags", title: "Roles", type: "json" },
47
+ { key: "addonRoles", title: "Add-on role assignments", type: "json" },
48
+ { key: "addonRoleTags", title: "Add-on roles", type: "json" },
38
49
  { key: "userFlagTags", title: "User flags", type: "json" },
39
50
  { key: "siteFlagTags", title: "Site flags", type: "json" },
40
51
  { key: "lastLoginAt", title: "Last login", type: "datetime" },
@@ -44,7 +55,7 @@ export const PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_DESCRIPTORS = [
44
55
  ],
45
56
  query: {
46
57
  search: true,
47
- filterFields: ["accountType", "enabled"],
58
+ filterFields: ["accountType", "addonRole", "enabled"],
48
59
  sorting: "single",
49
60
  pagination: "offset",
50
61
  total: true,
@@ -26,7 +26,16 @@ export declare const PHI_USER_MANAGEMENT_RUNTIME_MODULE_DEFINITION: {
26
26
  credentialPolicy: "site-session";
27
27
  }[];
28
28
  };
29
- dataProviders: {
29
+ dataProviders: ({
30
+ key: `${string}/${string}`;
31
+ ownerModuleId: "@phis/ui/modules/user-management";
32
+ kind: "options";
33
+ executionMode: "live";
34
+ authoringMode: "none";
35
+ title: string;
36
+ description: string;
37
+ resources?: undefined;
38
+ } | {
30
39
  key: `${string}/${string}`;
31
40
  ownerModuleId: "@phis/ui/modules/user-management";
32
41
  kind: "table";
@@ -184,6 +193,6 @@ export declare const PHI_USER_MANAGEMENT_RUNTIME_MODULE_DEFINITION: {
184
193
  summaryFields?: undefined;
185
194
  actions?: undefined;
186
195
  })[];
187
- }[];
196
+ })[];
188
197
  moduleId: "@phis/ui/modules/user-management";
189
198
  };
@@ -10,4 +10,5 @@ export declare const PHI_USER_MANAGEMENT_RUNTIME_MODULE_IDENTITY: {
10
10
  };
11
11
  export declare const PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS: {
12
12
  readonly table: `${string}/${string}`;
13
+ readonly addonRoleOptions: `${string}/${string}`;
13
14
  };
@@ -12,4 +12,5 @@ export const PHI_USER_MANAGEMENT_RUNTIME_MODULE_IDENTITY = {
12
12
  };
13
13
  export const PHI_USER_MANAGEMENT_RUNTIME_DATA_PROVIDER_KEYS = {
14
14
  table: createPhiSharedRuntimeDataProviderKey("tables", "user-management"),
15
+ addonRoleOptions: createPhiSharedRuntimeDataProviderKey("options", "user-management-addon-roles"),
15
16
  };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The Add-ons enabled for the Site and their roles, as one filter's options: an Add-on (any role) and each
3
+ * role of it. The Core answers every signed-in caller (`GET /api/site/addon-roles`); who may see the users
4
+ * list at all is settled by the users route itself.
5
+ */
6
+ export declare const PhiUserManagementAddonRoleOptionsProviderClient: import("react").ComponentType<{
7
+ children: import("react").ReactNode;
8
+ }>;