@ssa-ui-kit/core 2.8.3 → 2.9.0-canary-4b2c248-20250414

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 (25) hide show
  1. package/dist/components/AccordionGroup/types.d.ts +6 -3
  2. package/dist/components/Charts/GaugeChart/GaugeChart.d.ts +25 -0
  3. package/dist/components/Charts/GaugeChart/components/GaugeChartBase.d.ts +7 -0
  4. package/dist/components/Charts/GaugeChart/components/GaugeChartCanvas.d.ts +4 -0
  5. package/dist/components/Charts/GaugeChart/components/GaugeChartHeader.d.ts +8 -0
  6. package/dist/components/Charts/GaugeChart/components/GaugeChartLabels.d.ts +14 -0
  7. package/dist/components/Charts/GaugeChart/components/GaugeChartLayer.d.ts +4 -0
  8. package/dist/components/Charts/GaugeChart/components/GaugeChartNeedle.d.ts +12 -0
  9. package/dist/components/Charts/GaugeChart/components/GaugeChartTickers.d.ts +17 -0
  10. package/dist/components/Charts/GaugeChart/components/index.d.ts +7 -0
  11. package/dist/components/Charts/GaugeChart/index.d.ts +1 -0
  12. package/dist/components/Charts/GaugeChart/utils/index.d.ts +1 -0
  13. package/dist/components/Charts/GaugeChart/utils/math.d.ts +19 -0
  14. package/dist/components/Charts/TreeMapChart/TreeMapChart.d.ts +2 -2
  15. package/dist/components/Charts/index.d.ts +1 -0
  16. package/dist/components/JsonSchemaForm/fields/AccordionField.d.ts +6 -0
  17. package/dist/components/JsonSchemaForm/fields/DateRangeField.d.ts +2 -0
  18. package/dist/components/JsonSchemaForm/fields/index.d.ts +4 -0
  19. package/dist/components/JsonSchemaForm/index.d.ts +2 -1
  20. package/dist/components/JsonSchemaForm/utils/index.d.ts +1 -0
  21. package/dist/components/JsonSchemaForm/utils/schema.d.ts +3 -0
  22. package/dist/components/JsonSchemaForm/widgets/DateWidget.d.ts +2 -0
  23. package/dist/index.js +669 -37
  24. package/dist/index.js.map +1 -1
  25. package/package.json +31 -5
@@ -38,11 +38,14 @@ export interface AccordionViewProps extends AccordionProps {
38
38
  children?: React.ReactNode;
39
39
  contentProps?: Record<string, unknown>;
40
40
  }
41
+ export type OpenedAccordion = {
42
+ id: string | number;
43
+ };
41
44
  export interface AccordionGroupContextProps {
42
- openedAccordions: Array<AccordionProps> | [];
45
+ openedAccordions: Array<OpenedAccordion> | [];
43
46
  stayOpen: boolean;
44
- setOpenedAccordions: (accordions: Array<AccordionProps>) => void;
45
- toggleOpenedAccordion: (accordion: AccordionProps) => void;
47
+ setOpenedAccordions: (accordions: Array<OpenedAccordion>) => void;
48
+ toggleOpenedAccordion: (accordion: OpenedAccordion, opened?: boolean) => void;
46
49
  setStayOpen: (isStayOpen: boolean) => void;
47
50
  }
48
51
  export {};
@@ -0,0 +1,25 @@
1
+ import { WidgetCardProps } from '../../WidgetCard';
2
+ import { GaugeChartBaseProps, GaugeChartLabelsProps, GaugeChartTickersProps } from './components';
3
+ export type GaugeChartFeature = 'header' | 'fullscreenMode';
4
+ export interface GaugeChartProps extends Pick<GaugeChartLabelsProps, 'maxLabel' | 'minLabel' | 'unitLabel' | 'totalLabel'>, Pick<GaugeChartTickersProps, 'ticks'> {
5
+ minValue: number;
6
+ maxValue: number;
7
+ value: number;
8
+ title?: string;
9
+ segments?: {
10
+ value: number;
11
+ id?: string;
12
+ color?: string;
13
+ }[];
14
+ withLabels?: boolean;
15
+ withTrack?: boolean;
16
+ withNeedle?: boolean;
17
+ chartProps?: Omit<GaugeChartBaseProps, 'data'>;
18
+ trackProps?: Omit<GaugeChartBaseProps, 'data'>;
19
+ features?: GaugeChartFeature[];
20
+ widgetCardProps?: WidgetCardProps;
21
+ }
22
+ export declare const GaugeChart: {
23
+ (props: GaugeChartProps): import("@emotion/react/jsx-runtime").JSX.Element;
24
+ displayName: string;
25
+ };
@@ -0,0 +1,7 @@
1
+ import { MayHaveLabel, ResponsivePie } from '@nivo/pie';
2
+ export type GaugeChartData = {
3
+ color?: string;
4
+ value?: number;
5
+ } & MayHaveLabel;
6
+ export type GaugeChartBaseProps = React.ComponentProps<typeof ResponsivePie<GaugeChartData>>;
7
+ export declare const GaugeChartBase: ({ ...props }: GaugeChartBaseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare const GaugeChartCanvas: import("@emotion/styled").StyledComponent<{
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
4
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,8 @@
1
+ import { MustInclude } from '@ssa-ui-kit/utils';
2
+ export declare const FullScreenButton: import("@emotion/styled").StyledComponent<import("../../../Button/types").ButtonProps & import("react").RefAttributes<HTMLButtonElement> & {
3
+ theme?: import("@emotion/react").Theme;
4
+ }, {}, {}>;
5
+ export interface GaugeChartHeaderProps<T extends string[]> {
6
+ features: MustInclude<T, 'fullscreenMode'>;
7
+ }
8
+ export declare const GaugeChartHeader: <F extends string[]>({ features, }: GaugeChartHeaderProps<F>) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ export declare const GaugeChartLabel: import("@emotion/styled").StyledComponent<{
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
4
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
5
+ export interface GaugeChartLabelsProps {
6
+ width: string;
7
+ withLabels?: boolean;
8
+ value?: number;
9
+ unitLabel?: string;
10
+ minLabel?: string;
11
+ maxLabel?: string;
12
+ totalLabel?: string;
13
+ }
14
+ export declare const GaugeChartLabels: ({ width, withLabels, value, unitLabel, minLabel, maxLabel, totalLabel, }: GaugeChartLabelsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare const GaugeChartLayer: import("@emotion/styled").StyledComponent<{
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
4
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,12 @@
1
+ export interface GaugeChartNeedleProps {
2
+ pieSize: {
3
+ width: number;
4
+ height: number;
5
+ };
6
+ pieOffset: {
7
+ x: number;
8
+ y: number;
9
+ };
10
+ needleAngle: number;
11
+ }
12
+ export declare const GaugeChartNeedle: ({ pieSize, pieOffset, needleAngle, }: GaugeChartNeedleProps) => import("@emotion/react/jsx-runtime").JSX.Element | undefined;
@@ -0,0 +1,17 @@
1
+ export interface GaugeChartTickersProps {
2
+ pieSize: {
3
+ width: number;
4
+ height: number;
5
+ };
6
+ pieOffset: {
7
+ x: number;
8
+ y: number;
9
+ };
10
+ minValue: number;
11
+ maxValue: number;
12
+ ticks?: ({
13
+ value: number;
14
+ label?: React.ReactNode;
15
+ } | number)[];
16
+ }
17
+ export declare const GaugeChartTickers: ({ pieOffset, pieSize, minValue, maxValue, ticks, }: GaugeChartTickersProps) => import("@emotion/react/jsx-runtime").JSX.Element | undefined;
@@ -0,0 +1,7 @@
1
+ export * from './GaugeChartLabels';
2
+ export * from './GaugeChartNeedle';
3
+ export * from './GaugeChartTickers';
4
+ export * from './GaugeChartBase';
5
+ export * from './GaugeChartHeader';
6
+ export * from './GaugeChartLayer';
7
+ export * from './GaugeChartCanvas';
@@ -0,0 +1 @@
1
+ export * from './GaugeChart';
@@ -0,0 +1 @@
1
+ export * from './math';
@@ -0,0 +1,19 @@
1
+ export declare const scaleFromBase: (baseValue: number, base: number, current: number) => number;
2
+ export declare const normalizeToRange: (value: number, min: number, max: number, targetMin?: number, targetMax?: number) => number;
3
+ export declare const calculateFittedSize: (container: {
4
+ width: number;
5
+ height: number;
6
+ }, aspectRatio: number) => {
7
+ width: number;
8
+ height: number;
9
+ };
10
+ export declare const centeredOffset: (container: {
11
+ width: number;
12
+ height: number;
13
+ }, content: {
14
+ width: number;
15
+ height: number;
16
+ }) => {
17
+ x: number;
18
+ y: number;
19
+ };
@@ -1,13 +1,13 @@
1
1
  import { ResponsiveTreeMap } from '@nivo/treemap';
2
- import React from 'react';
3
2
  import { WidgetCardProps } from '../../WidgetCard';
4
3
  export type TreeNode = {
5
4
  name: string;
6
5
  value?: number;
6
+ color?: string;
7
7
  children?: TreeNode[];
8
8
  };
9
9
  export type TreeMapChartFeature = 'header' | 'fullscreenMode';
10
- type NivoTreeMapChartProps = React.ComponentProps<typeof ResponsiveTreeMap>;
10
+ type NivoTreeMapChartProps = React.ComponentProps<typeof ResponsiveTreeMap<TreeNode>>;
11
11
  export interface TreeMapChartProps extends Omit<NivoTreeMapChartProps, 'data'> {
12
12
  data: TreeNode;
13
13
  title?: string;
@@ -4,3 +4,4 @@ export * from './BarLineComplexChart';
4
4
  export * from './TreeMapChart';
5
5
  export * from './common';
6
6
  export * from './hooks';
7
+ export * from './GaugeChart';
@@ -0,0 +1,6 @@
1
+ import { FieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+ export type AccordionOptions = {
3
+ targetField: string;
4
+ collapsed?: boolean;
5
+ };
6
+ export declare const AccordionField: <T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = Record<string, unknown>>(props: FieldProps<T, S, F>) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { FieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+ export declare const DateRangeField: <T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = Record<string, unknown>>(props: FieldProps<T, S, F>) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { FormContextType, RegistryFieldsType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+ export declare const generateFields: <T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = Record<string, unknown>>() => RegistryFieldsType<T, S, F>;
3
+ declare const _default: RegistryFieldsType<unknown, RJSFSchema, Record<string, unknown>>;
4
+ export default _default;
@@ -3,10 +3,11 @@ import { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
3
3
  import { FormProps, ThemeProps } from '@rjsf/core';
4
4
  import Templates, { generateTemplates } from './templates';
5
5
  import Widgets, { generateWidgets } from './widgets';
6
+ import Fields, { generateFields } from './fields';
6
7
  export declare function generateTheme<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = Record<string, unknown>>(): ThemeProps<T, S, F>;
7
8
  declare const Theme: ThemeProps<unknown, RJSFSchema, Record<string, unknown>>;
8
9
  export declare function generateForm<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = Record<string, unknown>>(): ComponentType<FormProps<T, S, F>>;
9
10
  declare const Form: import("@emotion/styled").StyledComponent<FormProps<unknown, RJSFSchema, Record<string, unknown>> & {
10
11
  theme?: import("@emotion/react").Theme;
11
12
  }, {}, {}>;
12
- export { Form, Templates, Theme, Widgets, generateTemplates, generateWidgets };
13
+ export { Form, Templates, Theme, Widgets, Fields, generateTemplates, generateWidgets, generateFields, };
@@ -0,0 +1 @@
1
+ export * from './schema';
@@ -0,0 +1,3 @@
1
+ import { StrictRJSFSchema, UiSchema } from '@rjsf/utils';
2
+ export declare const getFieldsToHide: (schema: StrictRJSFSchema, searchQuery: string) => string[];
3
+ export declare const applyHiddenWidget: (uiSchema: UiSchema, pathsToHide: string[]) => UiSchema;
@@ -0,0 +1,2 @@
1
+ import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';
2
+ export declare const DateWidget: <T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = Record<string, unknown>>(props: WidgetProps<T, S, F>) => import("@emotion/react/jsx-runtime").JSX.Element;