@contextand/pcf-core-config
v0.1.1
Published
Self-contained PCF configuration foundation: a configuration dialog with built-in Theme + Translations, plus org-wide theming and localization. Depends only on React, Fluent UI v9, and the PCF host context surface.
Readme
⚠️ Requirements:
⚠️ - Requires Core solution in Dataverse environment to work properly! ⚠️@contextand/pcf-core-config
A self-contained PCF configuration foundation. It gives any Power Apps Component Framework (PCF) control a configuration dialog with built-in Theme and Translations sections, plus org-wide theming and localization — driven by a small, manifest-agnostic view of the PCF host context.
The package depends only on React, Fluent UI v9, and the global
ComponentFramework types. It never imports host code, so it can be dropped into
any PCF control unchanged.
Installation
npm install @contextand/pcf-core-configreact, react-dom, and @fluentui/react-components are peer dependencies —
the host PCF must provide them so there is a single React/Fluent instance.
Usage
Wrap your control in the provider and place the dialog where you want it:
import {
ConfigFoundationProvider,
ConfigDialog,
useConfig,
} from "@contextand/pcf-core-config";
export function App({ context }: { context: ComponentFramework.Context<IInputs> }) {
return (
<ConfigFoundationProvider context={context} sections={mySections}>
{/* your control */}
<ConfigDialog />
</ConfigFoundationProvider>
);
}A host's full ComponentFramework.Context<IInputs> is structurally assignable to
the PcfHostContext the provider expects, so no casts or generics are required.
See the package's src/index.ts for the full public surface.
Build
npm run build # tsc -> dist/ (JS + .d.ts)
npm run rebuild # clean + build
npm run lint