@foris/avocado-not-front 8.1.0 → 8.3.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 (21) hide show
  1. package/dist/avocado-not-front/src/components/chart/Chart.test.d.ts +1 -0
  2. package/dist/avocado-not-front/src/components/chart/chart.constants.d.ts +3 -2
  3. package/dist/avocado-not-front/src/components/chart/chart.types.d.ts +1 -0
  4. package/dist/avocado-not-front/src/components/chart/chart.util.d.ts +7 -0
  5. package/dist/avocado-not-front/src/components/chart/charts/BarChart.test.d.ts +1 -0
  6. package/dist/avocado-not-front/src/components/chart/charts/barChart.util.d.ts +3 -0
  7. package/dist/avocado-not-front/src/components/chart/charts/barChart.util.test.d.ts +1 -0
  8. package/dist/avocado-not-front/src/components/chart/charts/index.d.ts +1 -1
  9. package/dist/avocado-not-front/src/components/chart/charts/line-chart/LineChart.d.ts +3 -0
  10. package/dist/avocado-not-front/src/components/chart/charts/line-chart/LineChart.test.d.ts +1 -0
  11. package/dist/avocado-not-front/src/components/chart/charts/line-chart/index.d.ts +1 -0
  12. package/dist/avocado-not-front/src/components/chart/components/{ChartScrollViewport.d.ts → chart-scroll-viewport/ChartScrollViewport.d.ts} +1 -2
  13. package/dist/avocado-not-front/src/components/chart/components/chart-scroll-viewport/index.d.ts +2 -0
  14. package/dist/avocado-not-front/src/components/table/Table.d.ts +1 -1
  15. package/dist/avocado-not-front/src/components/table/tableScroll.util.d.ts +5 -8
  16. package/dist/avocado-not-front/src/types/components.type.d.ts +5 -6
  17. package/dist/avocado-not-front.es.js +1342 -1327
  18. package/dist/avocado-not-front.umd.js +3 -3
  19. package/dist/style.css +1 -1
  20. package/package.json +7 -7
  21. package/dist/avocado-not-front/src/components/chart/charts/LineChart.d.ts +0 -2
@@ -1,5 +1,7 @@
1
+ export { chartColors } from '../../../../avocado-suite';
1
2
  import type { ChartTheme, ChartType } from './chart.types';
2
3
  export declare const CHART_HEIGHT = 400;
4
+ export declare const BAR_CHART_LABEL = "Bar chart";
3
5
  /** Keeps the legacy ring size: outerRadius 120 → 240px. */
4
6
  export declare const CHART_DONUT_MAX_DIAMETER = 240;
5
7
  export declare const CHART_DONUT_LEGEND_RESERVE = 48;
@@ -14,9 +16,8 @@ export declare const chartRegistry: {
14
16
  composed: (config: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
15
17
  donut: (config: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
16
18
  horizontalBar: (config: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
17
- line: (config: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
19
+ line: ({ data, xKey, yKeys, yKeyLabels, series: seriesConfig, tooltipKey, showLegend, chartHeight, }: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
18
20
  mixBar: (config: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
19
21
  pie: (config: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
20
22
  };
21
- export declare const chartColors: string[];
22
23
  export declare const chartBaseTheme: ChartTheme;
@@ -6,6 +6,7 @@ export interface ChartSeriesConfig {
6
6
  type?: ComposedSeriesType;
7
7
  stackId?: string;
8
8
  label?: string;
9
+ /** Series color. `line` accepts design-system color tokens only, e.g. `'palette-4-80'`. */
9
10
  color?: string;
10
11
  /** Links series to a Y axis (`composed` with dual axis). */
11
12
  yAxisId?: string;
@@ -1,3 +1,5 @@
1
+ import type { ChartColor } from '../../../../avocado-suite';
2
+ import type { ChartSeriesConfig } from './chart.types';
1
3
  /**
2
4
  * Returns the pixel width the chart content should occupy.
3
5
  *
@@ -28,3 +30,8 @@ export declare function getChartContentHeight(dataLength: number, minCategoryHei
28
30
  * Uses the longest label in `data` when no fixed width is provided.
29
31
  */
30
32
  export declare function getCategoryAxisWidth(data: unknown[], xKey: string, fixedWidth?: number): number;
33
+ /**
34
+ * Color token configured for `key` in the JSON `series`, for Suite charts. Values that are not
35
+ * design-system tokens (a hex, for example) are ignored, so the series keeps its palette color.
36
+ */
37
+ export declare function getSeriesColorToken(series: readonly ChartSeriesConfig[] | undefined, key: string): ChartColor | undefined;
@@ -0,0 +1,3 @@
1
+ import type { BarChartSeries } from '../../../../../avocado-suite';
2
+ import type { ChartConfig } from '../chart.types';
3
+ export declare const mapBarSeries: (yKeys: ChartConfig['yKeys'], yKeyLabels?: ChartConfig['yKeyLabels']) => BarChartSeries<Record<string, unknown>>[];
@@ -3,7 +3,7 @@ import { BarChart } from './BarChart';
3
3
  import { ComposedChart } from './ComposedChart';
4
4
  import { DonutChart } from './DonutChart';
5
5
  import { HorizontalBarChart } from './HorizontalBarChart';
6
- import { LineChart } from './LineChart';
6
+ import { LineChart } from './line-chart';
7
7
  import { MixBarChart } from './MixBarChart';
8
8
  import { PieChart } from './PieChart';
9
9
  export { AreaChart, BarChart, ComposedChart, DonutChart, HorizontalBarChart, MixBarChart, LineChart, PieChart, };
@@ -0,0 +1,3 @@
1
+ import type { ChartConfig } from '../../chart.types';
2
+ /** Maps existing JSON fields to Suite; the chart wrapper owns requests and scrolling. */
3
+ export declare const LineChart: ({ data, xKey, yKeys, yKeyLabels, series: seriesConfig, tooltipKey, showLegend, chartHeight, }: ChartConfig) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { LineChart } from './LineChart';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- interface ChartScrollViewportProps {
2
+ export interface ChartScrollViewportProps {
3
3
  dataLength: number;
4
4
  minCategoryWidth?: number;
5
5
  children: (width: number) => React.ReactNode;
@@ -10,4 +10,3 @@ interface ChartScrollViewportProps {
10
10
  * content width to the render-prop child.
11
11
  */
12
12
  export declare const ChartScrollViewport: ({ dataLength, minCategoryWidth, children, }: ChartScrollViewportProps) => import("react/jsx-runtime").JSX.Element;
13
- export {};
@@ -0,0 +1,2 @@
1
+ export { ChartScrollViewport } from './ChartScrollViewport';
2
+ export type { ChartScrollViewportProps } from './ChartScrollViewport';
@@ -7,5 +7,5 @@ interface TableNotFrontExtendedProps extends TableNotFrontProps {
7
7
  userFlow: string;
8
8
  pageId: string;
9
9
  }
10
- declare const TableNotFront: ({ userFlow, pageId, responseKey, component, dataSource, rightActions, data: inlineData, pageSize, showRowsPerPage, pageSizeOptions, labelRowsPerPage, autoHeight, ...tableProps }: TableNotFrontExtendedProps) => import("react/jsx-runtime").JSX.Element;
10
+ declare const TableNotFront: ({ userFlow, pageId, responseKey, component, dataSource, rightActions, data: inlineData, pageSize, showRowsPerPage, pageSizeOptions, labelRowsPerPage, fitToViewport, ...tableProps }: TableNotFrontExtendedProps) => import("react/jsx-runtime").JSX.Element;
11
11
  export default TableNotFront;
@@ -5,16 +5,13 @@ export type TableScrollLayout = {
5
5
  type ResolveTableScrollLayoutArgs = {
6
6
  maxHeight?: string | number;
7
7
  stickyHeader?: boolean;
8
- autoFitToViewport: boolean;
8
+ shouldFitToViewport: boolean;
9
9
  availableHeight?: number;
10
10
  };
11
11
  /**
12
- * Resolves table scroll layout for EntityHub-style tables.
13
- *
14
- * David T.'s criterion: cap the table at the viewport space below it so the
15
- * pager stays on screen. The suite scroll container grows with content up to
16
- * that cap; overflow triggers internal scroll and the sticky header keeps
17
- * column labels visible. Independent of rows-per-page (`autoFitToViewport`).
12
+ * An explicit `maxHeight` wins; otherwise, when fitting to the viewport, the
13
+ * table is capped at the space below it so the pager stays on screen.
14
+ * Any capped table gets a sticky header unless `stickyHeader: false`.
18
15
  */
19
- export declare const resolveTableScrollLayout: ({ maxHeight, stickyHeader, autoFitToViewport, availableHeight, }: ResolveTableScrollLayoutArgs) => TableScrollLayout;
16
+ export declare const resolveTableScrollLayout: ({ maxHeight, stickyHeader, shouldFitToViewport, availableHeight, }: ResolveTableScrollLayoutArgs) => TableScrollLayout;
20
17
  export {};
@@ -614,12 +614,11 @@ export interface TableNotFrontProps extends NotFrontBaseProps, Omit<TableProps,
614
614
  */
615
615
  showRowsPerPage?: boolean;
616
616
  /**
617
- * Caps the table scroll area to the viewport space below it so the pager
618
- * stays on screen. Overflow uses internal scroll with a sticky header.
619
- * Default: true (disabled for cursor pagination). Override with explicit
620
- * `maxHeight` / `stickyHeader`.
617
+ * Caps the table to the viewport space below it so the pager stays on
618
+ * screen; overflow scrolls internally with a sticky header. Default: false.
619
+ * An explicit `maxHeight` wins. Never applies with cursor pagination.
621
620
  */
622
- autoHeight?: boolean;
621
+ fitToViewport?: boolean;
623
622
  /**
624
623
  * Options for the rows-per-page selector. The backend may override the
625
624
  * default list. Default when omitted: `[10, 20, 50, 100]`.
@@ -1040,7 +1039,7 @@ export interface StepperNotFrontProps extends NotFrontBaseProps {
1040
1039
  itemActive: number;
1041
1040
  darkMode?: boolean;
1042
1041
  }
1043
- /** Suite `ProgressBar`: segmented completion display. */
1042
+ /** Suite `SegmentedProgress`: segmented completion display. */
1044
1043
  export interface ProgressBarNotFrontProps extends NotFrontBaseProps {
1045
1044
  component: 'progressBar';
1046
1045
  total: number;