@bluemarble/bm-components 0.0.26 → 0.0.27
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.
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare function getTabProps(index: string): {
|
|
3
|
+
id: string;
|
|
4
|
+
"aria-controls": string;
|
|
5
|
+
};
|
|
6
|
+
export interface TabPanelProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
value: number;
|
|
9
|
+
index: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const TabPanel: (props: TabPanelProps) => JSX.Element;
|
|
@@ -7,6 +7,4 @@ export { Checkbox } from "./Checkbox";
|
|
|
7
7
|
export { Switch } from "./Switch";
|
|
8
8
|
export { Radio } from "./Radio";
|
|
9
9
|
export { LargeButton } from "./LargeButton";
|
|
10
|
-
export {
|
|
11
|
-
export { useEditableGrid } from "./hooks/useEditableGrid";
|
|
12
|
-
export { useEvent } from "./hooks/useEvent";
|
|
10
|
+
export { TabPanel, getTabProps, TabPanelProps } from "./TabPanel";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React, { ReactNode, FC } from 'react';
|
|
3
|
-
import { TableCellProps, TextFieldProps, TableRowProps, StandardTextFieldProps, SelectProps as SelectProps$1, FormControlProps, InputLabelProps, AutocompleteRenderInputParams, AutocompleteProps as AutocompleteProps$1, CheckboxProps as CheckboxProps$1, FormControlLabelProps, SwitchProps as SwitchProps$1, RadioGroupProps, ButtonProps, CircularProgressProps
|
|
3
|
+
import { TableCellProps, TextFieldProps, TableRowProps, StandardTextFieldProps, SelectProps as SelectProps$1, FormControlProps, InputLabelProps, AutocompleteRenderInputParams, AutocompleteProps as AutocompleteProps$1, CheckboxProps as CheckboxProps$1, FormControlLabelProps, SwitchProps as SwitchProps$1, RadioGroupProps, ButtonProps, CircularProgressProps } from '@mui/material';
|
|
4
4
|
import IMask$1 from 'imask';
|
|
5
5
|
|
|
6
6
|
interface ColumnTitleProps {
|
|
@@ -181,90 +181,15 @@ interface LargeButtonProps extends ButtonProps {
|
|
|
181
181
|
}
|
|
182
182
|
declare const LargeButton: ({ loading, children, CircularProgressProps, sx, ...rest }: LargeButtonProps) => JSX.Element;
|
|
183
183
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
interface GridInputProps extends BaseTextFieldProps {
|
|
194
|
-
onDefaultValue?: (value: string) => string;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
interface onSaveOptions<T> {
|
|
198
|
-
prop: keyof T;
|
|
199
|
-
newValue: string;
|
|
184
|
+
declare function getTabProps(index: string): {
|
|
185
|
+
id: string;
|
|
186
|
+
"aria-controls": string;
|
|
187
|
+
};
|
|
188
|
+
interface TabPanelProps {
|
|
189
|
+
children: React.ReactNode;
|
|
190
|
+
value: number;
|
|
200
191
|
index: number;
|
|
201
192
|
}
|
|
202
|
-
|
|
203
|
-
id?: string | number;
|
|
204
|
-
name: keyof T | "";
|
|
205
|
-
label: string;
|
|
206
|
-
visible?: boolean;
|
|
207
|
-
type?: GridInputProps["type"] | "select" | "autocomplete";
|
|
208
|
-
inputProps?: GridInputProps;
|
|
209
|
-
select?: Omit<InputSelectCellProps, "setCanSave" | "onInputChange">;
|
|
210
|
-
formatLabelValue?: (value: string) => string;
|
|
211
|
-
required?: boolean;
|
|
212
|
-
TableCellProps?: TableCellProps;
|
|
213
|
-
newRow?: {
|
|
214
|
-
defaultValue?: string;
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
interface EditableGridProps<T> {
|
|
218
|
-
columns: ColumnsProps<T>[];
|
|
219
|
-
data: Array<T>;
|
|
220
|
-
primaryKey: keyof T;
|
|
221
|
-
focusedIndex: {
|
|
222
|
-
x: number;
|
|
223
|
-
y: number;
|
|
224
|
-
};
|
|
225
|
-
isEditing: boolean;
|
|
226
|
-
bordered?: boolean;
|
|
227
|
-
onSave: (item: T, options: onSaveOptions<T>) => void;
|
|
228
|
-
setFocusedIndex: (props: {
|
|
229
|
-
x: number;
|
|
230
|
-
y: number;
|
|
231
|
-
}) => void;
|
|
232
|
-
setIsEditing: (value: boolean) => void;
|
|
233
|
-
canEditTable: boolean;
|
|
234
|
-
setCanEditTable: (value: boolean) => void;
|
|
235
|
-
selectedRows: number[];
|
|
236
|
-
setSelectedRows: (value: number[]) => void;
|
|
237
|
-
checkbox?: boolean;
|
|
238
|
-
checkMultiple?: boolean;
|
|
239
|
-
onSaveNewRow?: (newRow: T) => void;
|
|
240
|
-
canInsertNewRow: boolean;
|
|
241
|
-
setCanInsertNewRow: (value: boolean) => void;
|
|
242
|
-
}
|
|
243
|
-
declare function EditableGrid<T extends Record<string, any>>({ columns, data, primaryKey, onSave, setFocusedIndex, setIsEditing, focusedIndex, isEditing, bordered, canEditTable, setCanEditTable, selectedRows, setSelectedRows, checkbox, checkMultiple, onSaveNewRow, canInsertNewRow, }: EditableGridProps<T>): JSX.Element;
|
|
244
|
-
|
|
245
|
-
declare type useEditableGridResponseProps<T> = {
|
|
246
|
-
data: Array<T>;
|
|
247
|
-
focusedIndex: {
|
|
248
|
-
x: number;
|
|
249
|
-
y: number;
|
|
250
|
-
};
|
|
251
|
-
isEditing: boolean;
|
|
252
|
-
setData: (props: Array<T>) => void;
|
|
253
|
-
setIsEditing: (value: boolean) => void;
|
|
254
|
-
setFocusedIndex: (props: {
|
|
255
|
-
x: number;
|
|
256
|
-
y: number;
|
|
257
|
-
}) => void;
|
|
258
|
-
onSave: (newItem: T, props: onSaveOptions<T>) => void;
|
|
259
|
-
canEditTable: boolean;
|
|
260
|
-
setCanEditTable: (value: boolean) => void;
|
|
261
|
-
selectedRows: number[];
|
|
262
|
-
setSelectedRows: (value: number[]) => void;
|
|
263
|
-
canInsertNewRow: boolean;
|
|
264
|
-
setCanInsertNewRow: (value: boolean) => void;
|
|
265
|
-
};
|
|
266
|
-
declare function useEditableGrid<T>(): useEditableGridResponseProps<T>;
|
|
267
|
-
|
|
268
|
-
declare function useEvent(event: keyof WindowEventMap, handler: (ev: any) => void, passive?: boolean): void;
|
|
193
|
+
declare const TabPanel: (props: TabPanelProps) => JSX.Element;
|
|
269
194
|
|
|
270
|
-
export { Autocomplete, Checkbox, ColumnTitleProps,
|
|
195
|
+
export { Autocomplete, Checkbox, ColumnTitleProps, EditableTableCell, FilterProps, Grid, IFilter, Input, InputMask, LargeButton, Radio, Select, Switch, TabPanel, TabPanelProps, Td, Tr, filterData, getTabProps };
|