@oliasoft-open-source/react-ui-library 5.7.4-beta-2 → 5.8.0-beta-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.
- package/dist/global.css +1 -1
- package/dist/index.d.ts +114 -14
- package/dist/index.js +3049 -1120
- package/package.json +3 -1
package/dist/index.d.ts
CHANGED
|
@@ -35,22 +35,21 @@ export declare enum Align {
|
|
|
35
35
|
CENTER = "center"
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
export declare const AuditLog: React.FC<IAuditLogProps>;
|
|
39
|
+
|
|
38
40
|
export declare interface AuditLogItem {
|
|
39
41
|
id: string;
|
|
40
42
|
userName: string;
|
|
41
43
|
operation: AuditLogOperation;
|
|
42
44
|
source: AuditLogSource;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
diffs: any[];
|
|
45
|
+
createdAt: string;
|
|
46
|
+
diffs: JsonDelta | JsonDelta[] | null;
|
|
46
47
|
operationMetaData?: string;
|
|
47
48
|
}
|
|
48
49
|
|
|
49
|
-
declare type AuditLogOperation = 'Created' | 'Cloned' | 'Reverted' | 'Imported' | 'Updated';
|
|
50
|
-
|
|
51
|
-
declare type AuditLogSource = 'System' | 'Application' | 'API';
|
|
50
|
+
export declare type AuditLogOperation = 'Created' | 'Cloned' | 'Reverted' | 'Imported' | 'Updated';
|
|
52
51
|
|
|
53
|
-
export declare
|
|
52
|
+
export declare type AuditLogSource = 'System' | 'Application' | 'API';
|
|
54
53
|
|
|
55
54
|
export declare const Badge: ({ children, color, title, dot, margin, small, }: IBadgeProps) => JSX_2.Element;
|
|
56
55
|
|
|
@@ -79,7 +78,7 @@ export declare enum ButtonType {
|
|
|
79
78
|
|
|
80
79
|
export declare const Card: ({ bordered, heading, children, margin, padding, raised, }: ICardProps) => JSX_2.Element;
|
|
81
80
|
|
|
82
|
-
export declare const CheckBox: ({ noMargin, dataix, isInTable, tabIndex, checked, indeterminate, name, label, disabled, small, onChange, testId, value, helpText, onClickHelp, }: ICheckBoxProps) => JSX_2.Element;
|
|
81
|
+
export declare const CheckBox: ({ noMargin, dataix, isInTable, tabIndex, checked, indeterminate, name, label, disabled, small, onChange, testId, value, helpText, onClickHelp, textTransform, }: ICheckBoxProps) => JSX_2.Element;
|
|
83
82
|
|
|
84
83
|
export declare const Chevron: ({ expanded }: IChevronProps) => JSX_2.Element;
|
|
85
84
|
|
|
@@ -121,6 +120,15 @@ export declare const FileButton: ({ file, accept, multi, name, disabled, onChang
|
|
|
121
120
|
|
|
122
121
|
export declare const FileInput: ({ label, loading, placeholder, disabled, file, accept, multi, name, width, onChange, testId, }: IFileInputProps) => ReactElement;
|
|
123
122
|
|
|
123
|
+
declare type FilterToggle = {
|
|
124
|
+
id: string;
|
|
125
|
+
label: string;
|
|
126
|
+
checked: boolean;
|
|
127
|
+
small?: boolean;
|
|
128
|
+
disabled?: boolean;
|
|
129
|
+
onChange: () => void;
|
|
130
|
+
};
|
|
131
|
+
|
|
124
132
|
export declare const Flex: ({ alignItems, justifyContent, direction, height, children, wrap, gap, }: IFlexProps) => JSX_2.Element;
|
|
125
133
|
|
|
126
134
|
export declare const FormRow: ({ children }: IFormRowProps) => JSX_2.Element;
|
|
@@ -185,9 +193,17 @@ export declare interface IActionProps {
|
|
|
185
193
|
closeLayer?: TEmpty;
|
|
186
194
|
}
|
|
187
195
|
|
|
188
|
-
declare interface
|
|
196
|
+
declare interface IAuditLogProps {
|
|
189
197
|
logs: AuditLogItem[];
|
|
198
|
+
total: number;
|
|
190
199
|
loading?: boolean;
|
|
200
|
+
selectedPage: number;
|
|
201
|
+
rowsPerPage: number;
|
|
202
|
+
filterToggles?: FilterToggle[];
|
|
203
|
+
sectionNames: ISectionName[];
|
|
204
|
+
onSelectPage: (page: number) => void;
|
|
205
|
+
onChangeRowsPerPage: (n: number) => void;
|
|
206
|
+
data: any;
|
|
191
207
|
}
|
|
192
208
|
|
|
193
209
|
export declare interface IBadgeProps {
|
|
@@ -300,6 +316,7 @@ export declare interface ICheckBoxProps {
|
|
|
300
316
|
value?: string;
|
|
301
317
|
helpText?: string;
|
|
302
318
|
onClickHelp?: TEmpty;
|
|
319
|
+
textTransform?: TTextTransform;
|
|
303
320
|
}
|
|
304
321
|
|
|
305
322
|
export declare interface IChevronProps {
|
|
@@ -1036,6 +1053,23 @@ export declare interface INumberInputProps {
|
|
|
1036
1053
|
disableValidationOnFocus?: boolean;
|
|
1037
1054
|
}
|
|
1038
1055
|
|
|
1056
|
+
declare interface IOnImportPasteResult {
|
|
1057
|
+
allValues: string[][];
|
|
1058
|
+
affectedRange: {
|
|
1059
|
+
row: {
|
|
1060
|
+
start: number;
|
|
1061
|
+
end: number;
|
|
1062
|
+
};
|
|
1063
|
+
column: {
|
|
1064
|
+
start: number;
|
|
1065
|
+
end: number;
|
|
1066
|
+
};
|
|
1067
|
+
};
|
|
1068
|
+
insertedValues: string[][];
|
|
1069
|
+
errors: string[];
|
|
1070
|
+
isValid: boolean;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1039
1073
|
export declare interface IOptionDropdownProps {
|
|
1040
1074
|
name?: string;
|
|
1041
1075
|
label: string;
|
|
@@ -1185,6 +1219,7 @@ declare interface IRadioButtonOption {
|
|
|
1185
1219
|
name?: string;
|
|
1186
1220
|
checked?: boolean;
|
|
1187
1221
|
disabled?: boolean;
|
|
1222
|
+
textTransform?: TTextTransform;
|
|
1188
1223
|
}
|
|
1189
1224
|
|
|
1190
1225
|
export declare interface IRadioButtonProps {
|
|
@@ -1236,6 +1271,11 @@ declare interface IScrollDetails {
|
|
|
1236
1271
|
infiniteScroll?: boolean;
|
|
1237
1272
|
}
|
|
1238
1273
|
|
|
1274
|
+
declare interface ISectionName {
|
|
1275
|
+
sectionKey: string;
|
|
1276
|
+
sectionLabel: string;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1239
1279
|
declare interface ISelectCell extends TCommonCell {
|
|
1240
1280
|
type: TCellType;
|
|
1241
1281
|
name?: string;
|
|
@@ -1490,6 +1530,7 @@ export declare interface ITableImportExportProps {
|
|
|
1490
1530
|
config: ITableImportExportConfig;
|
|
1491
1531
|
smartUploadConfig?: ISmartUploadConfig;
|
|
1492
1532
|
testId?: string;
|
|
1533
|
+
__validationScopeId?: string;
|
|
1493
1534
|
}
|
|
1494
1535
|
|
|
1495
1536
|
export declare interface ITableImportExportState {
|
|
@@ -1522,6 +1563,8 @@ export declare interface ITableProps {
|
|
|
1522
1563
|
row: TRowType;
|
|
1523
1564
|
rowIndex: number;
|
|
1524
1565
|
}) => TRowType;
|
|
1566
|
+
enableMultiSelect?: boolean;
|
|
1567
|
+
onPasteApply?: (props: IOnImportPasteResult) => void;
|
|
1525
1568
|
}
|
|
1526
1569
|
|
|
1527
1570
|
declare interface ITableTableProps {
|
|
@@ -1546,6 +1589,9 @@ declare interface ITableTableProps {
|
|
|
1546
1589
|
stickyHeaders?: string | boolean;
|
|
1547
1590
|
actions?: any;
|
|
1548
1591
|
rowCount?: number;
|
|
1592
|
+
enableMultiSelect?: boolean;
|
|
1593
|
+
onPasteApply?: (props: IOnImportPasteResult) => void;
|
|
1594
|
+
validationRules?: TValidationRule_2[];
|
|
1549
1595
|
}
|
|
1550
1596
|
|
|
1551
1597
|
declare interface ITabOption {
|
|
@@ -1644,6 +1690,7 @@ export declare interface IToggleProps {
|
|
|
1644
1690
|
testId?: string;
|
|
1645
1691
|
helpText?: string;
|
|
1646
1692
|
onClickHelp?: (evt: any) => void;
|
|
1693
|
+
textTransform?: TTextTransform;
|
|
1647
1694
|
}
|
|
1648
1695
|
|
|
1649
1696
|
export declare interface ITooltipProps {
|
|
@@ -1831,6 +1878,7 @@ export declare interface IUnitTableProps extends Omit<ITableProps, 'table'> {
|
|
|
1831
1878
|
row: IUnitTableRow;
|
|
1832
1879
|
rowIndex: number;
|
|
1833
1880
|
}) => IUnitTableRow;
|
|
1881
|
+
enableMultiSelect?: boolean;
|
|
1834
1882
|
}
|
|
1835
1883
|
|
|
1836
1884
|
export declare interface IUnitTableRow extends Omit<TRowType, 'cells'> {
|
|
@@ -1840,6 +1888,8 @@ export declare interface IUnitTableRow extends Omit<TRowType, 'cells'> {
|
|
|
1840
1888
|
declare interface IUnitTableStaticCell extends IStaticCell, IUnitTableCell {
|
|
1841
1889
|
}
|
|
1842
1890
|
|
|
1891
|
+
declare type JsonDelta = Record<string, any>;
|
|
1892
|
+
|
|
1843
1893
|
export declare const Label: ({ label, width, helpText, helpTextMaxWidth, onClickHelp, lock, info, libraryIcon, labelLeft, textTransform, }: ILabelProps) => JSX_2.Element;
|
|
1844
1894
|
|
|
1845
1895
|
export declare const List: ({ list, bordered, expanding, narrow, toggleNarrow, onToggleNarrow, invokeEditOnRowClick, noHeader, stickyHeader, draggable, onListReorder, marginBottom, height, testId, scrollDetails, }: IListProps) => JSX_2.Element;
|
|
@@ -1922,9 +1972,9 @@ declare const SPLIT_VIEW = "split";
|
|
|
1922
1972
|
|
|
1923
1973
|
declare type StringNumberOrNode = TStringOrNumber | ReactNode;
|
|
1924
1974
|
|
|
1925
|
-
export declare const Table:
|
|
1975
|
+
export declare const Table: default_2.MemoExoticComponent<default_2.ForwardRefExoticComponent<ITableProps & default_2.RefAttributes<any>>>;
|
|
1926
1976
|
|
|
1927
|
-
export declare const TableImportExport: ({ config, smartUploadConfig, testId, }: ITableImportExportProps) => JSX_2.Element;
|
|
1977
|
+
export declare const TableImportExport: ({ config, smartUploadConfig, testId, __validationScopeId, }: ITableImportExportProps) => JSX_2.Element;
|
|
1928
1978
|
|
|
1929
1979
|
export declare const Tabs: ({ name, options: rawOptions, children, value: rawValue, onChange, padding, margin, contentPadding, onChangeTab, activeTabIndex: rawActiveTabIndex, tabs: tabsConfig, testId, }: ITabsProps) => JSX_2.Element | null;
|
|
1930
1980
|
|
|
@@ -2002,6 +2052,13 @@ export declare const TextArea: ({ name, value, placeholder, cols, rows, disabled
|
|
|
2002
2052
|
|
|
2003
2053
|
export declare const TextLink: ({ children, href, target, testId, onClick, component: Component, }: ITextLinkProps) => JSX_2.Element;
|
|
2004
2054
|
|
|
2055
|
+
export declare enum TextTransform {
|
|
2056
|
+
UPPERCASE = "uppercase",
|
|
2057
|
+
LOWERCASE = "lowercase",
|
|
2058
|
+
CAPITALIZE = "capitalize",
|
|
2059
|
+
NONE = "none"
|
|
2060
|
+
}
|
|
2061
|
+
|
|
2005
2062
|
declare type TFileReaderMethod = TInputReaderMethods | string;
|
|
2006
2063
|
|
|
2007
2064
|
declare type TFunction = (...args: any[]) => any;
|
|
@@ -2046,7 +2103,7 @@ export declare const toast: ({ id, message, autoClose, onClose, }: IToastProps)
|
|
|
2046
2103
|
|
|
2047
2104
|
export { Toaster }
|
|
2048
2105
|
|
|
2049
|
-
export declare const Toggle: ({ name, label, checked, disabled, display, small, onChange, noMargin, testId, helpText, onClickHelp, }: IToggleProps) => JSX_2.Element;
|
|
2106
|
+
export declare const Toggle: ({ name, label, checked, disabled, display, small, onChange, noMargin, testId, helpText, onClickHelp, textTransform, }: IToggleProps) => JSX_2.Element;
|
|
2050
2107
|
|
|
2051
2108
|
export declare type TOnChangeEvent = {
|
|
2052
2109
|
target: TOnChangeEventTarget;
|
|
@@ -2085,6 +2142,26 @@ declare const TRANSLATION_FALLBACK: {
|
|
|
2085
2142
|
allUsers: string;
|
|
2086
2143
|
adminOnly: string;
|
|
2087
2144
|
custom: string;
|
|
2145
|
+
created: string;
|
|
2146
|
+
modified: string;
|
|
2147
|
+
using: string;
|
|
2148
|
+
operation: string;
|
|
2149
|
+
date: string;
|
|
2150
|
+
changes: string;
|
|
2151
|
+
change: string;
|
|
2152
|
+
modifiedBy: string;
|
|
2153
|
+
updatedBy: string;
|
|
2154
|
+
createdBy: string;
|
|
2155
|
+
clonedBy: string;
|
|
2156
|
+
revertedBy: string;
|
|
2157
|
+
importedBy: string;
|
|
2158
|
+
singularChange: string;
|
|
2159
|
+
pluralChanges: string;
|
|
2160
|
+
createdThroughApiBy: string;
|
|
2161
|
+
changedThroughApiBy: string;
|
|
2162
|
+
showAll: string;
|
|
2163
|
+
rowsPerPage: string;
|
|
2164
|
+
unknown: string;
|
|
2088
2165
|
};
|
|
2089
2166
|
|
|
2090
2167
|
export declare const Tree: ({ list, draggable, onListReorder, onChangeOpen, testId, isInitialOpen, treeRef, itemHasChild, onItemToggle, icons, allowParentReassignment, stickyHeader, }: ITreeProps) => JSX_2.Element;
|
|
@@ -2117,7 +2194,7 @@ declare type TStringNumberNull = string | number | null;
|
|
|
2117
2194
|
|
|
2118
2195
|
declare type TStringOrNumber = string | number;
|
|
2119
2196
|
|
|
2120
|
-
declare type TTextTransform = 'uppercase' | 'lowercase' | 'capitalize' | 'none';
|
|
2197
|
+
export declare type TTextTransform = 'uppercase' | 'lowercase' | 'capitalize' | 'none';
|
|
2121
2198
|
|
|
2122
2199
|
export declare type TTheme = 'dark' | 'white' | 'light' | 'inherit';
|
|
2123
2200
|
|
|
@@ -2154,13 +2231,36 @@ export declare interface TValidationRule {
|
|
|
2154
2231
|
columnMessage?: Record<string, any>;
|
|
2155
2232
|
}
|
|
2156
2233
|
|
|
2234
|
+
declare interface TValidationRule_2 {
|
|
2235
|
+
fieldName: string;
|
|
2236
|
+
defaultUnit: string;
|
|
2237
|
+
validUnits: string[];
|
|
2238
|
+
optionalColumn?: boolean;
|
|
2239
|
+
validator?: (value: string) => string | boolean | undefined | null;
|
|
2240
|
+
fieldNameValidator?: (params: {
|
|
2241
|
+
value: string;
|
|
2242
|
+
defaultAllowedValues: string[];
|
|
2243
|
+
columnIndex: number;
|
|
2244
|
+
fields: string[];
|
|
2245
|
+
units: string[];
|
|
2246
|
+
}) => boolean;
|
|
2247
|
+
unitsValidator?: (params: {
|
|
2248
|
+
value: string;
|
|
2249
|
+
defaultAllowedValues: string[];
|
|
2250
|
+
columnIndex: number;
|
|
2251
|
+
fields: string[];
|
|
2252
|
+
units: string[];
|
|
2253
|
+
}) => boolean;
|
|
2254
|
+
columnMessage?: Record<string, any>;
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2157
2257
|
declare const UNIFIED_VIEW = "unified";
|
|
2158
2258
|
|
|
2159
2259
|
declare type UnitContextType = any;
|
|
2160
2260
|
|
|
2161
2261
|
export declare const UnitInput: ({ name, placeholder, disabled, disabledUnit, error, left, small, width, value, unitkey, initUnit, noConversion, onChange, onClick, onFocus, onSwitchUnit, unitTemplate, testId, warning, predefinedOptions, initialPredefinedOption, shouldLinkAutomaticly, selectedPredefinedOptionKey, validationCallback, disabledValidation, allowEmpty, convertBackToStorageUnit, enableCosmeticRounding, enableDisplayRounding, roundDisplayValue, selectOnFocus, groupOrder, tooltip, }: IUnitInputProps) => JSX_2.Element;
|
|
2162
2262
|
|
|
2163
|
-
export declare const UnitTable: ({ table, unitConfig, convertBackToStorageUnit, enableCosmeticRounding, enableDisplayRounding, onListReorder, canListReorder, beforeRenderRow: beforeRenderRowProp, }: IUnitTableProps) => JSX_2.Element;
|
|
2263
|
+
export declare const UnitTable: ({ table, unitConfig, convertBackToStorageUnit, enableCosmeticRounding, enableDisplayRounding, onListReorder, canListReorder, beforeRenderRow: beforeRenderRowProp, enableMultiSelect, }: IUnitTableProps) => JSX_2.Element;
|
|
2164
2264
|
|
|
2165
2265
|
export declare const useFocus: () => UseFocusReturnType;
|
|
2166
2266
|
|