@fattureincloud/fic-design-system 0.15.9 → 0.15.11-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/ficFeatures/FICFeatures.d.ts +4 -0
- package/dist/components/ficFeatures/FICFeaturesContext.d.ts +5 -0
- package/dist/components/ficFeatures/components/changeOrderModal/ChangeOrderModal.d.ts +11 -0
- package/dist/components/ficFeatures/components/feature/Feature.d.ts +8 -0
- package/dist/components/ficFeatures/components/feature/styled.d.ts +6 -0
- package/dist/components/ficFeatures/components/featureCategory/EditableCategoryHeader.d.ts +9 -0
- package/dist/components/ficFeatures/components/featureCategory/FeatureCategory.d.ts +10 -0
- package/dist/components/ficFeatures/components/featureCategory/IconSelector.d.ts +10 -0
- package/dist/components/ficFeatures/components/featureCategory/styled.d.ts +3 -0
- package/dist/components/ficFeatures/components/featureEditModal/FeatureEditModal.d.ts +8 -0
- package/dist/components/ficFeatures/components/featureEditModal/PlanEditField.d.ts +8 -0
- package/dist/components/ficFeatures/components/featureEditModal/constants.d.ts +6 -0
- package/dist/components/ficFeatures/components/featureEditModal/styled.d.ts +3 -0
- package/dist/components/ficFeatures/components/iconSelectionModal/IconSelectionModal.d.ts +8 -0
- package/dist/components/ficFeatures/components/iconSelectionModal/styled.d.ts +3 -0
- package/dist/components/ficFeatures/components/topBar/TopBar.d.ts +10 -0
- package/dist/components/ficFeatures/components/topBar/styled.d.ts +1 -0
- package/dist/components/ficFeatures/configExample.d.ts +3 -0
- package/dist/components/ficFeatures/ficFeatures.stories.d.ts +6 -0
- package/dist/components/ficFeatures/icons.d.ts +6 -0
- package/dist/components/ficFeatures/styled.d.ts +2 -0
- package/dist/components/ficFeatures/types.d.ts +62 -0
- package/dist/components/monthlyTab/MonthlyTab.d.ts +1 -1
- package/dist/components/monthlyTab/components/month/Month.d.ts +3 -6
- package/dist/components/monthlyTab/index.d.ts +1 -1
- package/dist/components/monthlyTab/types.d.ts +7 -7
- package/dist/components/sortableList/SortableItem.d.ts +4 -0
- package/dist/components/sortableList/SortableList.d.ts +4 -0
- package/dist/components/sortableList/index.d.ts +2 -0
- package/dist/components/sortableList/styled.d.ts +4 -0
- package/dist/components/sortableList/types.d.ts +13 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +12 -10
@@ -0,0 +1,5 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { FICFeaturesContextValue, FICFeaturesProviderProps } from './types';
|
3
|
+
export declare const FICFeaturesContext: React.Context<FICFeaturesContextValue>;
|
4
|
+
declare const FICFeaturesProvider: ({ children, editable, plansToShow }: FICFeaturesProviderProps) => JSX.Element;
|
5
|
+
export default FICFeaturesProvider;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
declare type ChangeOrderModalProps<T extends Record<string, unknown>> = {
|
3
|
+
close: () => void;
|
4
|
+
itemLabelExtractor: (item: T) => string;
|
5
|
+
list: T[];
|
6
|
+
open: boolean;
|
7
|
+
title: string;
|
8
|
+
updateList: (newOrder: T[]) => void;
|
9
|
+
};
|
10
|
+
declare const ChangeOrderModal: <T extends Record<string, unknown>>({ close, itemLabelExtractor, list, open, title, updateList, }: ChangeOrderModalProps<T>) => JSX.Element;
|
11
|
+
export default ChangeOrderModal;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { TFeature } from '../../types';
|
3
|
+
declare type FeatureProps = TFeature & {
|
4
|
+
catIdx: number;
|
5
|
+
featureIdx: number;
|
6
|
+
};
|
7
|
+
declare const Feature: ({ catIdx, comingSoon, description, featureIdx, isNew, name, plans }: FeatureProps) => JSX.Element;
|
8
|
+
export default Feature;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export declare const FeatureContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
3
|
+
export declare const PlansWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
4
|
+
export declare const FeatureNameAndDesc: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
5
|
+
export declare const FeatureTitle: import("styled-components").StyledComponent<({ children, type, ...otherProps }: import("../../../../common/components/typography/types").TextProps & import("react").HTMLAttributes<HTMLDivElement>) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
6
|
+
export declare const PlanContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { TFeatureCategory, TFeaturesConfig } from '../../types';
|
3
|
+
declare type EditableCategoryHeaderProps = {
|
4
|
+
category: TFeatureCategory;
|
5
|
+
index: number;
|
6
|
+
setEditedConfig: React.Dispatch<React.SetStateAction<TFeaturesConfig>>;
|
7
|
+
};
|
8
|
+
declare const EditableCategoryHeader: ({ category, index, setEditedConfig }: EditableCategoryHeaderProps) => JSX.Element;
|
9
|
+
export default EditableCategoryHeader;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
2
|
+
import { SortFeatures, TFeatureCategory, TFeaturesConfig } from '../../types';
|
3
|
+
declare type FeatureCategoryProps = {
|
4
|
+
category: TFeatureCategory;
|
5
|
+
index: number;
|
6
|
+
setChangeFeaturesOrder: Dispatch<SetStateAction<SortFeatures | undefined>>;
|
7
|
+
setEditedConfig: Dispatch<SetStateAction<TFeaturesConfig>>;
|
8
|
+
};
|
9
|
+
declare const FeatureCategory: ({ category, index, setChangeFeaturesOrder, setEditedConfig, }: FeatureCategoryProps) => JSX.Element;
|
10
|
+
export default FeatureCategory;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { TFeaturesConfig } from '../../types';
|
3
|
+
declare type IconSelectorProps = {
|
4
|
+
close: () => void;
|
5
|
+
icon: string;
|
6
|
+
index: number;
|
7
|
+
setEditedConfig: React.Dispatch<React.SetStateAction<TFeaturesConfig>>;
|
8
|
+
};
|
9
|
+
declare const IconSelector: ({ close, icon, index, setEditedConfig }: IconSelectorProps) => JSX.Element;
|
10
|
+
export default IconSelector;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
export declare const CategoryHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
2
|
+
export declare const IconSelectorContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
3
|
+
export declare const ScrollableFeaturesWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { TFeaturesConfig } from '../../types';
|
3
|
+
declare type FeatureEditModalProps = {
|
4
|
+
editedConfig: TFeaturesConfig;
|
5
|
+
setEditedConfig: React.Dispatch<React.SetStateAction<TFeaturesConfig>>;
|
6
|
+
};
|
7
|
+
declare const FeatureEditModal: ({ editedConfig, setEditedConfig }: FeatureEditModalProps) => JSX.Element;
|
8
|
+
export default FeatureEditModal;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { TFeature, TPlanConfig } from '../../types';
|
3
|
+
declare type PlanEditFieldProps = TPlanConfig & {
|
4
|
+
index: number;
|
5
|
+
setFeatureCopy: React.Dispatch<React.SetStateAction<TFeature | undefined>>;
|
6
|
+
};
|
7
|
+
declare const PlanEditField: (props: PlanEditFieldProps) => JSX.Element;
|
8
|
+
export default PlanEditField;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
export declare const ModalBodyContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
2
|
+
export declare const PlanEditWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
3
|
+
export declare const PlanTableHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { TFeaturesConfig } from '../../types';
|
3
|
+
declare type IconSelectionModalProps = {
|
4
|
+
editedConfig: TFeaturesConfig;
|
5
|
+
setEditedConfig: React.Dispatch<React.SetStateAction<TFeaturesConfig>>;
|
6
|
+
};
|
7
|
+
declare const IconSelectionModal: ({ editedConfig, setEditedConfig }: IconSelectionModalProps) => JSX.Element;
|
8
|
+
export default IconSelectionModal;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
export declare const CurrentIconWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
2
|
+
export declare const IconGrid: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
3
|
+
export declare const IconWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
2
|
+
import { TFeaturesConfig } from '../../types';
|
3
|
+
declare type TopBarProps = {
|
4
|
+
editedConfig: TFeaturesConfig;
|
5
|
+
onSave?: (config: TFeaturesConfig) => void;
|
6
|
+
originalConfig: TFeaturesConfig;
|
7
|
+
setEditedConfig: Dispatch<SetStateAction<TFeaturesConfig>>;
|
8
|
+
};
|
9
|
+
declare const TopBar: ({ editedConfig, onSave, originalConfig, setEditedConfig }: TopBarProps) => JSX.Element;
|
10
|
+
export default TopBar;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const TopBarWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { Meta } from '@storybook/react';
|
2
|
+
import { ComponentProps } from 'react';
|
3
|
+
import FICFeatures from './FICFeatures';
|
4
|
+
export declare const Template: () => JSX.Element;
|
5
|
+
declare const FICFeaturesStories: Meta<ComponentProps<typeof FICFeatures>>;
|
6
|
+
export default FICFeaturesStories;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { IconProps } from '../icon';
|
2
|
+
export declare const greenPlusIcon: IconProps;
|
3
|
+
export declare const sortIcon: IconProps;
|
4
|
+
export declare const redBackwardIcon: IconProps;
|
5
|
+
export declare const greenCheckIcon: IconProps;
|
6
|
+
export declare const greyTimesIcon: IconProps;
|
@@ -0,0 +1,2 @@
|
|
1
|
+
export declare const FICFeaturesContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
2
|
+
export declare const FlexRow: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import { IconName } from '@fortawesome/fontawesome-svg-core';
|
2
|
+
import { Dispatch, SetStateAction } from 'react';
|
3
|
+
export declare enum DataType {
|
4
|
+
BOOLEAN = "boolean",
|
5
|
+
NUMBER = "number",
|
6
|
+
STRING = "string"
|
7
|
+
}
|
8
|
+
export declare const ficPlans: readonly ["forfettari", "standard", "premium", "premium_plus", "complete"];
|
9
|
+
export declare type TPlanConfig = {
|
10
|
+
id: (typeof ficPlans)[number];
|
11
|
+
type: DataType.STRING;
|
12
|
+
value: string;
|
13
|
+
} | {
|
14
|
+
id: (typeof ficPlans)[number];
|
15
|
+
type: DataType.BOOLEAN;
|
16
|
+
value: boolean;
|
17
|
+
} | {
|
18
|
+
id: (typeof ficPlans)[number];
|
19
|
+
type: DataType.NUMBER;
|
20
|
+
value: number;
|
21
|
+
};
|
22
|
+
export declare type TFeature = {
|
23
|
+
comingSoon?: boolean;
|
24
|
+
description?: string;
|
25
|
+
isNew?: boolean;
|
26
|
+
name: string;
|
27
|
+
plans: TPlanConfig[];
|
28
|
+
};
|
29
|
+
export declare type TFeatureCategory = {
|
30
|
+
categoryIcon: IconName;
|
31
|
+
categoryName: string;
|
32
|
+
features: TFeature[];
|
33
|
+
};
|
34
|
+
export declare type SortFeatures = TFeatureCategory & {
|
35
|
+
index: number;
|
36
|
+
};
|
37
|
+
export declare type TFeaturesConfig = TFeatureCategory[];
|
38
|
+
export declare type FICFeaturesProps = {
|
39
|
+
config: TFeaturesConfig;
|
40
|
+
editable?: boolean;
|
41
|
+
onSave?: (config: TFeaturesConfig) => void;
|
42
|
+
plansToShow: string[];
|
43
|
+
};
|
44
|
+
export declare type EditFeatureParams = {
|
45
|
+
catIdx: number;
|
46
|
+
featureIdx: number;
|
47
|
+
};
|
48
|
+
export declare type FICFeaturesContextValue = {
|
49
|
+
editable: boolean;
|
50
|
+
plansToShow: string[];
|
51
|
+
openCategoriesOrderModal: boolean;
|
52
|
+
setOpenCategoriesOrderModal: Dispatch<SetStateAction<boolean>>;
|
53
|
+
openFeaturesOrderModal: boolean;
|
54
|
+
setOpenFeaturesOrderModal: Dispatch<SetStateAction<boolean>>;
|
55
|
+
editFeatureParams: EditFeatureParams | undefined;
|
56
|
+
setEditFeatureParams: Dispatch<SetStateAction<EditFeatureParams | undefined>>;
|
57
|
+
chooseCategoryIcon: number | undefined;
|
58
|
+
setChooseCategoryIcon: Dispatch<SetStateAction<number | undefined>>;
|
59
|
+
};
|
60
|
+
export declare type FICFeaturesProviderProps = FICFeaturesProps & {
|
61
|
+
children: React.ReactNode;
|
62
|
+
};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { MonthlyTabProps } from './types';
|
3
|
-
declare const MonthlyTab: ({ data, onSelectionChange,
|
3
|
+
declare const MonthlyTab: ({ currentMonth, data, onSelectionChange, preSelectedMonths, }: MonthlyTabProps) => JSX.Element;
|
4
4
|
export default MonthlyTab;
|
@@ -1,15 +1,12 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
+
import { MonthDocument } from '../../types';
|
2
3
|
interface MonthProps {
|
3
4
|
monthNumber: number;
|
4
5
|
percentage: number;
|
5
6
|
selected: boolean;
|
6
|
-
documents:
|
7
|
+
documents: MonthDocument[];
|
7
8
|
amount: number;
|
8
|
-
monthText: {
|
9
|
-
singular: string;
|
10
|
-
plural: string;
|
11
|
-
}[];
|
12
9
|
isCurrentMonth: boolean;
|
13
10
|
}
|
14
|
-
declare const Month: ({
|
11
|
+
declare const Month: ({ amount, documents, isCurrentMonth, monthNumber, percentage, selected }: MonthProps) => JSX.Element;
|
15
12
|
export default Month;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
export { default as MonthlyTab } from './MonthlyTab';
|
2
|
-
export { MonthlyTabProps, MonthlyTabPalette, MonthData, MonthAmountData } from './types';
|
2
|
+
export { MonthlyTabProps, MonthlyTabPalette, MonthData, MonthAmountData, MonthDocumentAmount, MonthDocument, } from './types';
|
3
3
|
export { default as monthlyTabPalette } from './monthlyTabPalette';
|
@@ -3,20 +3,21 @@ export declare type MonthAmountData = {
|
|
3
3
|
month: number;
|
4
4
|
monthName: string;
|
5
5
|
} & MonthDocumentAmount;
|
6
|
-
declare type MonthDocumentAmount = {
|
7
|
-
documents:
|
6
|
+
export declare type MonthDocumentAmount = {
|
7
|
+
documents: MonthDocument[];
|
8
8
|
amount: number;
|
9
9
|
};
|
10
|
+
export interface MonthDocument {
|
11
|
+
number: number;
|
12
|
+
singular: string;
|
13
|
+
plural: string;
|
14
|
+
}
|
10
15
|
export declare type MonthData = {
|
11
16
|
months: MonthDocumentAmount[];
|
12
17
|
};
|
13
18
|
export interface MonthlyTabProps {
|
14
19
|
data: MonthData;
|
15
20
|
onSelectionChange: (monthsData: MonthAmountData[]) => void;
|
16
|
-
monthText?: {
|
17
|
-
singular: string;
|
18
|
-
plural: string;
|
19
|
-
}[];
|
20
21
|
preSelectedMonths: number[];
|
21
22
|
currentMonth: number;
|
22
23
|
}
|
@@ -39,4 +40,3 @@ export declare type MonthlyTabPalette = {
|
|
39
40
|
monthColor: paletteColor;
|
40
41
|
expenseColor: paletteColor;
|
41
42
|
};
|
42
|
-
export {};
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export declare const DragIcon: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
2
|
+
dragging: boolean;
|
3
|
+
}, never>;
|
4
|
+
export declare const DragItemWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { DragEvent, ReactNode, RefObject } from 'react';
|
2
|
+
export declare type SortableListProps<T extends Record<string, unknown>> = {
|
3
|
+
list: T[];
|
4
|
+
renderItem: (item: T) => ReactNode;
|
5
|
+
updateList: (newOrder: T[]) => void;
|
6
|
+
};
|
7
|
+
export declare type SortableItemProps = {
|
8
|
+
dragging?: number;
|
9
|
+
index: number;
|
10
|
+
onDragStart: (event: DragEvent<HTMLDivElement>, index: number, element: RefObject<HTMLDivElement>) => void;
|
11
|
+
onDragEnd: () => void;
|
12
|
+
renderItem: () => ReactNode;
|
13
|
+
};
|
package/dist/index.d.ts
CHANGED
@@ -35,7 +35,7 @@ export { MicroTag, MicroTagPalette, MicroTagProps } from './components/microTag'
|
|
35
35
|
export { Modal, ModalSearchable, ModalBody } from './components/modals';
|
36
36
|
export { ConfirmationModal } from './components/modals/confirmationModal';
|
37
37
|
export * from './components/modals/stepModal';
|
38
|
-
export { MonthlyTab, MonthlyTabPalette } from './components/monthlyTab';
|
38
|
+
export { MonthlyTab, MonthlyTabPalette, MonthData, MonthAmountData, MonthDocumentAmount, MonthlyTabProps, MonthDocument, } from './components/monthlyTab';
|
39
39
|
export { BulkAction, CellProps, ColumnDefType, ColumnsType, NewTable, RowAction, RowActions as NewRowActions, } from './components/newTable';
|
40
40
|
export * from './components/newTable_v2';
|
41
41
|
export { Column, ManualPagination, OnSelectionChange, OnSort, Row, RowActions, Table, TableData, TablePalette, TableProps, useTableValues, } from './components/oldTable';
|