@funcd-dev/ui 0.10.0 → 0.10.1

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 (35) hide show
  1. package/dist/hm-flow/components/canvas-form/canvas-form.d.ts +1 -1
  2. package/dist/hm-flow/components/header-status/header-status.types.d.ts +1 -1
  3. package/dist/hm-flow/components/node-editor/node-editor.d.ts +1 -1
  4. package/dist/hm-flow/components/node-search/nodes-search.d.ts +1 -1
  5. package/dist/hm-flow/components/toolbar/toolbar.types.d.ts +1 -1
  6. package/dist/molecules/data-grid/hm/hm-data-grid.util.d.ts +1 -1
  7. package/dist/molecules/data-grid/hm/types.d.ts +1 -1
  8. package/dist/molecules/data-grid/hm/use-data-gri-parser.hook.d.ts +1 -1
  9. package/dist/molecules/data-grid/hm/use-render-row.hook.d.ts +1 -1
  10. package/dist/molecules/hm-chart/hm-chart.util.d.ts +1 -1
  11. package/dist/reactive-chart/dashboard/dynamic-chart.d.ts +1 -1
  12. package/dist/reactive-chart/dashboard/reactive-dashboard.d.ts +2 -2
  13. package/dist/reactive-chart/dashboard/types.d.ts +2 -2
  14. package/dist/reactive-chart/reactive-charts/reactive-bar-chart/reactive-bar-chart.util.d.ts +1 -1
  15. package/dist/reactive-chart/reactive-charts/reactive-bar-chart/types.d.ts +1 -1
  16. package/dist/reactive-chart/reactive-charts/reactive-card/types.d.ts +1 -1
  17. package/dist/reactive-chart/reactive-charts/reactive-line-chart/types.d.ts +1 -1
  18. package/dist/reactive-chart/reactive-charts/reactive-pie-chart/types.d.ts +2 -2
  19. package/dist/reactive-chart/reactive-charts/types/chart-custom-meta.d.ts +1 -1
  20. package/dist/reactive-chart/reactive-charts/types/chart-custom-props.d.ts +1 -1
  21. package/dist/reactive-chart/reactive-charts/types/reactive-chart-base.d.ts +3 -3
  22. package/dist/reactive-chart/reactive-charts/utils/chart-option.util.d.ts +1 -1
  23. package/dist/reactive-chart/reactive-charts/utils/use-chart-rows.d.ts +1 -1
  24. package/dist/reactive-form/form/dynamic-field.d.ts +1 -1
  25. package/dist/reactive-form/form/types.d.ts +2 -2
  26. package/dist/reactive-form/form-builder.d.ts +1 -1
  27. package/dist/reactive-form/reactive-fields/reactive-list/reactive-list-field.d.ts +1 -1
  28. package/dist/reactive-form/reactive-fields/reactive-list/types.d.ts +3 -3
  29. package/dist/reactive-form/reactive-fields/types/field-custom-meta.d.ts +1 -1
  30. package/dist/reactive-form/reactive-fields/types/field-custom-props.d.ts +1 -1
  31. package/dist/reactive-form/reactive-fields/types/field-filter-key.d.ts +1 -1
  32. package/dist/reactive-form/reactive-fields/types/reactive-field-base.d.ts +1 -1
  33. package/dist/reactive-form/reactive-fields/utils/field-error-interceptor.d.ts +1 -1
  34. package/dist/utils/data-utils.d.ts +1 -1
  35. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { IReactiveFieldMeta } from '@/reactive-form';
1
+ import { IReactiveFieldMeta } from '../../../reactive-form';
2
2
  import { DefaultValues } from 'react-hook-form';
3
3
  interface ICanvasForm<T extends Record<string, any>> {
4
4
  submitButtonText: string;
@@ -1,4 +1,4 @@
1
- import { ActionHandlerDepsType } from '@/hm-flow/node';
1
+ import { ActionHandlerDepsType } from '../../node';
2
2
  import { JSX } from 'react';
3
3
  export interface IHeaderActionsHandlersParams {
4
4
  deps: ActionHandlerDepsType;
@@ -1,4 +1,4 @@
1
- import { IActionsHandlersParams } from '@/hm-flow';
1
+ import { IActionsHandlersParams } from '../..';
2
2
  import { FC } from 'react';
3
3
  interface IPreviewToEditNodeProps {
4
4
  onUpdateNode: (params: IActionsHandlersParams) => void;
@@ -1,4 +1,4 @@
1
- import { INodeAction, IPyNode } from '@/hm-flow';
1
+ import { INodeAction, IPyNode } from '../..';
2
2
  import { FC } from 'react';
3
3
  interface INodesSearchProps {
4
4
  searchItems: IPyNode[];
@@ -1,4 +1,4 @@
1
- import { ActionHandlerDepsType } from '@/hm-flow/node/types';
1
+ import { ActionHandlerDepsType } from '../../node/types';
2
2
  import { JSX } from 'react';
3
3
  export type ToolbarActionType = 'save' | 'layout' | 'run' | 'deleteFlow';
4
4
  export type ToolbarPosition = 'main' | 'left' | 'right';
@@ -1,4 +1,4 @@
1
- import { Flatten } from '@/types';
1
+ import { Flatten } from '../../../types';
2
2
  import { DataGridProps } from 'react-data-grid';
3
3
  import { RDGParserParams } from './types';
4
4
  export declare const reactDataGridParser: <TRow extends Record<string, any>>(params: RDGParserParams<Flatten<TRow>>) => DataGridProps<Flatten<TRow>, unknown, import("react").Key>;
@@ -1,4 +1,4 @@
1
- import { Flatten, NestedKeyOf } from '@/types';
1
+ import { Flatten, NestedKeyOf } from '../../../types';
2
2
  import { JSX, ReactNode } from 'react';
3
3
  import { DataGridProps, RenderCheckboxProps } from 'react-data-grid';
4
4
  type Key = string | number;
@@ -1,4 +1,4 @@
1
- import { Flatten } from '@/types';
1
+ import { Flatten } from '../../../types';
2
2
  import { IHMDataGrid } from './types';
3
3
  export default function useRGDParser<TRow extends Record<string, any>>(params: IHMDataGrid<Flatten<TRow>>): import("react-data-grid").DataGridProps<{ [E in Extract<(TRow extends readonly any[] ? {
4
4
  '0': TRow[number];
@@ -1,3 +1,3 @@
1
- import { Flatten } from '@/types';
1
+ import { Flatten } from '../../../types';
2
2
  import { IHMDataGrid } from './types';
3
3
  export default function useRenderRow<TRow extends Record<string, any>>(params: IHMDataGrid<TRow>): IHMDataGrid<Flatten<TRow>>;
@@ -1,4 +1,4 @@
1
- import { PyColorsType } from '@/mantine.theme';
1
+ import { PyColorsType } from '../../mantine.theme';
2
2
  import { MantineTheme } from '@mantine/core';
3
3
  export declare const getPaletteColor: (theme: MantineTheme, color: PyColorsType, colorScheme: 'light' | 'dark') => string;
4
4
  export declare const getSeriesColors: (theme: MantineTheme, colorScheme: 'light' | 'dark') => string[];
@@ -1,4 +1,4 @@
1
- import { FormProps, JSONData } from '@/types';
1
+ import { FormProps, JSONData } from '../../types';
2
2
  import { FC } from 'react';
3
3
  import { IChartClickParams } from '../reactive-charts/types';
4
4
  import { IDynamicChartMeta } from './types';
@@ -1,5 +1,5 @@
1
- import { IReactiveFieldMeta } from '@/reactive-form/form/types';
2
- import { FormProps, JSONData } from '@/types';
1
+ import { IReactiveFieldMeta } from '../../reactive-form/form/types';
2
+ import { FormProps, JSONData } from '../../types';
3
3
  import { IChartClickParams } from '../reactive-charts/types';
4
4
  import { IReactiveChartMeta } from './types';
5
5
  export interface IDashboardFilters<TFilterValues extends JSONData> {
@@ -1,5 +1,5 @@
1
- import { ECOption } from '@/molecules/hm-chart';
2
- import { DataKeyOf, JSONData, RowOf } from '@/types';
1
+ import { ECOption } from '../../molecules/hm-chart';
2
+ import { DataKeyOf, JSONData, RowOf } from '../../types';
3
3
  import { ReactElement, ReactNode } from 'react';
4
4
  import { ChartType, CommonChartProps, IConditionalChartProp } from '../reactive-charts/types';
5
5
  export interface IChartLayout {
@@ -1,4 +1,4 @@
1
- import { JSONData } from '@/types';
1
+ import { JSONData } from '../../../types';
2
2
  import { IChartSeries } from '../types';
3
3
  export interface IChartPivotSeries extends IChartSeries {
4
4
  /** One [x value, sum] pair per category; the sum is null without a value */
@@ -1,4 +1,4 @@
1
- import { JSONData, NestedKeyOf } from '@/types';
1
+ import { JSONData, NestedKeyOf } from '../../../types';
2
2
  import { IChartSeries } from '../types/reactive-chart-base';
3
3
  export type BarChartCustomProps<TRow extends JSONData = JSONData> = {
4
4
  /** Row key of the categories */
@@ -1,4 +1,4 @@
1
- import { JSONData, NestedKeyOf } from '@/types';
1
+ import { JSONData, NestedKeyOf } from '../../../types';
2
2
  import { MantineColor } from '@mantine/core';
3
3
  import { ReactNode } from 'react';
4
4
  /** What a card's callbacks receive */
@@ -1,4 +1,4 @@
1
- import { JSONData, NestedKeyOf } from '@/types';
1
+ import { JSONData, NestedKeyOf } from '../../../types';
2
2
  import { IChartSeries } from '../types/reactive-chart-base';
3
3
  export type LineChartCustomProps<TRow extends JSONData = JSONData> = {
4
4
  /** Row key of the x axis values */
@@ -1,5 +1,5 @@
1
- import { PyColorsType } from '@/mantine.theme';
2
- import { JSONData, NestedKeyOf } from '@/types';
1
+ import { PyColorsType } from '../../../mantine.theme';
2
+ import { JSONData, NestedKeyOf } from '../../../types';
3
3
  export type PieChartCustomProps<TRow extends JSONData = JSONData> = {
4
4
  /** Row key of the slice names */
5
5
  nameKey: NestedKeyOf<TRow>;
@@ -1,4 +1,4 @@
1
- import { JSONData } from '@/types';
1
+ import { JSONData } from '../../../types';
2
2
  import { IChartCustomProps } from './chart-custom-props';
3
3
  export interface IConditionalChartProp<TRow extends JSONData> {
4
4
  bar: {
@@ -1,4 +1,4 @@
1
- import { JSONData } from '@/types';
1
+ import { JSONData } from '../../../types';
2
2
  import { BarChartCustomProps } from '../reactive-bar-chart/types';
3
3
  import { CardCustomProps } from '../reactive-card/types';
4
4
  import { LineChartCustomProps } from '../reactive-line-chart/types';
@@ -1,6 +1,6 @@
1
- import { PyColorsType } from '@/mantine.theme';
2
- import { ECOption } from '@/molecules/hm-chart';
3
- import { FormProps, JSONData, NestedKeyOf } from '@/types';
1
+ import { PyColorsType } from '../../../mantine.theme';
2
+ import { ECOption } from '../../../molecules/hm-chart';
3
+ import { FormProps, JSONData, NestedKeyOf } from '../../../types';
4
4
  import { ECElementEvent } from 'echarts/core';
5
5
  export type ChartType = 'bar' | 'line' | 'pie' | 'card';
6
6
  export interface IChartClickParams {
@@ -1,4 +1,4 @@
1
- import { JSONData } from '@/types';
1
+ import { JSONData } from '../../../types';
2
2
  export type ChartAxisType = 'category' | 'value' | 'time';
3
3
  /** Axis type of the values at `key`, read from the first row like the data grid does */
4
4
  export declare const getChartAxisType: (rows: JSONData[], key: string) => ChartAxisType;
@@ -1,4 +1,4 @@
1
- import { JSONData } from '@/types';
1
+ import { JSONData } from '../../../types';
2
2
  interface IUseChartRows {
3
3
  data: JSONData;
4
4
  dataKey: string;
@@ -1,4 +1,4 @@
1
- import { InputType, ReactiveFieldErrorType } from '@/reactive-form/reactive-fields';
1
+ import { InputType, ReactiveFieldErrorType } from '../reactive-fields';
2
2
  import { FormProps, JSONData } from '../../types';
3
3
  import { FieldMeta } from './types';
4
4
  interface IDynamicField<TFormValues extends JSONData> {
@@ -1,6 +1,6 @@
1
1
  import { ReactElement, ReactNode } from 'react';
2
- import { FormFieldOption, IConditionalProp, InputType } from '@/reactive-form/reactive-fields/types';
3
- import { JSONData, NestedKeyOf } from '@/types';
2
+ import { FormFieldOption, IConditionalProp, InputType } from '../reactive-fields/types';
3
+ import { JSONData, NestedKeyOf } from '../../types';
4
4
  type PartialOption<TFormValues extends JSONData> = Omit<FormFieldOption<TFormValues>, 'onChange' | 'onBlur'>;
5
5
  interface IPatialReactiveField<TFormValues extends JSONData, TInputType extends InputType> {
6
6
  /** Key is used for register, input id and array map key */
@@ -1,5 +1,5 @@
1
1
  import { ElementType, FunctionComponent } from 'react';
2
- import { JSONData } from '@/types';
2
+ import { JSONData } from '../types';
3
3
  import { InputType, IReactiveField } from './reactive-fields';
4
4
  type FieldMapType<TField extends JSONData, TFormValues extends JSONData = JSONData> = Record<string, ElementType<IReactiveField<TField, TFormValues>>>;
5
5
  declare function getField<TField extends JSONData, TFormValues extends JSONData>(field: string): ElementType<IReactiveField<TField, TFormValues>>;
@@ -1,4 +1,4 @@
1
- import { JSONData } from '@/types';
1
+ import { JSONData } from '../../../types';
2
2
  import { IReactiveField } from '../types';
3
3
  import { ListFieldCustomProps } from './types';
4
4
  declare const ReactiveListField: <TFormValues extends JSONData>(props: IReactiveField<ListFieldCustomProps<TFormValues>, TFormValues>) => import("react").JSX.Element;
@@ -1,8 +1,8 @@
1
- import { IHMColumn } from '@/molecules/table/types';
2
- import { FieldMeta } from '@/reactive-form/form/types';
1
+ import { IHMColumn } from '../../../molecules/table/types';
2
+ import { FieldMeta } from '../../form/types';
3
3
  import { MantineSize } from '@mantine/core';
4
4
  import { InputType } from '../types';
5
- import { JSONData } from '@/types';
5
+ import { JSONData } from '../../../types';
6
6
  export type ListFieldColumnType<TFormValues extends JSONData> = FieldMeta<TFormValues, Exclude<InputType, 'list'>> & Pick<IHMColumn, 'rowRender'>;
7
7
  export type ListFieldCustomProps<TFormValues extends JSONData> = {
8
8
  size?: MantineSize;
@@ -1,4 +1,4 @@
1
- import { JSONData } from '@/types';
1
+ import { JSONData } from '../../../types';
2
2
  import { ICustomProps } from './field-custom-props';
3
3
  import { InputType } from './reactive-field-base';
4
4
  type CustomProps<TInputType extends InputType, TFormValues extends JSONData> = {
@@ -1,4 +1,4 @@
1
- import { JSONData } from '@/types';
1
+ import { JSONData } from '../../../types';
2
2
  import { AutocompleteCustomProps } from '../reactive-autocomplete';
3
3
  import { CheckCustomProps } from '../reactive-checkbox';
4
4
  import { MultiSelectCustomProps } from '../reactive-multi-select';
@@ -1,4 +1,4 @@
1
- import { DeepOmitVariableKind, JSONData } from '@/types';
1
+ import { DeepOmitVariableKind, JSONData } from '../../../types';
2
2
  export interface IFilterKeys<TFormValues extends JSONData> {
3
3
  text: DeepOmitVariableKind<TFormValues, boolean | any[]>;
4
4
  checkbox: DeepOmitVariableKind<TFormValues, number | any[] | string>;
@@ -1,6 +1,6 @@
1
1
  import { Ref } from 'react';
2
2
  import { RegisterOptions } from 'react-hook-form';
3
- import { JSONData, Simplify } from '@/types';
3
+ import { JSONData, Simplify } from '../../../types';
4
4
  import { FormProps } from '../../../types/form';
5
5
  export type InputType = 'text' | 'textarea' | 'number' | 'password' | 'checkbox' | 'switch' | 'select' | 'multi-select' | 'radio' | 'range' | 'range-slider' | 'period' | 'autocomplete' | 'list';
6
6
  export type FormFieldOption<TFieldValues extends JSONData> = RegisterOptions<TFieldValues>;
@@ -1,4 +1,4 @@
1
- import { ReactiveFieldErrorType } from '@/reactive-form/reactive-fields/types';
1
+ import { ReactiveFieldErrorType } from '../types';
2
2
  export declare const getError: (fieldKey: string, errors: ReactiveFieldErrorType) => any;
3
3
  export declare const errorsArrayToObject: (errorsArray: ReactiveFieldErrorType[], listKey: string) => Record<string, ReactiveFieldErrorType>;
4
4
  export declare const getMantineError: (error: ReactiveFieldErrorType | undefined) => string | boolean;
@@ -1,3 +1,3 @@
1
- import { Flatten } from '@/types';
1
+ import { Flatten } from '../types';
2
2
  export declare const getValuePath: (paths: string[], obj: Record<string, any>) => any;
3
3
  export declare const flattenObj: <T extends Record<string, any>>(obj: T, parent?: string, res?: any, index?: number) => Flatten<T>;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@funcd-dev/ui",
3
3
  "type": "module",
4
4
  "description": "React components for funcd: Mantine-based layouts, reactive forms, reactive charts and a flow editor",
5
- "version": "0.10.0",
5
+ "version": "0.10.1",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "scripts": {
36
36
  "dev": "storybook dev -p 3002",
37
- "build": "tsc && vp build && tsc -p tsconfig.build.json",
37
+ "build": "tsc && vp build && tsc -p tsconfig.build.json && tsx scripts/resolve-dts-aliases.ts",
38
38
  "generate:logo": "tsx scripts/generate-logo.tsx",
39
39
  "serve": "vp preview",
40
40
  "test": "vp test",