@kasmav/aeropivot-server-client
v0.1.3
Published
Optional server-side datasource client for AeroPivot Enterprise.
Maintainers
Readme
AeroPivot Server Client
Optional datasource adapter for connecting @kasmav/aeropivot to a
customer-hosted AeroPivot Server backend.
The adapter does not include the web component UI. Enterprise customers install both packages:
npm install @kasmav/aeropivot @kasmav/aeropivot-server-clientimport "@kasmav/aeropivot";
import { AeroPivotServerDatasource } from "@kasmav/aeropivot-server-client";
const pivot = document.querySelector("pivot-table") as any;
pivot.config = {
mode: "server",
rows: [{ id: "Region", name: "Region", type: "string" }],
columns: [{ id: "Item Type", name: "Item Type", type: "string" }],
values: [{ id: "Units Sold", name: "Units Sold", type: "number", summary: "Sum" }],
filters: [],
sorting: [],
serverSideDatasource: new AeroPivotServerDatasource({
endpoint: "https://customer-host/aeropivot-server/api/v1",
sourceId: "sales_20m",
getAuthHeaders: async () => ({ Authorization: `Bearer ${token}` })
})
};