pixel-react 1.5.7 → 1.5.9
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.
- package/.storybook/main.ts +1 -7
- package/.storybook/preview-head.html +3 -0
- package/index.scss +5 -0
- package/lib/components/Excel/ExcelFile/ExcelFile.d.ts +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.d.ts +2 -2
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/actions.d.ts +17 -1
- package/lib/components/Excel/Types.d.ts +22 -1
- package/lib/components/Excel/dataConversion.d.ts +3 -0
- package/lib/components/LabelEditTextField/types.d.ts +5 -0
- package/lib/components/MiniModal/types.d.ts +9 -0
- package/lib/index.d.ts +15 -1
- package/lib/index.esm.js +381 -119
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +381 -119
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -2
- package/src/assets/icons/license_info.svg +12 -12
- package/src/components/EditTextField/EditTextField.stories.tsx +1 -1
- package/src/components/Excel/ExcelFile/ExcelFile.tsx +60 -5
- package/src/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.tsx +39 -39
- package/src/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.tsx +34 -28
- package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.scss +0 -29
- package/src/components/Excel/ExcelFile/ExcelFileComponents/actions.ts +29 -0
- package/src/components/Excel/ExcelFile/ExcelFileComponents/reducer.ts +33 -0
- package/src/components/Excel/ExcelFile.stories.tsx +77 -67
- package/src/components/Excel/Types.ts +23 -1
- package/src/components/Excel/dataConversion.ts +173 -0
- package/src/components/LabelEditTextField/LabelEditTextField.scss +1 -0
- package/src/components/LabelEditTextField/LabelEditTextField.stories.tsx +11 -15
- package/src/components/LabelEditTextField/LabelEditTextField.tsx +44 -13
- package/src/components/LabelEditTextField/types.ts +5 -0
- package/src/components/MiniModal/MiniModal.scss +9 -5
- package/src/components/MiniModal/MiniModal.stories.tsx +28 -1
- package/src/components/MiniModal/MiniModal.tsx +110 -74
- package/src/components/MiniModal/types.ts +9 -0
- package/src/components/MultiSelect/MultiSelect.stories.tsx +1 -1
- package/src/components/MultiSelect/MultiSelect.tsx +11 -8
- package/src/components/Typography/Typography.scss +1 -36
- package/src/assets/fonts/Poppins-Bold.ttf +0 -0
- package/src/assets/fonts/Poppins-Bold.woff2 +0 -0
- package/src/assets/fonts/Poppins-Medium.ttf +0 -0
- package/src/assets/fonts/Poppins-Medium.woff2 +0 -0
- package/src/assets/fonts/Poppins-Regular.ttf +0 -0
- package/src/assets/fonts/Poppins-Regular.woff2 +0 -0
- package/src/assets/fonts/Poppins-SemiBold.ttf +0 -0
- package/src/assets/fonts/Poppins-SemiBold.woff2 +0 -0
package/.storybook/main.ts
CHANGED
@@ -21,12 +21,6 @@ const config: StorybookConfig = {
|
|
21
21
|
|
22
22
|
typescript: {
|
23
23
|
reactDocgen: 'react-docgen-typescript'
|
24
|
-
}
|
25
|
-
|
26
|
-
viteFinal: async (config) => {
|
27
|
-
// Ensure Vite processes font files
|
28
|
-
config.assetsInclude = [/\.(woff2?|eot|ttf|otf)$/];
|
29
|
-
return config;
|
30
|
-
},
|
24
|
+
}
|
31
25
|
};
|
32
26
|
export default config;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
2
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
3
|
+
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
|
package/index.scss
CHANGED
@@ -14,7 +14,7 @@ interface ExcelFileProps {
|
|
14
14
|
/** Controls whether the toolbar is shown, disabled, or hidden */
|
15
15
|
toolbar?: 'show' | 'disable' | 'hide';
|
16
16
|
/** Callback function to save the Excel data */
|
17
|
-
onSave?: (
|
17
|
+
onSave?: (saveData: any) => void;
|
18
18
|
}
|
19
19
|
declare const ExcelFile: React.FC<ExcelFileProps>;
|
20
20
|
export default ExcelFile;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import * as Types from './types';
|
3
|
-
declare const ColumnIndicator: Types.ColumnIndicatorComponent;
|
4
|
-
export default ColumnIndicator;
|
5
3
|
export declare const enhance: (ColumnIndicatorComponent: Types.ColumnIndicatorComponent) => React.FC<Omit<Types.ColumnIndicatorProps, "selected" | "onSelect">>;
|
4
|
+
declare const EnhancedColumnIndicator: React.FC<Omit<Types.ColumnIndicatorProps, "selected" | "onSelect">>;
|
5
|
+
export default EnhancedColumnIndicator;
|
@@ -38,9 +38,25 @@ export declare const ADD_ROW_TOP = "ADD_ROW_TOP";
|
|
38
38
|
export declare const ADD_COLUMN_LEFT = "ADD_COLUMN_LEFT";
|
39
39
|
export declare const DELETE_ROW = "DELETE_ROW";
|
40
40
|
export declare const DELETE_COLUMN = "DELETE_COLUMN";
|
41
|
+
export declare const SET_ROW_HEIGHT = "SET_ROW_HEIGHT";
|
42
|
+
export declare const SET_COLUMN_POSITION = "SET_COLUMN_POSITION";
|
41
43
|
export type BaseAction<T extends string> = {
|
42
44
|
type: T;
|
43
45
|
};
|
46
|
+
export type SetRowHeight = BaseAction<typeof SET_ROW_HEIGHT> & {
|
47
|
+
payload: {
|
48
|
+
row: number;
|
49
|
+
height: number;
|
50
|
+
};
|
51
|
+
};
|
52
|
+
export declare function setRowHeight(row: number, height: number): SetRowHeight;
|
53
|
+
export type SetColumnPosition = BaseAction<typeof SET_COLUMN_POSITION> & {
|
54
|
+
payload: {
|
55
|
+
column: number;
|
56
|
+
width: number;
|
57
|
+
};
|
58
|
+
};
|
59
|
+
export declare function setColumnPosition(column: number, width: number): SetColumnPosition;
|
44
60
|
export type BoldStyle = BaseAction<typeof BOLD> & {
|
45
61
|
payload: {
|
46
62
|
data: Matrix<CellBase>;
|
@@ -228,4 +244,4 @@ export type ClearAction = BaseAction<typeof CLEAR>;
|
|
228
244
|
export declare function clear(): ClearAction;
|
229
245
|
export type BlurAction = BaseAction<typeof BLUR>;
|
230
246
|
export declare function blur(): BlurAction;
|
231
|
-
export type Action = SetDataAction | SetCreateFormulaParserAction | SelectEntireRowAction | SelectEntireColumnAction | SelectEntireWorksheetAction | SetSelectionAction | SelectAction | ActivateAction | SetCellDataAction | SetCellDimensionsAction | PasteAction | KeyDownAction | DragStartAction | DragEndAction | CommitAction | CopyAction | CutAction | EditAction | ViewAction | ClearAction | UnderlineTypeStyle | FontSize | FontFamily | TextAlignType | BorderType | ItalicStyle | BoldStyle | ColorStyle | BackgroundStyle | FormatePainterStyle | AddRowTop | AddColumnLeft | DeleteRow | DeleteColumn | BlurAction;
|
247
|
+
export type Action = SetDataAction | SetCreateFormulaParserAction | SelectEntireRowAction | SelectEntireColumnAction | SelectEntireWorksheetAction | SetSelectionAction | SelectAction | ActivateAction | SetCellDataAction | SetCellDimensionsAction | PasteAction | KeyDownAction | DragStartAction | DragEndAction | CommitAction | CopyAction | CutAction | EditAction | ViewAction | ClearAction | UnderlineTypeStyle | FontSize | FontFamily | TextAlignType | BorderType | ItalicStyle | BoldStyle | ColorStyle | BackgroundStyle | FormatePainterStyle | AddRowTop | AddColumnLeft | DeleteRow | DeleteColumn | SetRowHeight | SetColumnPosition | BlurAction;
|
@@ -24,9 +24,30 @@ interface WorkData {
|
|
24
24
|
/** Value of the cell */
|
25
25
|
value: string;
|
26
26
|
/** Styling options for the cell */
|
27
|
-
style:
|
27
|
+
style: BackendStyle;
|
28
28
|
type?: boolean;
|
29
29
|
}
|
30
|
+
type BackendStyle = {
|
31
|
+
name: string;
|
32
|
+
size: number;
|
33
|
+
bold: boolean;
|
34
|
+
italic: boolean;
|
35
|
+
color: string;
|
36
|
+
backgroundColor: string;
|
37
|
+
borderColor: string;
|
38
|
+
underline: string;
|
39
|
+
border: {
|
40
|
+
top: string;
|
41
|
+
bottom: string;
|
42
|
+
left: string;
|
43
|
+
right: string;
|
44
|
+
};
|
45
|
+
alignment: {
|
46
|
+
horizontal: string;
|
47
|
+
vertical: string;
|
48
|
+
wrapText: boolean;
|
49
|
+
};
|
50
|
+
};
|
30
51
|
/** A generic type to represent a 2D matrix of any type (or undefined values) */
|
31
52
|
type Matrix<T> = (T | undefined)[][];
|
32
53
|
interface ContextAction {
|
@@ -0,0 +1,3 @@
|
|
1
|
+
export declare const getTextDecorationBack: (textDecoration: string) => "solid" | "dotted" | "dashed" | "wavy" | "NONE";
|
2
|
+
export declare function convertStyleToFrontend(backendStyle: BackendStyle): React.CSSProperties;
|
3
|
+
export declare const convertStyleToBackend: (frontendStyle: React.CSSProperties) => BackendStyle;
|
@@ -4,6 +4,7 @@ interface ModalDimensions {
|
|
4
4
|
height?: number;
|
5
5
|
borderRadius?: number;
|
6
6
|
zIndex?: number;
|
7
|
+
boxShadow?: string;
|
7
8
|
}
|
8
9
|
export interface MiniEditModalProps {
|
9
10
|
/**
|
@@ -90,7 +91,15 @@ export interface MiniEditModalProps {
|
|
90
91
|
wrapperProperties?: {
|
91
92
|
width?: number;
|
92
93
|
zIndex?: number;
|
94
|
+
boxShadow?: string;
|
93
95
|
};
|
96
|
+
arrowZIndex?: number;
|
97
|
+
overlay?: {
|
98
|
+
isOverlay?: boolean;
|
99
|
+
zIndexOverlay?: number;
|
100
|
+
backgroundColorOverlay?: string;
|
101
|
+
};
|
102
|
+
outSideClick?: any;
|
94
103
|
}
|
95
104
|
export interface Rect {
|
96
105
|
top: number;
|
package/lib/index.d.ts
CHANGED
@@ -1352,6 +1352,7 @@ interface ModalDimensions {
|
|
1352
1352
|
height?: number;
|
1353
1353
|
borderRadius?: number;
|
1354
1354
|
zIndex?: number;
|
1355
|
+
boxShadow?: string;
|
1355
1356
|
}
|
1356
1357
|
interface MiniEditModalProps {
|
1357
1358
|
/**
|
@@ -1438,7 +1439,15 @@ interface MiniEditModalProps {
|
|
1438
1439
|
wrapperProperties?: {
|
1439
1440
|
width?: number;
|
1440
1441
|
zIndex?: number;
|
1442
|
+
boxShadow?: string;
|
1443
|
+
};
|
1444
|
+
arrowZIndex?: number;
|
1445
|
+
overlay?: {
|
1446
|
+
isOverlay?: boolean;
|
1447
|
+
zIndexOverlay?: number;
|
1448
|
+
backgroundColorOverlay?: string;
|
1441
1449
|
};
|
1450
|
+
outSideClick?: any;
|
1442
1451
|
}
|
1443
1452
|
|
1444
1453
|
declare const MiniModal: React$1.ForwardRefExoticComponent<MiniEditModalProps & React$1.RefAttributes<HTMLDivElement>>;
|
@@ -2088,6 +2097,11 @@ interface LabelEditTextFieldTypes$1 {
|
|
2088
2097
|
isOpen?: boolean;
|
2089
2098
|
/**for conditionally handle custom error */
|
2090
2099
|
customErrorCondition?: boolean;
|
2100
|
+
onClick?: () => void;
|
2101
|
+
tooltip?: {
|
2102
|
+
tooltipTitle?: string;
|
2103
|
+
tooltipPlacement?: string;
|
2104
|
+
};
|
2091
2105
|
}
|
2092
2106
|
|
2093
2107
|
declare const LabelEditTextField: FC<LabelEditTextFieldTypes$1>;
|
@@ -2161,7 +2175,7 @@ interface ExcelFileProps {
|
|
2161
2175
|
/** Controls whether the toolbar is shown, disabled, or hidden */
|
2162
2176
|
toolbar?: 'show' | 'disable' | 'hide';
|
2163
2177
|
/** Callback function to save the Excel data */
|
2164
|
-
onSave?: (
|
2178
|
+
onSave?: (saveData: any) => void;
|
2165
2179
|
}
|
2166
2180
|
declare const ExcelFile: React__default.FC<ExcelFileProps>;
|
2167
2181
|
|