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.
Files changed (71) hide show
  1. package/CHANGELOG.md +300 -0
  2. package/LICENSE +21 -0
  3. package/README.md +327 -2
  4. package/dist/chunks/chunk-C32TYSHG.js +441 -0
  5. package/dist/chunks/chunk-ILHFIV2P.js +784 -0
  6. package/dist/chunks/chunk-KKJO36W5.js +1833 -0
  7. package/dist/chunks/chunk-XYP47DJ3.js +123 -0
  8. package/dist/echarts.js +262 -0
  9. package/dist/index.js +3390 -0
  10. package/dist/labels.js +12 -0
  11. package/dist/menus.js +1085 -0
  12. package/dist/styles.css +2447 -0
  13. package/package.json +70 -4
  14. package/types/PivotReport.d.ts +20 -0
  15. package/types/all-labels.d.ts +5 -0
  16. package/types/chart-decorate.d.ts +16 -0
  17. package/types/chart-options.d.ts +23 -0
  18. package/types/chart-summary.d.ts +12 -0
  19. package/types/chart-tooltip.d.ts +38 -0
  20. package/types/chart-types.d.ts +152 -0
  21. package/types/chart.d.ts +39 -0
  22. package/types/chip-menus.d.ts +32 -0
  23. package/types/clear-input.d.ts +20 -0
  24. package/types/dnd-moves.d.ts +45 -0
  25. package/types/dnd.d.ts +101 -0
  26. package/types/dom.d.ts +52 -0
  27. package/types/drill-export.d.ts +42 -0
  28. package/types/drill-panel.d.ts +39 -0
  29. package/types/drill.d.ts +62 -0
  30. package/types/echarts.d.ts +4 -0
  31. package/types/export-run.d.ts +59 -0
  32. package/types/field-info.d.ts +34 -0
  33. package/types/fields.d.ts +32 -0
  34. package/types/files.d.ts +27 -0
  35. package/types/filter.d.ts +21 -0
  36. package/types/icons.d.ts +76 -0
  37. package/types/index.d.ts +536 -0
  38. package/types/info.d.ts +34 -0
  39. package/types/iso.d.ts +2 -0
  40. package/types/labels.d.ts +721 -0
  41. package/types/lazy-menus.d.ts +16 -0
  42. package/types/menu-labels.d.ts +255 -0
  43. package/types/menus.d.ts +7 -0
  44. package/types/names.d.ts +80 -0
  45. package/types/numbers.d.ts +13 -0
  46. package/types/overflow.d.ts +59 -0
  47. package/types/place.d.ts +43 -0
  48. package/types/popover.d.ts +89 -0
  49. package/types/rove.d.ts +20 -0
  50. package/types/section.d.ts +42 -0
  51. package/types/share.d.ts +123 -0
  52. package/types/skeleton.d.ts +9 -0
  53. package/types/storage.d.ts +24 -0
  54. package/types/table.d.ts +23 -0
  55. package/types/templates.d.ts +40 -0
  56. package/types/theme.d.ts +24 -0
  57. package/types/tip-list.d.ts +20 -0
  58. package/types/tips.d.ts +298 -0
  59. package/types/toasts.d.ts +26 -0
  60. package/types/toolbar-panels.d.ts +90 -0
  61. package/types/toolbar.d.ts +5 -0
  62. package/types/use-big-result.d.ts +29 -0
  63. package/types/use-export.d.ts +7 -0
  64. package/types/use-theme.d.ts +11 -0
  65. package/types/use-view-history.d.ts +34 -0
  66. package/types/version.d.ts +2 -0
  67. package/types/view-history.d.ts +89 -0
  68. package/types/view-ops.d.ts +344 -0
  69. package/types/view-store.d.ts +52 -0
  70. package/types/virtual.d.ts +44 -0
  71. package/types/zones.d.ts +42 -0
@@ -0,0 +1,44 @@
1
+ /** Body rows from which the table body is virtualized. */
2
+ export declare const VIRTUAL_FROM = 300;
3
+ /**
4
+ * The window of rows to render.
5
+ * @param {{ count: number, scrollTop: number, viewport: number, rowHeight: number, overscan?: number }} p
6
+ * @returns {{ start: number, end: number, padTop: number, padBottom: number }}
7
+ */
8
+ export declare function windowOf({ count, scrollTop, viewport, rowHeight, overscan }: {
9
+ count: number;
10
+ scrollTop: number;
11
+ viewport: number;
12
+ rowHeight: number;
13
+ overscan?: number;
14
+ }): {
15
+ start: number;
16
+ end: number;
17
+ padTop: number;
18
+ padBottom: number;
19
+ };
20
+ /**
21
+ * The cells of the body rows start..end-1 of a grid, with row spans cut to the window.
22
+ * @param {import("pivotkit-core").Grid} grid
23
+ * @param {number} start body row index (0 is the first row after the header)
24
+ * @param {number} end exclusive
25
+ * @returns {Array<{ index: number, cells: Array<{ cell: import("pivotkit-core").GridCell, col: number, rowSpan: number, colSpan: number }> }>}
26
+ */
27
+ export declare function sliceRows(grid: import("pivotkit-core").Grid, start: number, end: number): Array<{
28
+ index: number;
29
+ cells: Array<{
30
+ cell: import("pivotkit-core").GridCell;
31
+ col: number;
32
+ rowSpan: number;
33
+ colSpan: number;
34
+ }>;
35
+ }>;
36
+ /**
37
+ * The whole row label of body row `r`, every level joined with " / " ("Linux / Ubuntu"): in the
38
+ * virtual table a label is cut to one line, and this is how a focused value or a tapped label shows it
39
+ * in full. A level merged down from a row above is read there; the empty rest of a label spanning
40
+ * sideways is skipped.
41
+ * @param {import("pivotkit-core").Grid} grid
42
+ * @param {number} r body row index
43
+ */
44
+ export declare function rowLabelOf(grid: import("pivotkit-core").Grid, r: number): string;
@@ -0,0 +1,42 @@
1
+ import React from "react";
2
+ /** Chip entries of every zone: id, field, text, type (of the source field: a grouped date stays a date). */
3
+ export declare function zoneEntries(view: any, types: any, labels: any): {
4
+ filters: {
5
+ id: string;
6
+ field: any;
7
+ text: string;
8
+ type: any;
9
+ index: number;
10
+ }[];
11
+ cols: any;
12
+ rows: any;
13
+ values: any;
14
+ };
15
+ /**
16
+ * @param {{ view: any, types: Map<string, string>, labels: import("./labels.js").UiLabels,
17
+ * commit: (view: object, note?: any) => void, openFilter: (field: string, anchor: HTMLElement) => void,
18
+ * encoded: import("pivotkit-core").Encoded, locale: string, onSwap: () => void,
19
+ * id: string, folded: boolean, onShow: () => void, defaultsOf?: (field: string) => import("./index.js").FieldDefaults | undefined,
20
+ * infoOf?: (field: string) => import("./field-info.js").FieldInfo | undefined, explain?: boolean, showInfo?: boolean }} props
21
+ * `explain`: an "i" next to each zone's title that says what the zone does; `showInfo` false: no "i"
22
+ * of a field description on the chips (Options → Help)
23
+ * `folded`: the compact layout's one line; `defaultsOf`: the host's settings for a source field (fieldDefaults);
24
+ * `infoOf`: the host's description of a field (its source field's for a grouping)
25
+ */
26
+ export declare function Zones({ view, types, labels, commit, openFilter, encoded, locale, onSwap, id, folded, onShow, defaultsOf, infoOf, explain, showInfo }: {
27
+ view: any;
28
+ types: Map<string, string>;
29
+ labels: import("./labels.js").UiLabels;
30
+ commit: (view: object, note?: any) => void;
31
+ openFilter: (field: string, anchor: HTMLElement) => void;
32
+ encoded: import("pivotkit-core").Encoded;
33
+ locale: string;
34
+ onSwap: () => void;
35
+ id: string;
36
+ folded: boolean;
37
+ onShow: () => void;
38
+ defaultsOf?: (field: string) => import("./index.js").FieldDefaults | undefined;
39
+ infoOf?: (field: string) => import("./field-info.js").FieldInfo | undefined;
40
+ explain?: boolean;
41
+ showInfo?: boolean;
42
+ }): React.JSX.Element;