pivotkit-react 0.0.0-stage → 0.1.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/CHANGELOG.md +300 -0
- package/LICENSE +21 -0
- package/README.md +327 -2
- package/dist/chunks/chunk-C32TYSHG.js +441 -0
- package/dist/chunks/chunk-ILHFIV2P.js +784 -0
- package/dist/chunks/chunk-KKJO36W5.js +1833 -0
- package/dist/chunks/chunk-XYP47DJ3.js +123 -0
- package/dist/echarts.js +262 -0
- package/dist/index.js +3390 -0
- package/dist/labels.js +12 -0
- package/dist/menus.js +1085 -0
- package/dist/styles.css +2447 -0
- package/package.json +70 -4
- package/types/PivotReport.d.ts +20 -0
- package/types/all-labels.d.ts +5 -0
- package/types/chart-decorate.d.ts +16 -0
- package/types/chart-options.d.ts +23 -0
- package/types/chart-summary.d.ts +12 -0
- package/types/chart-tooltip.d.ts +38 -0
- package/types/chart-types.d.ts +152 -0
- package/types/chart.d.ts +39 -0
- package/types/chip-menus.d.ts +32 -0
- package/types/clear-input.d.ts +20 -0
- package/types/dnd-moves.d.ts +45 -0
- package/types/dnd.d.ts +101 -0
- package/types/dom.d.ts +52 -0
- package/types/drill-export.d.ts +42 -0
- package/types/drill-panel.d.ts +39 -0
- package/types/drill.d.ts +62 -0
- package/types/echarts.d.ts +4 -0
- package/types/export-run.d.ts +59 -0
- package/types/field-info.d.ts +34 -0
- package/types/fields.d.ts +32 -0
- package/types/files.d.ts +27 -0
- package/types/filter.d.ts +21 -0
- package/types/icons.d.ts +76 -0
- package/types/index.d.ts +536 -0
- package/types/info.d.ts +34 -0
- package/types/iso.d.ts +2 -0
- package/types/labels.d.ts +721 -0
- package/types/lazy-menus.d.ts +16 -0
- package/types/menu-labels.d.ts +255 -0
- package/types/menus.d.ts +7 -0
- package/types/names.d.ts +80 -0
- package/types/numbers.d.ts +13 -0
- package/types/overflow.d.ts +59 -0
- package/types/place.d.ts +43 -0
- package/types/popover.d.ts +89 -0
- package/types/rove.d.ts +20 -0
- package/types/section.d.ts +42 -0
- package/types/share.d.ts +123 -0
- package/types/skeleton.d.ts +9 -0
- package/types/storage.d.ts +24 -0
- package/types/table.d.ts +23 -0
- package/types/templates.d.ts +40 -0
- package/types/theme.d.ts +24 -0
- package/types/tip-list.d.ts +20 -0
- package/types/tips.d.ts +298 -0
- package/types/toasts.d.ts +26 -0
- package/types/toolbar-panels.d.ts +90 -0
- package/types/toolbar.d.ts +5 -0
- package/types/use-big-result.d.ts +29 -0
- package/types/use-export.d.ts +7 -0
- package/types/use-theme.d.ts +11 -0
- package/types/use-view-history.d.ts +34 -0
- package/types/version.d.ts +2 -0
- package/types/view-history.d.ts +89 -0
- package/types/view-ops.d.ts +344 -0
- package/types/view-store.d.ts +52 -0
- package/types/virtual.d.ts +44 -0
- package/types/zones.d.ts +42 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type DrillExportKind = "drill-copy" | "drill-json" | "drill-csv" | "drill-xlsx";
|
|
2
|
+
/** @typedef {"drill-copy" | "drill-json" | "drill-csv" | "drill-xlsx"} DrillExportKind */
|
|
3
|
+
/**
|
|
4
|
+
* What the export holds, in words: "4 rows", or "1,000 of 4,212 rows" when the panel shows the first
|
|
5
|
+
* of more.
|
|
6
|
+
* @param {{ shown: number, count: number }} part
|
|
7
|
+
* @param {import("./labels.js").UiLabels} labels
|
|
8
|
+
* @param {string} locale
|
|
9
|
+
*/
|
|
10
|
+
export declare function rowsText({ shown, count }: {
|
|
11
|
+
shown: number;
|
|
12
|
+
count: number;
|
|
13
|
+
}, labels: import("./labels.js").UiLabels, locale: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* @param {DrillExportKind} kind
|
|
16
|
+
* @param {{ drill: { name: string, count: number, locale: string, indices: ArrayLike<number>, formats: Record<string, string>,
|
|
17
|
+
* columns: Array<{ name: string, label?: string }>, rows: string[][] },
|
|
18
|
+
* encoded: import("pivotkit-core").Encoded, labels: import("./labels.js").UiLabels,
|
|
19
|
+
* onExport?: (file: import("./export-run.js").ExportFile) => unknown,
|
|
20
|
+
* announce: (text: string, extra?: { tone?: "error" }) => void, root: HTMLElement | null }} context
|
|
21
|
+
*/
|
|
22
|
+
export declare function exportDrill(kind: DrillExportKind, { drill, encoded, labels, onExport, announce, root }: {
|
|
23
|
+
drill: {
|
|
24
|
+
name: string;
|
|
25
|
+
count: number;
|
|
26
|
+
locale: string;
|
|
27
|
+
indices: ArrayLike<number>;
|
|
28
|
+
formats: Record<string, string>;
|
|
29
|
+
columns: Array<{
|
|
30
|
+
name: string;
|
|
31
|
+
label?: string;
|
|
32
|
+
}>;
|
|
33
|
+
rows: string[][];
|
|
34
|
+
};
|
|
35
|
+
encoded: import("pivotkit-core").Encoded;
|
|
36
|
+
labels: import("./labels.js").UiLabels;
|
|
37
|
+
onExport?: (file: import("./export-run.js").ExportFile) => unknown;
|
|
38
|
+
announce: (text: string, extra?: {
|
|
39
|
+
tone?: "error";
|
|
40
|
+
}) => void;
|
|
41
|
+
root: HTMLElement | null;
|
|
42
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type Drill = {
|
|
3
|
+
title: string;
|
|
4
|
+
name: string;
|
|
5
|
+
count: number;
|
|
6
|
+
locale: string;
|
|
7
|
+
indices: ArrayLike<number>;
|
|
8
|
+
formats: Record<string, string>;
|
|
9
|
+
columns: Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
numeric: boolean;
|
|
12
|
+
label?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
}>;
|
|
15
|
+
rows: string[][];
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @typedef {{ title: string, name: string, count: number, locale: string, indices: ArrayLike<number>, formats: Record<string, string>,
|
|
19
|
+
* columns: Array<{ name: string, numeric: boolean, label?: string, description?: string }>, rows: string[][] }} Drill
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* @param {{ drill: Drill | null, onClose: () => void, labels: import("./labels.js").UiLabels, locale: string,
|
|
23
|
+
* exportContext?: { encoded: import("pivotkit-core").Encoded, onExport?: (file: import("./export-run.js").ExportFile) => unknown,
|
|
24
|
+
* announce: (text: string, extra?: { tone?: "error" }) => void, root: React.RefObject<HTMLElement | null> } }} props
|
|
25
|
+
*/
|
|
26
|
+
export declare function DrillPanel({ drill, onClose, labels, locale, exportContext }: {
|
|
27
|
+
drill: Drill | null;
|
|
28
|
+
onClose: () => void;
|
|
29
|
+
labels: import("./labels.js").UiLabels;
|
|
30
|
+
locale: string;
|
|
31
|
+
exportContext?: {
|
|
32
|
+
encoded: import("pivotkit-core").Encoded;
|
|
33
|
+
onExport?: (file: import("./export-run.js").ExportFile) => unknown;
|
|
34
|
+
announce: (text: string, extra?: {
|
|
35
|
+
tone?: "error";
|
|
36
|
+
}) => void;
|
|
37
|
+
root: React.RefObject<HTMLElement | null>;
|
|
38
|
+
};
|
|
39
|
+
}): React.JSX.Element | null;
|
package/types/drill.d.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/** Rows passed to the panel and to onCellClick by default. */
|
|
2
|
+
export declare const DRILL_LIMIT = 1000;
|
|
3
|
+
/**
|
|
4
|
+
* One row rebuilt from encoded columns: blank is null, dates are ISO texts of their wall clock.
|
|
5
|
+
* A plain object for the host; every column is defined as an own property, so a column named
|
|
6
|
+
* "__proto__" is a value like any other instead of setting the prototype.
|
|
7
|
+
* @param {import("pivotkit-core").Encoded} encoded
|
|
8
|
+
* @param {number} i
|
|
9
|
+
*/
|
|
10
|
+
export declare function decodeRow(encoded: import("pivotkit-core").Encoded, i: number): {};
|
|
11
|
+
/**
|
|
12
|
+
* The rows behind a cell.
|
|
13
|
+
* @param {import("pivotkit-core").PivotResult} result
|
|
14
|
+
* @param {{ rowPath?: any[], colPath?: any[], data?: object[] | null, limit?: number }} options
|
|
15
|
+
* @returns {{ count: number, rows: object[], indices: Int32Array }} `indices`: the rows' positions in the data
|
|
16
|
+
*/
|
|
17
|
+
export declare function drillRows(result: import("pivotkit-core").PivotResult, { rowPath, colPath, data, limit }: {
|
|
18
|
+
rowPath?: any[];
|
|
19
|
+
colPath?: any[];
|
|
20
|
+
data?: object[] | null;
|
|
21
|
+
limit?: number;
|
|
22
|
+
}): {
|
|
23
|
+
count: number;
|
|
24
|
+
rows: object[];
|
|
25
|
+
indices: Int32Array;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* The text of one column's values: a date as the table shows it (its day, with the time when the
|
|
29
|
+
* column has times), a number with `format` (a format of pivotkit-core: "text" shows an identifier
|
|
30
|
+
* as it is, "40072") or else in the locale with up to 6 decimals, yes/no with the labels' words.
|
|
31
|
+
* @param {import("pivotkit-core").Column} column
|
|
32
|
+
* @param {{ locale: string, labels: import("pivotkit-core").Labels, format?: unknown }} options
|
|
33
|
+
* @returns {{ text: (value: unknown) => string, numeric: boolean }}
|
|
34
|
+
*/
|
|
35
|
+
export declare function columnText(column: import("pivotkit-core").Column, { locale, labels, format }: {
|
|
36
|
+
locale: string;
|
|
37
|
+
labels: import("pivotkit-core").Labels;
|
|
38
|
+
format?: unknown;
|
|
39
|
+
}): {
|
|
40
|
+
text: (value: unknown) => string;
|
|
41
|
+
numeric: boolean;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* The rows of the drill-down panel as text, from the encoded columns: one entry per column (its name,
|
|
45
|
+
* whether it is right-aligned as a number) and per row the texts; a blank value is "".
|
|
46
|
+
* @param {import("pivotkit-core").Encoded} encoded
|
|
47
|
+
* @param {ArrayLike<number>} indices positions of the rows in the data (drillRows)
|
|
48
|
+
* @param {{ locale: string, labels: import("pivotkit-core").Labels, formatOf?: (column: string) => unknown }} options
|
|
49
|
+
* `formatOf`: the host's format for a column's values (fieldDefaults)
|
|
50
|
+
* @returns {{ columns: Array<{ name: string, numeric: boolean }>, rows: string[][] }}
|
|
51
|
+
*/
|
|
52
|
+
export declare function drillTable(encoded: import("pivotkit-core").Encoded, indices: ArrayLike<number>, { locale, labels, formatOf }: {
|
|
53
|
+
locale: string;
|
|
54
|
+
labels: import("pivotkit-core").Labels;
|
|
55
|
+
formatOf?: (column: string) => unknown;
|
|
56
|
+
}): {
|
|
57
|
+
columns: Array<{
|
|
58
|
+
name: string;
|
|
59
|
+
numeric: boolean;
|
|
60
|
+
}>;
|
|
61
|
+
rows: string[][];
|
|
62
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export declare const XLSX_TYPE = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
2
|
+
export type ExportFile = import("./index.js").ExportFile;
|
|
3
|
+
/**
|
|
4
|
+
* pivotkit-core/export, imported once; a failed import is forgotten, so the next call tries again. A
|
|
5
|
+
* menu that copies calls it when it opens: a copy right in the click (no import to wait for) is
|
|
6
|
+
* allowed in every browser.
|
|
7
|
+
*/
|
|
8
|
+
export declare function loadExporters(): Promise<typeof import("pivotkit-core/export")>;
|
|
9
|
+
/** The export module, at once when it is loaded. */
|
|
10
|
+
export declare const exportersNow: () => typeof import("pivotkit-core/export") | null;
|
|
11
|
+
/** Starts loading the export module (a menu that copies, when it opens); a failure waits for the click. */
|
|
12
|
+
export declare const prepareExporters: () => undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Hands the file to the host's onExport, then downloads it unless onExport returned false.
|
|
15
|
+
* @returns {boolean} whether the report downloaded it
|
|
16
|
+
* @param {Blob} blob
|
|
17
|
+
* @param {Omit<ExportFile, "blob"> & { doc?: Document, onExport?: (file: ExportFile) => unknown }} options
|
|
18
|
+
*/
|
|
19
|
+
export declare function deliver(blob: Blob, { doc, onExport, ...file }: Omit<ExportFile, "blob"> & {
|
|
20
|
+
doc?: Document;
|
|
21
|
+
onExport?: (file: ExportFile) => unknown;
|
|
22
|
+
}): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Hands the text to the host's onExport, then puts it on the clipboard unless onExport returned
|
|
25
|
+
* false.
|
|
26
|
+
* @param {string} text
|
|
27
|
+
* @param {Omit<ExportFile, "blob" | "text"> & { type: string, container: HTMLElement | null, onExport?: (file: ExportFile) => unknown }} options
|
|
28
|
+
* @returns {Promise<"copied" | "kept" | "blocked">} kept: the host took it; blocked: the browser refused
|
|
29
|
+
*/
|
|
30
|
+
export declare function copyOut(text: string, { type, container, onExport, ...file }: Omit<ExportFile, "blob" | "text"> & {
|
|
31
|
+
type: string;
|
|
32
|
+
container: HTMLElement | null;
|
|
33
|
+
onExport?: (file: ExportFile) => unknown;
|
|
34
|
+
}): Promise<"copied" | "kept" | "blocked">;
|
|
35
|
+
export type ExportContext = {
|
|
36
|
+
fileName: string;
|
|
37
|
+
result: import("pivotkit-core").PivotResult | null;
|
|
38
|
+
locale: string;
|
|
39
|
+
labels: import("./labels.js").UiLabels;
|
|
40
|
+
limits: object | undefined;
|
|
41
|
+
root: React.RefObject<HTMLElement | null>;
|
|
42
|
+
chartRef: React.RefObject<any>;
|
|
43
|
+
announce: (text: string, extra?: {
|
|
44
|
+
tone?: "error";
|
|
45
|
+
}) => void;
|
|
46
|
+
onExport?: (file: ExportFile) => unknown;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* @typedef {{ fileName: string, result: import("pivotkit-core").PivotResult | null, locale: string,
|
|
50
|
+
* labels: import("./labels.js").UiLabels, limits: object | undefined, root: React.RefObject<HTMLElement | null>,
|
|
51
|
+
* chartRef: React.RefObject<any>, announce: (text: string, extra?: { tone?: "error" }) => void,
|
|
52
|
+
* onExport?: (file: ExportFile) => unknown }} ExportContext
|
|
53
|
+
*/
|
|
54
|
+
/**
|
|
55
|
+
* One export of the Export menu.
|
|
56
|
+
* @param {"xlsx" | "csv" | "png" | "copy-table" | "copy-json"} kind
|
|
57
|
+
* @param {ExportContext} context
|
|
58
|
+
*/
|
|
59
|
+
export declare function runExport(kind: "xlsx" | "csv" | "png" | "copy-table" | "copy-json", { fileName, result, locale, labels, limits, root, chartRef, announce, onExport }: ExportContext): Promise<void>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type FieldInfo = {
|
|
2
|
+
label?: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
href?: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Every field's label, description and link, by lower-case name (matched case-insensitively, like
|
|
8
|
+
* column names). Empty without fieldDefaults.
|
|
9
|
+
* @param {unknown} fieldDefaults
|
|
10
|
+
* @returns {Map<string, FieldInfo>}
|
|
11
|
+
*/
|
|
12
|
+
export declare function fieldInfoOf(fieldDefaults: unknown): Map<string, FieldInfo>;
|
|
13
|
+
/**
|
|
14
|
+
* The display names for pivotkit-core's labels (`labels.fields`), or null when no field has one. A
|
|
15
|
+
* label that two fields share, or that is another field's own name, gets the field's name in
|
|
16
|
+
* parentheses ("Name (product_name)"), so no two fields look the same anywhere.
|
|
17
|
+
* @param {Map<string, FieldInfo>} info
|
|
18
|
+
* @param {readonly string[]} [fieldNames] the data's column names, in their own spelling
|
|
19
|
+
* @returns {Record<string, string> | null}
|
|
20
|
+
*/
|
|
21
|
+
export declare function displayNames(info: Map<string, FieldInfo>, fieldNames?: readonly string[]): Record<string, string> | null;
|
|
22
|
+
/**
|
|
23
|
+
* The column types a host named (fieldDefaults[field].type), for encode's `types`; null without any.
|
|
24
|
+
* @param {unknown} fieldDefaults
|
|
25
|
+
* @returns {Record<string, string> | null}
|
|
26
|
+
*/
|
|
27
|
+
export declare function typesOf(fieldDefaults: unknown): Record<string, string> | null;
|
|
28
|
+
/**
|
|
29
|
+
* Whether a field matches the search of the field list: its name, its display name or its description.
|
|
30
|
+
* @param {string} field
|
|
31
|
+
* @param {string} query lower case, trimmed
|
|
32
|
+
* @param {FieldInfo | undefined} info
|
|
33
|
+
*/
|
|
34
|
+
export declare function fieldMatches(field: string, query: string, info: FieldInfo | undefined): boolean;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* @param {{ fields: Array<{ name: string, type: string }>, placed: Map<string, string[]>, labels: import("./labels.js").UiLabels,
|
|
4
|
+
* onAdd: (field: string, zone: string) => void, onNote: (text: string) => void, drawer: boolean, open: boolean, onClose: () => void,
|
|
5
|
+
* onFilter?: (field: string, anchor: HTMLElement | null) => void, showInfo?: boolean,
|
|
6
|
+
* nameOf: (field: string) => string, info: Map<string, import("./field-info.js").FieldInfo>, onSkip?: () => void,
|
|
7
|
+
* collapsed?: boolean, onCollapse?: (collapsed: boolean) => void }} props
|
|
8
|
+
* `nameOf`: a field's display name; `info`: the host's descriptions by lower-case field name;
|
|
9
|
+
* `onSkip`: the link past the list to the toolbar (not in the drawer, which the toolbar opens);
|
|
10
|
+
* `collapsed`, `onCollapse`: the list folded to a rail ("Fields" and a search button) beside the
|
|
11
|
+
* report, and the change of it (not in the drawer)
|
|
12
|
+
*/
|
|
13
|
+
export declare function FieldPanel({ fields, placed, labels, onAdd, onNote, onFilter, drawer, open, onClose, nameOf, info, showInfo, onSkip, collapsed, onCollapse }: {
|
|
14
|
+
fields: Array<{
|
|
15
|
+
name: string;
|
|
16
|
+
type: string;
|
|
17
|
+
}>;
|
|
18
|
+
placed: Map<string, string[]>;
|
|
19
|
+
labels: import("./labels.js").UiLabels;
|
|
20
|
+
onAdd: (field: string, zone: string) => void;
|
|
21
|
+
onNote: (text: string) => void;
|
|
22
|
+
drawer: boolean;
|
|
23
|
+
open: boolean;
|
|
24
|
+
onClose: () => void;
|
|
25
|
+
onFilter?: (field: string, anchor: HTMLElement | null) => void;
|
|
26
|
+
showInfo?: boolean;
|
|
27
|
+
nameOf: (field: string) => string;
|
|
28
|
+
info: Map<string, import("./field-info.js").FieldInfo>;
|
|
29
|
+
onSkip?: () => void;
|
|
30
|
+
collapsed?: boolean;
|
|
31
|
+
onCollapse?: (collapsed: boolean) => void;
|
|
32
|
+
}): React.JSX.Element;
|
package/types/files.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A file name without extension from the host's `fileName`: no path, no characters a file system
|
|
3
|
+
* refuses, no leading dots, at most 120 characters; "pivot" when nothing is left.
|
|
4
|
+
* @param {unknown} name
|
|
5
|
+
*/
|
|
6
|
+
export declare function safeFileName(name: unknown): any;
|
|
7
|
+
/**
|
|
8
|
+
* A Blob from a data: URL (base64 or percent-encoded), as ECharts' getDataURL() gives it.
|
|
9
|
+
* @param {string} url
|
|
10
|
+
*/
|
|
11
|
+
export declare function dataUrlToBlob(url: string): Blob;
|
|
12
|
+
/**
|
|
13
|
+
* Starts the download of a Blob under a name, from the document the report is in.
|
|
14
|
+
* @param {Blob} blob
|
|
15
|
+
* @param {string} name
|
|
16
|
+
* @param {Document} [doc]
|
|
17
|
+
*/
|
|
18
|
+
export declare function saveBlob(blob: Blob, name: string, doc?: Document): void;
|
|
19
|
+
/**
|
|
20
|
+
* Puts a text on the clipboard: the Clipboard API, else a copy from a hidden text field inside the
|
|
21
|
+
* report (`container`, so it works in a shadow root too). False when the browser allows neither (no
|
|
22
|
+
* secure context, a frame without the permission).
|
|
23
|
+
* @param {string} text
|
|
24
|
+
* @param {HTMLElement | null} container
|
|
25
|
+
* @returns {Promise<boolean>}
|
|
26
|
+
*/
|
|
27
|
+
export declare function copyText(text: string, container: HTMLElement | null): Promise<boolean>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/** Values listed at once; the search finds the others. */
|
|
3
|
+
export declare const FILTER_LIST_MAX = 300;
|
|
4
|
+
/**
|
|
5
|
+
* @param {{ target: { field: string, anchor: HTMLElement, base?: object } | null, onClose: () => void, view: object,
|
|
6
|
+
* encoded: import("pivotkit-core").Encoded, locale: string, labels: import("./labels.js").UiLabels, commit: (v: object, note?: any) => void }} props
|
|
7
|
+
* `target.base`: the draft view of a field that is not placed yet (it goes into Filters on Apply)
|
|
8
|
+
*/
|
|
9
|
+
export declare function FilterPopover({ target, onClose, view, encoded, locale, labels, commit }: {
|
|
10
|
+
target: {
|
|
11
|
+
field: string;
|
|
12
|
+
anchor: HTMLElement;
|
|
13
|
+
base?: object;
|
|
14
|
+
} | null;
|
|
15
|
+
onClose: () => void;
|
|
16
|
+
view: object;
|
|
17
|
+
encoded: import("pivotkit-core").Encoded;
|
|
18
|
+
locale: string;
|
|
19
|
+
labels: import("./labels.js").UiLabels;
|
|
20
|
+
commit: (v: object, note?: any) => void;
|
|
21
|
+
}): React.JSX.Element;
|
package/types/icons.d.ts
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const PATHS: {
|
|
3
|
+
grip: string;
|
|
4
|
+
text: string;
|
|
5
|
+
number: string;
|
|
6
|
+
date: string;
|
|
7
|
+
boolean: string;
|
|
8
|
+
search: string;
|
|
9
|
+
x: string;
|
|
10
|
+
chevronDown: string;
|
|
11
|
+
chevronRight: string;
|
|
12
|
+
undo: string;
|
|
13
|
+
redo: string;
|
|
14
|
+
reset: string;
|
|
15
|
+
table: string;
|
|
16
|
+
chart: string;
|
|
17
|
+
stacked: string;
|
|
18
|
+
horizontal: string;
|
|
19
|
+
line: string;
|
|
20
|
+
area: string;
|
|
21
|
+
pie: string;
|
|
22
|
+
donut: string;
|
|
23
|
+
heatmap: string;
|
|
24
|
+
download: string;
|
|
25
|
+
bookmark: string;
|
|
26
|
+
sliders: string;
|
|
27
|
+
filter: string;
|
|
28
|
+
more: string;
|
|
29
|
+
plus: string;
|
|
30
|
+
check: string;
|
|
31
|
+
sortAsc: string;
|
|
32
|
+
sortDesc: string;
|
|
33
|
+
panel: string;
|
|
34
|
+
layout: string;
|
|
35
|
+
trash: string;
|
|
36
|
+
save: string;
|
|
37
|
+
sparkle: string;
|
|
38
|
+
rows: string;
|
|
39
|
+
cols: string;
|
|
40
|
+
sigma: string;
|
|
41
|
+
info: string;
|
|
42
|
+
image: string;
|
|
43
|
+
file: string;
|
|
44
|
+
swap: string;
|
|
45
|
+
top: string;
|
|
46
|
+
link: string;
|
|
47
|
+
copy: string;
|
|
48
|
+
upload: string;
|
|
49
|
+
drag: string;
|
|
50
|
+
enlarge: string;
|
|
51
|
+
fullScreen: string;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* @param {{ name: keyof typeof PATHS, size?: number, className?: string }} props
|
|
55
|
+
*/
|
|
56
|
+
export declare function Icon({ name, size, className }: {
|
|
57
|
+
name: keyof typeof PATHS;
|
|
58
|
+
size?: number;
|
|
59
|
+
className?: string;
|
|
60
|
+
}): React.JSX.Element;
|
|
61
|
+
/** The icon of a column type. */
|
|
62
|
+
export declare const TYPE_ICON: {
|
|
63
|
+
string: string;
|
|
64
|
+
number: string;
|
|
65
|
+
date: string;
|
|
66
|
+
boolean: string;
|
|
67
|
+
null: string;
|
|
68
|
+
};
|
|
69
|
+
/** The icon of each zone. */
|
|
70
|
+
export declare const ZONE_ICON: {
|
|
71
|
+
rows: string;
|
|
72
|
+
cols: string;
|
|
73
|
+
values: string;
|
|
74
|
+
filters: string;
|
|
75
|
+
};
|
|
76
|
+
export {};
|