@powerportalspro/react-fluent 6.0.0 → 7.0.0
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.
- package/dist/index.cjs +603 -122
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +99 -4
- package/dist/index.d.ts +99 -4
- package/dist/index.js +606 -127
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -2010,6 +2010,15 @@ interface ThemeContextValue {
|
|
|
2010
2010
|
* option list.
|
|
2011
2011
|
*/
|
|
2012
2012
|
readonly availableAccents: readonly AccentColor[];
|
|
2013
|
+
/**
|
|
2014
|
+
* Whether the site fixes its accent color via
|
|
2015
|
+
* `<PowerPortalsProThemeProvider lockAccentColor>`. When `true`,
|
|
2016
|
+
* {@link setAccentColor} is a no-op, any persisted preference is
|
|
2017
|
+
* ignored in favour of the configured accent, and
|
|
2018
|
+
* `<ThemeColorSelector>` renders nothing. Read it before offering
|
|
2019
|
+
* any accent-changing UI of your own.
|
|
2020
|
+
*/
|
|
2021
|
+
readonly accentColorLocked: boolean;
|
|
2013
2022
|
/**
|
|
2014
2023
|
* Each accent's representative brand-fill color (hex). Drives the
|
|
2015
2024
|
* color swatch rendered next to each option in
|
|
@@ -2061,6 +2070,21 @@ interface PowerPortalsProThemeProviderProps {
|
|
|
2061
2070
|
* is set. Defaults to `'ltr'`.
|
|
2062
2071
|
*/
|
|
2063
2072
|
defaultTextDirection?: TextDirection;
|
|
2073
|
+
/**
|
|
2074
|
+
* Fixes the site's accent color to `defaultAccentColor`. Without
|
|
2075
|
+
* it, that prop is only a *default*: a visitor who once picked an
|
|
2076
|
+
* accent keeps it forever, because the persisted preference wins.
|
|
2077
|
+
* With it, the configured accent always wins, the persisted value
|
|
2078
|
+
* is rewritten to match, `setAccentColor` becomes a no-op, and
|
|
2079
|
+
* `<ThemeColorSelector>` (and therefore the accent section of
|
|
2080
|
+
* `<SiteSettingsPanel>`) renders nothing. Light/dark mode stays
|
|
2081
|
+
* under the visitor's control either way.
|
|
2082
|
+
*
|
|
2083
|
+
* Pair it with a `customAccents` entry at the `'default'` key to
|
|
2084
|
+
* lock the site to your own brand rather than one of the built-in
|
|
2085
|
+
* Office accents.
|
|
2086
|
+
*/
|
|
2087
|
+
lockAccentColor?: boolean;
|
|
2064
2088
|
/**
|
|
2065
2089
|
* Consumer-supplied custom accents, layered ON TOP of the built-in
|
|
2066
2090
|
* Office-brand palette (`'default'`, `'teams'`, `'excel'`, `'word'`,
|
|
@@ -2132,7 +2156,7 @@ interface PowerPortalsProThemeProviderProps {
|
|
|
2132
2156
|
* </PowerPortalsProThemeProvider>
|
|
2133
2157
|
* ```
|
|
2134
2158
|
*/
|
|
2135
|
-
declare function PowerPortalsProThemeProvider({ children, defaultMode, defaultAccentColor, defaultTextDirection, customAccents, storageKey, style, fluentProviderProps, }: PowerPortalsProThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
2159
|
+
declare function PowerPortalsProThemeProvider({ children, defaultMode, defaultAccentColor, defaultTextDirection, lockAccentColor, customAccents, storageKey, style, fluentProviderProps, }: PowerPortalsProThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
2136
2160
|
|
|
2137
2161
|
interface ThemeSelectorProps {
|
|
2138
2162
|
/** Disable the control. Useful when displaying the user's read-only preference. */
|
|
@@ -2196,8 +2220,12 @@ interface ThemeColorSelectorProps {
|
|
|
2196
2220
|
* `app.components.theme-color-selector.accent.<key>`. Missing keys
|
|
2197
2221
|
* fall back to the accent's raw string (so an unlocalized custom
|
|
2198
2222
|
* accent like `'forest'` shows as `"forest"` rather than blank).
|
|
2223
|
+
*
|
|
2224
|
+
* Renders nothing when the site fixes its accent via
|
|
2225
|
+
* `<PowerPortalsProThemeProvider lockAccentColor>` — a picker whose
|
|
2226
|
+
* choice is discarded is worse than no picker.
|
|
2199
2227
|
*/
|
|
2200
|
-
declare function ThemeColorSelector({ readOnly, label, width, accentLabels, }: ThemeColorSelectorProps): react_jsx_runtime.JSX.Element;
|
|
2228
|
+
declare function ThemeColorSelector({ readOnly, label, width, accentLabels, }: ThemeColorSelectorProps): react_jsx_runtime.JSX.Element | null;
|
|
2201
2229
|
|
|
2202
2230
|
/**
|
|
2203
2231
|
* Canonical accent definition. One entry per visually-distinct brand
|
|
@@ -2440,6 +2468,69 @@ interface ProfileMainMenuProps {
|
|
|
2440
2468
|
*/
|
|
2441
2469
|
declare function ProfileMainMenu({ accountUrl, accountLabel, headerSlot, footerSlot, anonymousContent, signInUrl, }: ProfileMainMenuProps): react_jsx_runtime.JSX.Element;
|
|
2442
2470
|
|
|
2471
|
+
/** Props for {@link ImpersonationBanner}. */
|
|
2472
|
+
interface ImpersonationBannerProps {
|
|
2473
|
+
/**
|
|
2474
|
+
* Where to send the browser after impersonation ends. Defaults to `'/'`.
|
|
2475
|
+
*
|
|
2476
|
+
* A full navigation rather than a client-side route change, because ending impersonation
|
|
2477
|
+
* swaps the auth cookie — every mounted component is now rendering for a different user, and
|
|
2478
|
+
* anything that captured the old principal at mount time would keep showing it.
|
|
2479
|
+
*/
|
|
2480
|
+
returnUrl?: string;
|
|
2481
|
+
/** Extra class applied to the banner element. */
|
|
2482
|
+
className?: string;
|
|
2483
|
+
}
|
|
2484
|
+
/**
|
|
2485
|
+
* Persistent banner shown while an internal user is operating the portal as one of its contacts.
|
|
2486
|
+
* Renders nothing for an ordinary session, so it is safe — and intended — to mount
|
|
2487
|
+
* unconditionally; {@link PageLayout} already does.
|
|
2488
|
+
*
|
|
2489
|
+
* That unconditional mounting is the point. A banner a host can forget to render defeats its own
|
|
2490
|
+
* purpose: the reason it exists is that an administrator must not be able to forget the portal is
|
|
2491
|
+
* answering as somebody else.
|
|
2492
|
+
*
|
|
2493
|
+
* Built on Fluent's own `MessageBar` with `intent="error"` rather than a hand-painted bar, so the
|
|
2494
|
+
* library owns the surface, the intent colour and the icon — and the Stop button is a stock
|
|
2495
|
+
* `Button` on a surface Fluent itself themed. An earlier version painted its own red background
|
|
2496
|
+
* and then had to override the button's colours to stay readable on it, which is what put this
|
|
2497
|
+
* component in the business of fighting the design-token system. Letting the library own the
|
|
2498
|
+
* surface removes that whole class of problem: there is no colour styling left here at all.
|
|
2499
|
+
* Mirrors the Blazor banner, which is built on `FluentMessageBar` for the same reason.
|
|
2500
|
+
*
|
|
2501
|
+
* Reads `auth.user.isImpersonating` from `useAuth()`, so the app must be wrapped in
|
|
2502
|
+
* `<PowerPortalsProProvider>`.
|
|
2503
|
+
*/
|
|
2504
|
+
declare function ImpersonationBanner({ returnUrl, className, }: ImpersonationBannerProps): react_jsx_runtime.JSX.Element | null;
|
|
2505
|
+
|
|
2506
|
+
/** Props for {@link ImpersonationPickerDialog}. */
|
|
2507
|
+
interface ImpersonationPickerDialogProps {
|
|
2508
|
+
/** Whether the dialog is open. */
|
|
2509
|
+
open: boolean;
|
|
2510
|
+
/** Called when the dialog should close — Cancel, dismiss, or Escape. */
|
|
2511
|
+
onClose: () => void;
|
|
2512
|
+
/**
|
|
2513
|
+
* Where to send the browser once impersonation starts. Defaults to `'/'`.
|
|
2514
|
+
*
|
|
2515
|
+
* A full navigation, because the auth cookie has changed: every mounted component is now
|
|
2516
|
+
* rendering for a different user, and anything that captured the old principal at mount time
|
|
2517
|
+
* would keep showing it.
|
|
2518
|
+
*/
|
|
2519
|
+
returnUrl?: string;
|
|
2520
|
+
/** Extra class applied to the dialog surface. */
|
|
2521
|
+
className?: string;
|
|
2522
|
+
}
|
|
2523
|
+
/**
|
|
2524
|
+
* Modal picker for choosing the contact an internal administrator wants to view the portal as.
|
|
2525
|
+
* Typing searches by name, email address, or exact user id; confirming starts impersonation and
|
|
2526
|
+
* reloads the app as that user.
|
|
2527
|
+
*
|
|
2528
|
+
* Presentation only. Every decision about who may impersonate and who may be impersonated is made
|
|
2529
|
+
* server-side — this component cannot widen either, and the endpoint re-checks both regardless of
|
|
2530
|
+
* what the UI offered.
|
|
2531
|
+
*/
|
|
2532
|
+
declare function ImpersonationPickerDialog({ open, onClose, returnUrl, className, }: ImpersonationPickerDialogProps): react_jsx_runtime.JSX.Element;
|
|
2533
|
+
|
|
2443
2534
|
interface SiteSettingsButtonProps {
|
|
2444
2535
|
/**
|
|
2445
2536
|
* When `true` (default), the panel renders the language dropdown.
|
|
@@ -4635,7 +4726,11 @@ interface MainGridProps {
|
|
|
4635
4726
|
* Set to `'virtualize'` for infinite-scroll — the pager footer is
|
|
4636
4727
|
* hidden, rows accumulate across page boundaries, and the next page
|
|
4637
4728
|
* fetches automatically when the user scrolls past the rendered
|
|
4638
|
-
* bottom.
|
|
4729
|
+
* bottom. Pages are requested sequentially with the previous page's
|
|
4730
|
+
* Dataverse paging cookie (cursor paging), and loading stops when the
|
|
4731
|
+
* server reports no more records — not when the accumulated rows reach
|
|
4732
|
+
* the total count, which can never happen if per-row permission
|
|
4733
|
+
* handlers drop rows after Dataverse has counted them.
|
|
4639
4734
|
*/
|
|
4640
4735
|
pagingMode?: PagingMode;
|
|
4641
4736
|
/**
|
|
@@ -6337,4 +6432,4 @@ declare function useFluentChartPalette(scopeRef: RefObject<HTMLElement | null>):
|
|
|
6337
6432
|
|
|
6338
6433
|
declare const VERSION = "0.1.0";
|
|
6339
6434
|
|
|
6340
|
-
export { type AccentColor, type AccentThemePair, type BaseCellRendererProps, type BaseColumnEditProps, Body, type BodyProps, BoolEdit, type BoolEditProps, BoolEditorType, CacheAdmin, type CacheAdminProps, type CellRendererType, ChoiceEdit, type ChoiceEditProps, ChoiceEditorType, ChoiceInvalidValueBehavior, type ChoiceMetadataView, type ChoiceOption, ChoiceOrientation, ChoiceValueSort, ColumnDisplayValue, type ColumnDisplayValueProps, ColumnEdit, type CropAspect, type CropResult, type CustomViewDefinition, DataverseChart, type DataverseChartHandle, type DataverseChartProps, DateTimeEdit, type DateTimeEditProps, DateTimeEditorType, DeleteContextButton, type DeleteContextButtonProps, DeleteRecordGridButton, type DeleteRecordGridButtonProps, DescriptionLocation, type DialogLocation, type FileColumnValue, FileEdit, type FileEditProps, FileGrid, type FileGridProps, type FileSource, FileViewer, type FileViewerProps, type FluentChartPalette, FluentDialogProvider, FluentOverlayProvider, FluentOverlayTarget, FluentUIChart, type FluentUIChartProps, Footer, type FooterProps, GridButton, GridButtonBehavior, type GridButtonProps, GridButtonRole, type GridButtonRoleProps, GridButtons, type GridButtonsProps, GridColumn, type GridColumnAlign, type GridColumnCellRenderer, type GridColumnCellRendererProps, type GridColumnProps, GridColumns, type GridColumnsProps, type GridContextValue, type GridDeclaredColumn, GridTemplateColumn, type GridTemplateColumnCellRenderer, type GridTemplateColumnCellRendererProps, type GridTemplateColumnEditRenderer, type GridTemplateColumnEditRendererProps, type GridTemplateColumnProps, Header, type HeaderProps, Highlighter, type HighlighterProps, ImageEdit, type ImageEditProps, type ImageSource, ImageViewer, type ImageViewerHandle, type ImageViewerProps, LabelPosition, LanguageDropdown, type LanguageDropdownProps, type LinkExistingBulkMode, type LinkExistingRecordBehavior, LinkExistingRecordGridButton, type LinkExistingRecordGridButtonProps, LocalizationAdmin, type LocalizationAdminProps, LocalizationBoundary, type LocalizationBoundaryProps, LocalizationTranslator, type LocalizationTranslatorProps, LogoutButton, type LogoutButtonProps, type LookupColumnValue, LookupDialog, type LookupDialogProps, LookupEdit, type LookupEditProps, LookupEditorType, LookupForm, type LookupFormProps, type LookupMetadataView, MainGrid, type MainGridProps, ManyToManyLookupEdit, type ManyToManyLookupEditProps, ManyToManyLookupEditorType, MaskedTextField, type MaskedTextFieldHandle, type MaskedTextFieldProps, MemoEdit, type MemoEditProps, MenuBar, type MenuBarProps, MoneyEdit, type MoneyEditProps, MultiSelectChoiceEdit, type MultiSelectChoiceEditProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, type NavMatchMode, NavMenu, type NavMenuProps, NavigateNewRecordGridButton, type NavigateNewRecordGridButtonProps, NavigateOpenRecordGridButton, type NavigateOpenRecordGridButtonProps, NavigateRecordGridButton, type NavigateRecordGridButtonContext, type NavigateRecordGridButtonProps, type NewRecordDialogLocation, NewRecordGridButton, type NewRecordGridButtonBehavior, type NewRecordGridButtonProps, NumberEdit, type NumberEditProps, type NumberLimits, type NumberValueType, OFFICE_ACCENT_DEFINITIONS, OFFICE_ACCENT_HEX_TO_NAME, OFFICE_ACCENT_THEMES, OFFICE_COLOR_NAME_TO_ACCENT, type OfficeAccentDefinition, OpenRecordGridButton, type OpenRecordGridButtonBehavior, type OpenRecordGridButtonProps, PageLayout, type PageLayoutProps, PagingMode, type PendingRowCreate, type PendingRowUpdate, type PersistedGridState, type PersistedSort, PowerPortalsProThemeProvider, type PowerPortalsProThemeProviderProps, ProfileMainMenu, type ProfileMainMenuProps, RefreshContextButton, type RefreshContextButtonProps, RefreshGridButton, type RefreshGridButtonProps, RouterUnsavedChangesGuard, SaveContextButton, type SaveContextButtonProps, Section, SectionColumn, SectionColumnOrientation, type SectionColumnProps, type SectionProps, SiteSettingsButton, type SiteSettingsButtonProps, SiteSettingsPanel, type SiteSettingsPanelProps, type StepperVisibility, SubGrid, type SubGridProps, TextDirection, TextEdit, type TextEditProps, ThemeColorSelector, type ThemeColorSelectorProps, type ThemeContextValue, ThemeMode, ThemeSelector, type ThemeSelectorProps, ThemeTextDirection, type ThemeTextDirectionProps, type UnlinkExistingBulkMode, type UnlinkExistingRecordBehavior, UnlinkExistingRecordGridButton, type UnlinkExistingRecordGridButtonProps, VERSION, ValidationSummary, type ValidationSummaryProps, ViewSort, WizardRecordForm, type WizardRecordFormProps, WizardRecordPage, type WizardRecordPageProps, evaluateGridButtonBehavior, findFirstButtonOfRole, getCellRenderer, getChartPalette, getChoiceMetadata, getDisplayDescription, getDisplayLabel, getEditComponentForMetadata, getEditComponentForType, getGridButtonRoleFromElement, getLookupMetadata, getNumberLimits, getRendererTypeForMetadata, getStringMaxLength, isColumnSortable, isMetadataReadOnly, isMetadataRequired, isNewRecord, officeColorValueToAccentName, resolveColumnDisplayValue, setGridButtonRole, splitHighlightSegments, toTranslucent, useBoolColumn, useChoiceColumn, useDateColumn, useFileColumn, useFluentChartPalette, useGridContext, useLookupColumn, useMoneyColumn, useMultiSelectChoiceColumn, useNumberColumn, useStringColumn, useTheme };
|
|
6435
|
+
export { type AccentColor, type AccentThemePair, type BaseCellRendererProps, type BaseColumnEditProps, Body, type BodyProps, BoolEdit, type BoolEditProps, BoolEditorType, CacheAdmin, type CacheAdminProps, type CellRendererType, ChoiceEdit, type ChoiceEditProps, ChoiceEditorType, ChoiceInvalidValueBehavior, type ChoiceMetadataView, type ChoiceOption, ChoiceOrientation, ChoiceValueSort, ColumnDisplayValue, type ColumnDisplayValueProps, ColumnEdit, type CropAspect, type CropResult, type CustomViewDefinition, DataverseChart, type DataverseChartHandle, type DataverseChartProps, DateTimeEdit, type DateTimeEditProps, DateTimeEditorType, DeleteContextButton, type DeleteContextButtonProps, DeleteRecordGridButton, type DeleteRecordGridButtonProps, DescriptionLocation, type DialogLocation, type FileColumnValue, FileEdit, type FileEditProps, FileGrid, type FileGridProps, type FileSource, FileViewer, type FileViewerProps, type FluentChartPalette, FluentDialogProvider, FluentOverlayProvider, FluentOverlayTarget, FluentUIChart, type FluentUIChartProps, Footer, type FooterProps, GridButton, GridButtonBehavior, type GridButtonProps, GridButtonRole, type GridButtonRoleProps, GridButtons, type GridButtonsProps, GridColumn, type GridColumnAlign, type GridColumnCellRenderer, type GridColumnCellRendererProps, type GridColumnProps, GridColumns, type GridColumnsProps, type GridContextValue, type GridDeclaredColumn, GridTemplateColumn, type GridTemplateColumnCellRenderer, type GridTemplateColumnCellRendererProps, type GridTemplateColumnEditRenderer, type GridTemplateColumnEditRendererProps, type GridTemplateColumnProps, Header, type HeaderProps, Highlighter, type HighlighterProps, ImageEdit, type ImageEditProps, type ImageSource, ImageViewer, type ImageViewerHandle, type ImageViewerProps, ImpersonationBanner, type ImpersonationBannerProps, ImpersonationPickerDialog, type ImpersonationPickerDialogProps, LabelPosition, LanguageDropdown, type LanguageDropdownProps, type LinkExistingBulkMode, type LinkExistingRecordBehavior, LinkExistingRecordGridButton, type LinkExistingRecordGridButtonProps, LocalizationAdmin, type LocalizationAdminProps, LocalizationBoundary, type LocalizationBoundaryProps, LocalizationTranslator, type LocalizationTranslatorProps, LogoutButton, type LogoutButtonProps, type LookupColumnValue, LookupDialog, type LookupDialogProps, LookupEdit, type LookupEditProps, LookupEditorType, LookupForm, type LookupFormProps, type LookupMetadataView, MainGrid, type MainGridProps, ManyToManyLookupEdit, type ManyToManyLookupEditProps, ManyToManyLookupEditorType, MaskedTextField, type MaskedTextFieldHandle, type MaskedTextFieldProps, MemoEdit, type MemoEditProps, MenuBar, type MenuBarProps, MoneyEdit, type MoneyEditProps, MultiSelectChoiceEdit, type MultiSelectChoiceEditProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, type NavMatchMode, NavMenu, type NavMenuProps, NavigateNewRecordGridButton, type NavigateNewRecordGridButtonProps, NavigateOpenRecordGridButton, type NavigateOpenRecordGridButtonProps, NavigateRecordGridButton, type NavigateRecordGridButtonContext, type NavigateRecordGridButtonProps, type NewRecordDialogLocation, NewRecordGridButton, type NewRecordGridButtonBehavior, type NewRecordGridButtonProps, NumberEdit, type NumberEditProps, type NumberLimits, type NumberValueType, OFFICE_ACCENT_DEFINITIONS, OFFICE_ACCENT_HEX_TO_NAME, OFFICE_ACCENT_THEMES, OFFICE_COLOR_NAME_TO_ACCENT, type OfficeAccentDefinition, OpenRecordGridButton, type OpenRecordGridButtonBehavior, type OpenRecordGridButtonProps, PageLayout, type PageLayoutProps, PagingMode, type PendingRowCreate, type PendingRowUpdate, type PersistedGridState, type PersistedSort, PowerPortalsProThemeProvider, type PowerPortalsProThemeProviderProps, ProfileMainMenu, type ProfileMainMenuProps, RefreshContextButton, type RefreshContextButtonProps, RefreshGridButton, type RefreshGridButtonProps, RouterUnsavedChangesGuard, SaveContextButton, type SaveContextButtonProps, Section, SectionColumn, SectionColumnOrientation, type SectionColumnProps, type SectionProps, SiteSettingsButton, type SiteSettingsButtonProps, SiteSettingsPanel, type SiteSettingsPanelProps, type StepperVisibility, SubGrid, type SubGridProps, TextDirection, TextEdit, type TextEditProps, ThemeColorSelector, type ThemeColorSelectorProps, type ThemeContextValue, ThemeMode, ThemeSelector, type ThemeSelectorProps, ThemeTextDirection, type ThemeTextDirectionProps, type UnlinkExistingBulkMode, type UnlinkExistingRecordBehavior, UnlinkExistingRecordGridButton, type UnlinkExistingRecordGridButtonProps, VERSION, ValidationSummary, type ValidationSummaryProps, ViewSort, WizardRecordForm, type WizardRecordFormProps, WizardRecordPage, type WizardRecordPageProps, evaluateGridButtonBehavior, findFirstButtonOfRole, getCellRenderer, getChartPalette, getChoiceMetadata, getDisplayDescription, getDisplayLabel, getEditComponentForMetadata, getEditComponentForType, getGridButtonRoleFromElement, getLookupMetadata, getNumberLimits, getRendererTypeForMetadata, getStringMaxLength, isColumnSortable, isMetadataReadOnly, isMetadataRequired, isNewRecord, officeColorValueToAccentName, resolveColumnDisplayValue, setGridButtonRole, splitHighlightSegments, toTranslucent, useBoolColumn, useChoiceColumn, useDateColumn, useFileColumn, useFluentChartPalette, useGridContext, useLookupColumn, useMoneyColumn, useMultiSelectChoiceColumn, useNumberColumn, useStringColumn, useTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -2010,6 +2010,15 @@ interface ThemeContextValue {
|
|
|
2010
2010
|
* option list.
|
|
2011
2011
|
*/
|
|
2012
2012
|
readonly availableAccents: readonly AccentColor[];
|
|
2013
|
+
/**
|
|
2014
|
+
* Whether the site fixes its accent color via
|
|
2015
|
+
* `<PowerPortalsProThemeProvider lockAccentColor>`. When `true`,
|
|
2016
|
+
* {@link setAccentColor} is a no-op, any persisted preference is
|
|
2017
|
+
* ignored in favour of the configured accent, and
|
|
2018
|
+
* `<ThemeColorSelector>` renders nothing. Read it before offering
|
|
2019
|
+
* any accent-changing UI of your own.
|
|
2020
|
+
*/
|
|
2021
|
+
readonly accentColorLocked: boolean;
|
|
2013
2022
|
/**
|
|
2014
2023
|
* Each accent's representative brand-fill color (hex). Drives the
|
|
2015
2024
|
* color swatch rendered next to each option in
|
|
@@ -2061,6 +2070,21 @@ interface PowerPortalsProThemeProviderProps {
|
|
|
2061
2070
|
* is set. Defaults to `'ltr'`.
|
|
2062
2071
|
*/
|
|
2063
2072
|
defaultTextDirection?: TextDirection;
|
|
2073
|
+
/**
|
|
2074
|
+
* Fixes the site's accent color to `defaultAccentColor`. Without
|
|
2075
|
+
* it, that prop is only a *default*: a visitor who once picked an
|
|
2076
|
+
* accent keeps it forever, because the persisted preference wins.
|
|
2077
|
+
* With it, the configured accent always wins, the persisted value
|
|
2078
|
+
* is rewritten to match, `setAccentColor` becomes a no-op, and
|
|
2079
|
+
* `<ThemeColorSelector>` (and therefore the accent section of
|
|
2080
|
+
* `<SiteSettingsPanel>`) renders nothing. Light/dark mode stays
|
|
2081
|
+
* under the visitor's control either way.
|
|
2082
|
+
*
|
|
2083
|
+
* Pair it with a `customAccents` entry at the `'default'` key to
|
|
2084
|
+
* lock the site to your own brand rather than one of the built-in
|
|
2085
|
+
* Office accents.
|
|
2086
|
+
*/
|
|
2087
|
+
lockAccentColor?: boolean;
|
|
2064
2088
|
/**
|
|
2065
2089
|
* Consumer-supplied custom accents, layered ON TOP of the built-in
|
|
2066
2090
|
* Office-brand palette (`'default'`, `'teams'`, `'excel'`, `'word'`,
|
|
@@ -2132,7 +2156,7 @@ interface PowerPortalsProThemeProviderProps {
|
|
|
2132
2156
|
* </PowerPortalsProThemeProvider>
|
|
2133
2157
|
* ```
|
|
2134
2158
|
*/
|
|
2135
|
-
declare function PowerPortalsProThemeProvider({ children, defaultMode, defaultAccentColor, defaultTextDirection, customAccents, storageKey, style, fluentProviderProps, }: PowerPortalsProThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
2159
|
+
declare function PowerPortalsProThemeProvider({ children, defaultMode, defaultAccentColor, defaultTextDirection, lockAccentColor, customAccents, storageKey, style, fluentProviderProps, }: PowerPortalsProThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
2136
2160
|
|
|
2137
2161
|
interface ThemeSelectorProps {
|
|
2138
2162
|
/** Disable the control. Useful when displaying the user's read-only preference. */
|
|
@@ -2196,8 +2220,12 @@ interface ThemeColorSelectorProps {
|
|
|
2196
2220
|
* `app.components.theme-color-selector.accent.<key>`. Missing keys
|
|
2197
2221
|
* fall back to the accent's raw string (so an unlocalized custom
|
|
2198
2222
|
* accent like `'forest'` shows as `"forest"` rather than blank).
|
|
2223
|
+
*
|
|
2224
|
+
* Renders nothing when the site fixes its accent via
|
|
2225
|
+
* `<PowerPortalsProThemeProvider lockAccentColor>` — a picker whose
|
|
2226
|
+
* choice is discarded is worse than no picker.
|
|
2199
2227
|
*/
|
|
2200
|
-
declare function ThemeColorSelector({ readOnly, label, width, accentLabels, }: ThemeColorSelectorProps): react_jsx_runtime.JSX.Element;
|
|
2228
|
+
declare function ThemeColorSelector({ readOnly, label, width, accentLabels, }: ThemeColorSelectorProps): react_jsx_runtime.JSX.Element | null;
|
|
2201
2229
|
|
|
2202
2230
|
/**
|
|
2203
2231
|
* Canonical accent definition. One entry per visually-distinct brand
|
|
@@ -2440,6 +2468,69 @@ interface ProfileMainMenuProps {
|
|
|
2440
2468
|
*/
|
|
2441
2469
|
declare function ProfileMainMenu({ accountUrl, accountLabel, headerSlot, footerSlot, anonymousContent, signInUrl, }: ProfileMainMenuProps): react_jsx_runtime.JSX.Element;
|
|
2442
2470
|
|
|
2471
|
+
/** Props for {@link ImpersonationBanner}. */
|
|
2472
|
+
interface ImpersonationBannerProps {
|
|
2473
|
+
/**
|
|
2474
|
+
* Where to send the browser after impersonation ends. Defaults to `'/'`.
|
|
2475
|
+
*
|
|
2476
|
+
* A full navigation rather than a client-side route change, because ending impersonation
|
|
2477
|
+
* swaps the auth cookie — every mounted component is now rendering for a different user, and
|
|
2478
|
+
* anything that captured the old principal at mount time would keep showing it.
|
|
2479
|
+
*/
|
|
2480
|
+
returnUrl?: string;
|
|
2481
|
+
/** Extra class applied to the banner element. */
|
|
2482
|
+
className?: string;
|
|
2483
|
+
}
|
|
2484
|
+
/**
|
|
2485
|
+
* Persistent banner shown while an internal user is operating the portal as one of its contacts.
|
|
2486
|
+
* Renders nothing for an ordinary session, so it is safe — and intended — to mount
|
|
2487
|
+
* unconditionally; {@link PageLayout} already does.
|
|
2488
|
+
*
|
|
2489
|
+
* That unconditional mounting is the point. A banner a host can forget to render defeats its own
|
|
2490
|
+
* purpose: the reason it exists is that an administrator must not be able to forget the portal is
|
|
2491
|
+
* answering as somebody else.
|
|
2492
|
+
*
|
|
2493
|
+
* Built on Fluent's own `MessageBar` with `intent="error"` rather than a hand-painted bar, so the
|
|
2494
|
+
* library owns the surface, the intent colour and the icon — and the Stop button is a stock
|
|
2495
|
+
* `Button` on a surface Fluent itself themed. An earlier version painted its own red background
|
|
2496
|
+
* and then had to override the button's colours to stay readable on it, which is what put this
|
|
2497
|
+
* component in the business of fighting the design-token system. Letting the library own the
|
|
2498
|
+
* surface removes that whole class of problem: there is no colour styling left here at all.
|
|
2499
|
+
* Mirrors the Blazor banner, which is built on `FluentMessageBar` for the same reason.
|
|
2500
|
+
*
|
|
2501
|
+
* Reads `auth.user.isImpersonating` from `useAuth()`, so the app must be wrapped in
|
|
2502
|
+
* `<PowerPortalsProProvider>`.
|
|
2503
|
+
*/
|
|
2504
|
+
declare function ImpersonationBanner({ returnUrl, className, }: ImpersonationBannerProps): react_jsx_runtime.JSX.Element | null;
|
|
2505
|
+
|
|
2506
|
+
/** Props for {@link ImpersonationPickerDialog}. */
|
|
2507
|
+
interface ImpersonationPickerDialogProps {
|
|
2508
|
+
/** Whether the dialog is open. */
|
|
2509
|
+
open: boolean;
|
|
2510
|
+
/** Called when the dialog should close — Cancel, dismiss, or Escape. */
|
|
2511
|
+
onClose: () => void;
|
|
2512
|
+
/**
|
|
2513
|
+
* Where to send the browser once impersonation starts. Defaults to `'/'`.
|
|
2514
|
+
*
|
|
2515
|
+
* A full navigation, because the auth cookie has changed: every mounted component is now
|
|
2516
|
+
* rendering for a different user, and anything that captured the old principal at mount time
|
|
2517
|
+
* would keep showing it.
|
|
2518
|
+
*/
|
|
2519
|
+
returnUrl?: string;
|
|
2520
|
+
/** Extra class applied to the dialog surface. */
|
|
2521
|
+
className?: string;
|
|
2522
|
+
}
|
|
2523
|
+
/**
|
|
2524
|
+
* Modal picker for choosing the contact an internal administrator wants to view the portal as.
|
|
2525
|
+
* Typing searches by name, email address, or exact user id; confirming starts impersonation and
|
|
2526
|
+
* reloads the app as that user.
|
|
2527
|
+
*
|
|
2528
|
+
* Presentation only. Every decision about who may impersonate and who may be impersonated is made
|
|
2529
|
+
* server-side — this component cannot widen either, and the endpoint re-checks both regardless of
|
|
2530
|
+
* what the UI offered.
|
|
2531
|
+
*/
|
|
2532
|
+
declare function ImpersonationPickerDialog({ open, onClose, returnUrl, className, }: ImpersonationPickerDialogProps): react_jsx_runtime.JSX.Element;
|
|
2533
|
+
|
|
2443
2534
|
interface SiteSettingsButtonProps {
|
|
2444
2535
|
/**
|
|
2445
2536
|
* When `true` (default), the panel renders the language dropdown.
|
|
@@ -4635,7 +4726,11 @@ interface MainGridProps {
|
|
|
4635
4726
|
* Set to `'virtualize'` for infinite-scroll — the pager footer is
|
|
4636
4727
|
* hidden, rows accumulate across page boundaries, and the next page
|
|
4637
4728
|
* fetches automatically when the user scrolls past the rendered
|
|
4638
|
-
* bottom.
|
|
4729
|
+
* bottom. Pages are requested sequentially with the previous page's
|
|
4730
|
+
* Dataverse paging cookie (cursor paging), and loading stops when the
|
|
4731
|
+
* server reports no more records — not when the accumulated rows reach
|
|
4732
|
+
* the total count, which can never happen if per-row permission
|
|
4733
|
+
* handlers drop rows after Dataverse has counted them.
|
|
4639
4734
|
*/
|
|
4640
4735
|
pagingMode?: PagingMode;
|
|
4641
4736
|
/**
|
|
@@ -6337,4 +6432,4 @@ declare function useFluentChartPalette(scopeRef: RefObject<HTMLElement | null>):
|
|
|
6337
6432
|
|
|
6338
6433
|
declare const VERSION = "0.1.0";
|
|
6339
6434
|
|
|
6340
|
-
export { type AccentColor, type AccentThemePair, type BaseCellRendererProps, type BaseColumnEditProps, Body, type BodyProps, BoolEdit, type BoolEditProps, BoolEditorType, CacheAdmin, type CacheAdminProps, type CellRendererType, ChoiceEdit, type ChoiceEditProps, ChoiceEditorType, ChoiceInvalidValueBehavior, type ChoiceMetadataView, type ChoiceOption, ChoiceOrientation, ChoiceValueSort, ColumnDisplayValue, type ColumnDisplayValueProps, ColumnEdit, type CropAspect, type CropResult, type CustomViewDefinition, DataverseChart, type DataverseChartHandle, type DataverseChartProps, DateTimeEdit, type DateTimeEditProps, DateTimeEditorType, DeleteContextButton, type DeleteContextButtonProps, DeleteRecordGridButton, type DeleteRecordGridButtonProps, DescriptionLocation, type DialogLocation, type FileColumnValue, FileEdit, type FileEditProps, FileGrid, type FileGridProps, type FileSource, FileViewer, type FileViewerProps, type FluentChartPalette, FluentDialogProvider, FluentOverlayProvider, FluentOverlayTarget, FluentUIChart, type FluentUIChartProps, Footer, type FooterProps, GridButton, GridButtonBehavior, type GridButtonProps, GridButtonRole, type GridButtonRoleProps, GridButtons, type GridButtonsProps, GridColumn, type GridColumnAlign, type GridColumnCellRenderer, type GridColumnCellRendererProps, type GridColumnProps, GridColumns, type GridColumnsProps, type GridContextValue, type GridDeclaredColumn, GridTemplateColumn, type GridTemplateColumnCellRenderer, type GridTemplateColumnCellRendererProps, type GridTemplateColumnEditRenderer, type GridTemplateColumnEditRendererProps, type GridTemplateColumnProps, Header, type HeaderProps, Highlighter, type HighlighterProps, ImageEdit, type ImageEditProps, type ImageSource, ImageViewer, type ImageViewerHandle, type ImageViewerProps, LabelPosition, LanguageDropdown, type LanguageDropdownProps, type LinkExistingBulkMode, type LinkExistingRecordBehavior, LinkExistingRecordGridButton, type LinkExistingRecordGridButtonProps, LocalizationAdmin, type LocalizationAdminProps, LocalizationBoundary, type LocalizationBoundaryProps, LocalizationTranslator, type LocalizationTranslatorProps, LogoutButton, type LogoutButtonProps, type LookupColumnValue, LookupDialog, type LookupDialogProps, LookupEdit, type LookupEditProps, LookupEditorType, LookupForm, type LookupFormProps, type LookupMetadataView, MainGrid, type MainGridProps, ManyToManyLookupEdit, type ManyToManyLookupEditProps, ManyToManyLookupEditorType, MaskedTextField, type MaskedTextFieldHandle, type MaskedTextFieldProps, MemoEdit, type MemoEditProps, MenuBar, type MenuBarProps, MoneyEdit, type MoneyEditProps, MultiSelectChoiceEdit, type MultiSelectChoiceEditProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, type NavMatchMode, NavMenu, type NavMenuProps, NavigateNewRecordGridButton, type NavigateNewRecordGridButtonProps, NavigateOpenRecordGridButton, type NavigateOpenRecordGridButtonProps, NavigateRecordGridButton, type NavigateRecordGridButtonContext, type NavigateRecordGridButtonProps, type NewRecordDialogLocation, NewRecordGridButton, type NewRecordGridButtonBehavior, type NewRecordGridButtonProps, NumberEdit, type NumberEditProps, type NumberLimits, type NumberValueType, OFFICE_ACCENT_DEFINITIONS, OFFICE_ACCENT_HEX_TO_NAME, OFFICE_ACCENT_THEMES, OFFICE_COLOR_NAME_TO_ACCENT, type OfficeAccentDefinition, OpenRecordGridButton, type OpenRecordGridButtonBehavior, type OpenRecordGridButtonProps, PageLayout, type PageLayoutProps, PagingMode, type PendingRowCreate, type PendingRowUpdate, type PersistedGridState, type PersistedSort, PowerPortalsProThemeProvider, type PowerPortalsProThemeProviderProps, ProfileMainMenu, type ProfileMainMenuProps, RefreshContextButton, type RefreshContextButtonProps, RefreshGridButton, type RefreshGridButtonProps, RouterUnsavedChangesGuard, SaveContextButton, type SaveContextButtonProps, Section, SectionColumn, SectionColumnOrientation, type SectionColumnProps, type SectionProps, SiteSettingsButton, type SiteSettingsButtonProps, SiteSettingsPanel, type SiteSettingsPanelProps, type StepperVisibility, SubGrid, type SubGridProps, TextDirection, TextEdit, type TextEditProps, ThemeColorSelector, type ThemeColorSelectorProps, type ThemeContextValue, ThemeMode, ThemeSelector, type ThemeSelectorProps, ThemeTextDirection, type ThemeTextDirectionProps, type UnlinkExistingBulkMode, type UnlinkExistingRecordBehavior, UnlinkExistingRecordGridButton, type UnlinkExistingRecordGridButtonProps, VERSION, ValidationSummary, type ValidationSummaryProps, ViewSort, WizardRecordForm, type WizardRecordFormProps, WizardRecordPage, type WizardRecordPageProps, evaluateGridButtonBehavior, findFirstButtonOfRole, getCellRenderer, getChartPalette, getChoiceMetadata, getDisplayDescription, getDisplayLabel, getEditComponentForMetadata, getEditComponentForType, getGridButtonRoleFromElement, getLookupMetadata, getNumberLimits, getRendererTypeForMetadata, getStringMaxLength, isColumnSortable, isMetadataReadOnly, isMetadataRequired, isNewRecord, officeColorValueToAccentName, resolveColumnDisplayValue, setGridButtonRole, splitHighlightSegments, toTranslucent, useBoolColumn, useChoiceColumn, useDateColumn, useFileColumn, useFluentChartPalette, useGridContext, useLookupColumn, useMoneyColumn, useMultiSelectChoiceColumn, useNumberColumn, useStringColumn, useTheme };
|
|
6435
|
+
export { type AccentColor, type AccentThemePair, type BaseCellRendererProps, type BaseColumnEditProps, Body, type BodyProps, BoolEdit, type BoolEditProps, BoolEditorType, CacheAdmin, type CacheAdminProps, type CellRendererType, ChoiceEdit, type ChoiceEditProps, ChoiceEditorType, ChoiceInvalidValueBehavior, type ChoiceMetadataView, type ChoiceOption, ChoiceOrientation, ChoiceValueSort, ColumnDisplayValue, type ColumnDisplayValueProps, ColumnEdit, type CropAspect, type CropResult, type CustomViewDefinition, DataverseChart, type DataverseChartHandle, type DataverseChartProps, DateTimeEdit, type DateTimeEditProps, DateTimeEditorType, DeleteContextButton, type DeleteContextButtonProps, DeleteRecordGridButton, type DeleteRecordGridButtonProps, DescriptionLocation, type DialogLocation, type FileColumnValue, FileEdit, type FileEditProps, FileGrid, type FileGridProps, type FileSource, FileViewer, type FileViewerProps, type FluentChartPalette, FluentDialogProvider, FluentOverlayProvider, FluentOverlayTarget, FluentUIChart, type FluentUIChartProps, Footer, type FooterProps, GridButton, GridButtonBehavior, type GridButtonProps, GridButtonRole, type GridButtonRoleProps, GridButtons, type GridButtonsProps, GridColumn, type GridColumnAlign, type GridColumnCellRenderer, type GridColumnCellRendererProps, type GridColumnProps, GridColumns, type GridColumnsProps, type GridContextValue, type GridDeclaredColumn, GridTemplateColumn, type GridTemplateColumnCellRenderer, type GridTemplateColumnCellRendererProps, type GridTemplateColumnEditRenderer, type GridTemplateColumnEditRendererProps, type GridTemplateColumnProps, Header, type HeaderProps, Highlighter, type HighlighterProps, ImageEdit, type ImageEditProps, type ImageSource, ImageViewer, type ImageViewerHandle, type ImageViewerProps, ImpersonationBanner, type ImpersonationBannerProps, ImpersonationPickerDialog, type ImpersonationPickerDialogProps, LabelPosition, LanguageDropdown, type LanguageDropdownProps, type LinkExistingBulkMode, type LinkExistingRecordBehavior, LinkExistingRecordGridButton, type LinkExistingRecordGridButtonProps, LocalizationAdmin, type LocalizationAdminProps, LocalizationBoundary, type LocalizationBoundaryProps, LocalizationTranslator, type LocalizationTranslatorProps, LogoutButton, type LogoutButtonProps, type LookupColumnValue, LookupDialog, type LookupDialogProps, LookupEdit, type LookupEditProps, LookupEditorType, LookupForm, type LookupFormProps, type LookupMetadataView, MainGrid, type MainGridProps, ManyToManyLookupEdit, type ManyToManyLookupEditProps, ManyToManyLookupEditorType, MaskedTextField, type MaskedTextFieldHandle, type MaskedTextFieldProps, MemoEdit, type MemoEditProps, MenuBar, type MenuBarProps, MoneyEdit, type MoneyEditProps, MultiSelectChoiceEdit, type MultiSelectChoiceEditProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, type NavMatchMode, NavMenu, type NavMenuProps, NavigateNewRecordGridButton, type NavigateNewRecordGridButtonProps, NavigateOpenRecordGridButton, type NavigateOpenRecordGridButtonProps, NavigateRecordGridButton, type NavigateRecordGridButtonContext, type NavigateRecordGridButtonProps, type NewRecordDialogLocation, NewRecordGridButton, type NewRecordGridButtonBehavior, type NewRecordGridButtonProps, NumberEdit, type NumberEditProps, type NumberLimits, type NumberValueType, OFFICE_ACCENT_DEFINITIONS, OFFICE_ACCENT_HEX_TO_NAME, OFFICE_ACCENT_THEMES, OFFICE_COLOR_NAME_TO_ACCENT, type OfficeAccentDefinition, OpenRecordGridButton, type OpenRecordGridButtonBehavior, type OpenRecordGridButtonProps, PageLayout, type PageLayoutProps, PagingMode, type PendingRowCreate, type PendingRowUpdate, type PersistedGridState, type PersistedSort, PowerPortalsProThemeProvider, type PowerPortalsProThemeProviderProps, ProfileMainMenu, type ProfileMainMenuProps, RefreshContextButton, type RefreshContextButtonProps, RefreshGridButton, type RefreshGridButtonProps, RouterUnsavedChangesGuard, SaveContextButton, type SaveContextButtonProps, Section, SectionColumn, SectionColumnOrientation, type SectionColumnProps, type SectionProps, SiteSettingsButton, type SiteSettingsButtonProps, SiteSettingsPanel, type SiteSettingsPanelProps, type StepperVisibility, SubGrid, type SubGridProps, TextDirection, TextEdit, type TextEditProps, ThemeColorSelector, type ThemeColorSelectorProps, type ThemeContextValue, ThemeMode, ThemeSelector, type ThemeSelectorProps, ThemeTextDirection, type ThemeTextDirectionProps, type UnlinkExistingBulkMode, type UnlinkExistingRecordBehavior, UnlinkExistingRecordGridButton, type UnlinkExistingRecordGridButtonProps, VERSION, ValidationSummary, type ValidationSummaryProps, ViewSort, WizardRecordForm, type WizardRecordFormProps, WizardRecordPage, type WizardRecordPageProps, evaluateGridButtonBehavior, findFirstButtonOfRole, getCellRenderer, getChartPalette, getChoiceMetadata, getDisplayDescription, getDisplayLabel, getEditComponentForMetadata, getEditComponentForType, getGridButtonRoleFromElement, getLookupMetadata, getNumberLimits, getRendererTypeForMetadata, getStringMaxLength, isColumnSortable, isMetadataReadOnly, isMetadataRequired, isNewRecord, officeColorValueToAccentName, resolveColumnDisplayValue, setGridButtonRole, splitHighlightSegments, toTranslucent, useBoolColumn, useChoiceColumn, useDateColumn, useFileColumn, useFluentChartPalette, useGridContext, useLookupColumn, useMoneyColumn, useMultiSelectChoiceColumn, useNumberColumn, useStringColumn, useTheme };
|