pixel-react 1.5.8 → 1.6.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.
- package/.storybook/main.ts +1 -7
- package/.storybook/preview-head.html +3 -0
- package/.yarn/install-state.gz +0 -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/FieldSet/FieldSet.d.ts +5 -0
- package/lib/components/FieldSet/index.d.ts +1 -0
- package/lib/components/FieldSet/types.d.ts +7 -0
- package/lib/components/FileDropzone/types.d.ts +8 -0
- package/lib/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/lib/components/MultiSelect/MultiSelectTypes.d.ts +1 -0
- package/lib/components/TableTree/TableTree.d.ts +4 -24
- package/lib/components/TableTree/data.d.ts +78 -273
- package/lib/components/TableTree/types.d.ts +29 -0
- package/lib/index.d.ts +99 -21
- package/lib/index.esm.js +597 -392
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +601 -392
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -3
- package/src/assets/icons/export.svg +5 -0
- package/src/assets/icons/import.svg +5 -0
- package/src/assets/icons/info_icon.svg +4 -16
- package/src/assets/icons/replace_file.svg +14 -0
- package/src/assets/icons/web_service_icon.svg +3 -0
- package/src/components/Checkbox/Checkbox.tsx +1 -7
- package/src/components/DragAndDrop/DragAndDropList.tsx +5 -4
- 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/FieldSet/FieldSet.scss +9 -0
- package/src/components/FieldSet/FieldSet.stories.tsx +103 -0
- package/src/components/FieldSet/FieldSet.tsx +29 -0
- package/src/components/FieldSet/index.ts +1 -0
- package/src/components/FieldSet/types.ts +8 -0
- package/src/components/FileDropzone/FileDropzone.scss +1 -1
- package/src/components/FileDropzone/FileDropzone.stories.tsx +15 -3
- package/src/components/FileDropzone/FileDropzone.tsx +5 -0
- package/src/components/FileDropzone/FilePreview.tsx +1 -1
- package/src/components/FileDropzone/types.ts +8 -0
- package/src/components/Icon/iconList.ts +11 -7
- package/src/components/MultiSelect/Dropdown.tsx +7 -3
- package/src/components/MultiSelect/MultiSelect.stories.tsx +6 -1
- package/src/components/MultiSelect/MultiSelect.tsx +4 -20
- package/src/components/MultiSelect/MultiSelectTypes.ts +2 -0
- package/src/components/TableTree/TableTree.scss +154 -123
- package/src/components/TableTree/TableTree.stories.tsx +10 -5
- package/src/components/TableTree/TableTree.tsx +220 -287
- package/src/components/TableTree/data.ts +677 -569
- package/src/components/TableTree/types.ts +31 -0
- package/src/components/Toast/Toast.tsx +1 -1
- package/src/components/Typography/Typography.scss +1 -36
- package/src/index.ts +8 -0
- 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/lib/index.d.ts
CHANGED
@@ -299,9 +299,10 @@ interface MultiSelectProps {
|
|
299
299
|
highlightedMachine?: string | ReactElement;
|
300
300
|
labelAccessor?: string;
|
301
301
|
valueAccessor?: string;
|
302
|
+
onEnter?: (newOption: string) => void;
|
302
303
|
}
|
303
304
|
|
304
|
-
declare const MultiSelect: ({ options, type, selectedOptions, onChange, acceptNewOption, zIndex, label, onSearch, required, disabled, errorMessage, displayCount, placeholderForSearching, variant, onLabelPlusIconClick, onManageLabelsClick, className, highlightedMachine, onSelectButtonClick, labelAccessor, valueAccessor, withSelectButton, }: MultiSelectProps) => react_jsx_runtime.JSX.Element;
|
305
|
+
declare const MultiSelect: ({ options, type, selectedOptions, onChange, acceptNewOption, zIndex, label, onSearch, required, disabled, errorMessage, displayCount, placeholderForSearching, variant, onLabelPlusIconClick, onManageLabelsClick, className, highlightedMachine, onSelectButtonClick, labelAccessor, valueAccessor, withSelectButton, onEnter }: MultiSelectProps) => react_jsx_runtime.JSX.Element;
|
305
306
|
|
306
307
|
interface ToasterProps {
|
307
308
|
/**Boolean value to handle state of toaster. */
|
@@ -1120,10 +1121,67 @@ interface FileDropzoneProps {
|
|
1120
1121
|
validateMIMEType?: boolean;
|
1121
1122
|
width?: number | string;
|
1122
1123
|
height?: number | string;
|
1124
|
+
/**
|
1125
|
+
* Returns the accepted files in the state
|
1126
|
+
**/
|
1127
|
+
getAcceptedFiles?: (files: File[]) => void;
|
1128
|
+
/**
|
1129
|
+
* Returns the rejected files in the state
|
1130
|
+
**/
|
1131
|
+
getRejectedFiles?: (files: FileRejection[]) => void;
|
1132
|
+
}
|
1133
|
+
interface FileError {
|
1134
|
+
message: string;
|
1135
|
+
code: string;
|
1136
|
+
}
|
1137
|
+
interface FileRejection {
|
1138
|
+
file: File;
|
1139
|
+
errors: FileError[];
|
1140
|
+
}
|
1141
|
+
interface DropzoneOptions {
|
1142
|
+
accept: string[];
|
1143
|
+
multiple?: boolean;
|
1144
|
+
maxSize?: number;
|
1145
|
+
maxFiles?: number | undefined;
|
1146
|
+
onDrop?: (acceptedFiles: File[], rejectedFiles: FileRejection[], event: React.DragEvent<HTMLElement> | React.ChangeEvent<HTMLInputElement>) => void;
|
1147
|
+
onMaxFilesError?: () => void;
|
1148
|
+
maxSizeErrorMessage?: string;
|
1149
|
+
invalidFileMessage?: string;
|
1150
|
+
fileExistMessage?: string;
|
1151
|
+
validateMIMEType?: boolean;
|
1152
|
+
}
|
1153
|
+
interface DropzoneState {
|
1154
|
+
getRootProps: () => React.HTMLAttributes<HTMLElement>;
|
1155
|
+
getInputProps: () => React.InputHTMLAttributes<HTMLInputElement>;
|
1156
|
+
acceptedFiles: File[];
|
1157
|
+
rejectedFiles: FileRejection[];
|
1158
|
+
isDragActive: boolean;
|
1159
|
+
handleRemoveClick: (file: File) => void;
|
1160
|
+
handleReplaceClick: (file: File) => void;
|
1161
|
+
}
|
1162
|
+
interface DroppableProps {
|
1163
|
+
icon: React.ReactNode;
|
1164
|
+
primaryLabel: string;
|
1165
|
+
secondaryLabel: string;
|
1166
|
+
buttonLabel: string;
|
1167
|
+
getRootProps: () => any;
|
1168
|
+
getInputProps: () => any;
|
1169
|
+
isDragActive: boolean;
|
1170
|
+
height: number | string;
|
1171
|
+
}
|
1172
|
+
interface FilePreviewProps {
|
1173
|
+
file: File;
|
1174
|
+
error?: string;
|
1175
|
+
onRemoveClick: (file: File) => void;
|
1176
|
+
onReplaceClick: (file: File) => void;
|
1123
1177
|
}
|
1124
1178
|
|
1125
1179
|
declare const FileDropzone: React.FC<FileDropzoneProps>;
|
1126
1180
|
|
1181
|
+
declare const Dropzone: FC<DroppableProps>;
|
1182
|
+
|
1183
|
+
declare const FilePreview: React.FC<FilePreviewProps>;
|
1184
|
+
|
1127
1185
|
type Theme = 'ff-light-theme' | 'ff-dark-theme' | 'ff-grey-theme';
|
1128
1186
|
interface ThemeContextType {
|
1129
1187
|
currentTheme: Theme;
|
@@ -1452,28 +1510,37 @@ interface MiniEditModalProps {
|
|
1452
1510
|
|
1453
1511
|
declare const MiniModal: React$1.ForwardRefExoticComponent<MiniEditModalProps & React$1.RefAttributes<HTMLDivElement>>;
|
1454
1512
|
|
1455
|
-
interface
|
1513
|
+
interface TreeNode {
|
1514
|
+
key: string;
|
1515
|
+
[key: string]: any;
|
1516
|
+
children?: TreeNode[];
|
1517
|
+
expanded?: boolean;
|
1518
|
+
}
|
1519
|
+
interface Column {
|
1456
1520
|
name: string;
|
1457
1521
|
accessor: string;
|
1458
1522
|
width: string;
|
1459
1523
|
isClickable?: boolean;
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1524
|
+
cell?: (row: any) => JSX.Element | string | null;
|
1525
|
+
actions?: (row: any) => JSX.Element[];
|
1526
|
+
isTree?: boolean;
|
1527
|
+
defaultValue?: string;
|
1528
|
+
defaultActions?: () => JSX.Element[];
|
1529
|
+
}
|
1530
|
+
interface TreeTableProps {
|
1531
|
+
treeData: any;
|
1532
|
+
columnsData: Column[];
|
1533
|
+
selected?: string[];
|
1534
|
+
select?: 'radio' | 'checkbox' | null;
|
1535
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>, node: TreeNode) => void;
|
1536
|
+
onPagination?: (node: TreeNode) => void;
|
1537
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement>, row: TreeNode) => void;
|
1538
|
+
expandedNodes: string[];
|
1539
|
+
onExpand?: (_isExpanded: boolean, node: string) => void;
|
1540
|
+
onPaginate: (_direction: 'up' | 'down', id: string) => void;
|
1541
|
+
}
|
1542
|
+
|
1543
|
+
declare const TreeTable: React__default.FC<TreeTableProps>;
|
1477
1544
|
|
1478
1545
|
interface TabsProps {
|
1479
1546
|
/**
|
@@ -2175,7 +2242,7 @@ interface ExcelFileProps {
|
|
2175
2242
|
/** Controls whether the toolbar is shown, disabled, or hidden */
|
2176
2243
|
toolbar?: 'show' | 'disable' | 'hide';
|
2177
2244
|
/** Callback function to save the Excel data */
|
2178
|
-
onSave?: (
|
2245
|
+
onSave?: (saveData: any) => void;
|
2179
2246
|
}
|
2180
2247
|
declare const ExcelFile: React__default.FC<ExcelFileProps>;
|
2181
2248
|
|
@@ -2352,6 +2419,15 @@ interface DownloadClientProps {
|
|
2352
2419
|
|
2353
2420
|
declare const DownloadClient: React.FC<DownloadClientProps>;
|
2354
2421
|
|
2422
|
+
interface fieldSetProps {
|
2423
|
+
legendName: string;
|
2424
|
+
height: string;
|
2425
|
+
width: string;
|
2426
|
+
children: ReactNode | string;
|
2427
|
+
}
|
2428
|
+
|
2429
|
+
declare const FieldSet: FC<fieldSetProps>;
|
2430
|
+
|
2355
2431
|
type valueType$1 = any;
|
2356
2432
|
declare const checkEmpty: (value: valueType$1) => boolean;
|
2357
2433
|
|
@@ -2478,4 +2554,6 @@ declare const ConnectingBranch: React__default.FC;
|
|
2478
2554
|
|
2479
2555
|
declare const saveFileFromBlob: (blob: Blob, filename: string) => void;
|
2480
2556
|
|
2481
|
-
|
2557
|
+
declare const useFileDropzone: (options: DropzoneOptions) => DropzoneState;
|
2558
|
+
|
2559
|
+
export { Accordion, AddButton as AddResourceButton, AllProjectsDropdown, AppHeader, AttachImage, AttachmentButton, Avatar, BarChart, Button, Checkbox, Chip, Col, ConnectingBranch, Container, DashboardDonutChart, CustomDatePicker as DatePicker, DonutChart, DownloadClient, DragAndDrop, Drawer, Dropzone, EditTextField, Editor, ExcelFile as Excel, ExpandableMenu, FieldSet, FileDropzone, FilePreview, ForwardedForms as Form, HighlightText, Icon, IconButton, IconRadialChart, IconRadioGroup, Input, InputWithDropdown, LabelEditTextField, LineChart, MachineInputField, MenuOption, MiniModal, Modal, ModuleChip, MultiRadialChart, MultiSelect, NlpInput as NLPInput, Paper, PieChart, RadialChart, RadioButton, RadioGroup, Recaptcha, Row, Search, Select, SequentialConnectingBranch, StateDropdown, StatusButton, StatusCard, Table, TreeTable as TableTree, Tabs, Textarea as TextArea, ThemeProvider, Toaster, Toastify, Toggle, ToggleSwitch, Tooltip, Typography, VariableDropdown, VariableInput, checkEmpty, compareArrays, compareObjects, debounce, ffid, findAndInsert, getEncryptedData, getExtension, getExtensionWithPeriod, getSequentialPayload, saveFileFromBlob, throttle, toast, truncateText, useFileDropzone, useTheme };
|