@oliasoft-open-source/react-ui-library 5.7.4-beta-3 → 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/index.d.ts CHANGED
@@ -35,21 +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
45
  createdAt: string;
44
- diffs: any[];
46
+ diffs: JsonDelta | JsonDelta[] | null;
45
47
  operationMetaData?: string;
46
48
  }
47
49
 
48
- declare type AuditLogOperation = 'Created' | 'Cloned' | 'Reverted' | 'Imported' | 'Updated';
49
-
50
- declare type AuditLogSource = 'System' | 'Application' | 'API';
50
+ export declare type AuditLogOperation = 'Created' | 'Cloned' | 'Reverted' | 'Imported' | 'Updated';
51
51
 
52
- export declare function AuditLogTable({ logs, loading }: IAuditLogTableProps): JSX_2.Element;
52
+ export declare type AuditLogSource = 'System' | 'Application' | 'API';
53
53
 
54
54
  export declare const Badge: ({ children, color, title, dot, margin, small, }: IBadgeProps) => JSX_2.Element;
55
55
 
@@ -78,7 +78,7 @@ export declare enum ButtonType {
78
78
 
79
79
  export declare const Card: ({ bordered, heading, children, margin, padding, raised, }: ICardProps) => JSX_2.Element;
80
80
 
81
- 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;
82
82
 
83
83
  export declare const Chevron: ({ expanded }: IChevronProps) => JSX_2.Element;
84
84
 
@@ -120,6 +120,15 @@ export declare const FileButton: ({ file, accept, multi, name, disabled, onChang
120
120
 
121
121
  export declare const FileInput: ({ label, loading, placeholder, disabled, file, accept, multi, name, width, onChange, testId, }: IFileInputProps) => ReactElement;
122
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
+
123
132
  export declare const Flex: ({ alignItems, justifyContent, direction, height, children, wrap, gap, }: IFlexProps) => JSX_2.Element;
124
133
 
125
134
  export declare const FormRow: ({ children }: IFormRowProps) => JSX_2.Element;
@@ -184,9 +193,17 @@ export declare interface IActionProps {
184
193
  closeLayer?: TEmpty;
185
194
  }
186
195
 
187
- declare interface IAuditLogTableProps {
196
+ declare interface IAuditLogProps {
188
197
  logs: AuditLogItem[];
198
+ total: number;
189
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;
190
207
  }
191
208
 
192
209
  export declare interface IBadgeProps {
@@ -299,6 +316,7 @@ export declare interface ICheckBoxProps {
299
316
  value?: string;
300
317
  helpText?: string;
301
318
  onClickHelp?: TEmpty;
319
+ textTransform?: TTextTransform;
302
320
  }
303
321
 
304
322
  export declare interface IChevronProps {
@@ -1035,6 +1053,23 @@ export declare interface INumberInputProps {
1035
1053
  disableValidationOnFocus?: boolean;
1036
1054
  }
1037
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
+
1038
1073
  export declare interface IOptionDropdownProps {
1039
1074
  name?: string;
1040
1075
  label: string;
@@ -1184,6 +1219,7 @@ declare interface IRadioButtonOption {
1184
1219
  name?: string;
1185
1220
  checked?: boolean;
1186
1221
  disabled?: boolean;
1222
+ textTransform?: TTextTransform;
1187
1223
  }
1188
1224
 
1189
1225
  export declare interface IRadioButtonProps {
@@ -1235,6 +1271,11 @@ declare interface IScrollDetails {
1235
1271
  infiniteScroll?: boolean;
1236
1272
  }
1237
1273
 
1274
+ declare interface ISectionName {
1275
+ sectionKey: string;
1276
+ sectionLabel: string;
1277
+ }
1278
+
1238
1279
  declare interface ISelectCell extends TCommonCell {
1239
1280
  type: TCellType;
1240
1281
  name?: string;
@@ -1489,6 +1530,7 @@ export declare interface ITableImportExportProps {
1489
1530
  config: ITableImportExportConfig;
1490
1531
  smartUploadConfig?: ISmartUploadConfig;
1491
1532
  testId?: string;
1533
+ __validationScopeId?: string;
1492
1534
  }
1493
1535
 
1494
1536
  export declare interface ITableImportExportState {
@@ -1521,6 +1563,8 @@ export declare interface ITableProps {
1521
1563
  row: TRowType;
1522
1564
  rowIndex: number;
1523
1565
  }) => TRowType;
1566
+ enableMultiSelect?: boolean;
1567
+ onPasteApply?: (props: IOnImportPasteResult) => void;
1524
1568
  }
1525
1569
 
1526
1570
  declare interface ITableTableProps {
@@ -1545,6 +1589,9 @@ declare interface ITableTableProps {
1545
1589
  stickyHeaders?: string | boolean;
1546
1590
  actions?: any;
1547
1591
  rowCount?: number;
1592
+ enableMultiSelect?: boolean;
1593
+ onPasteApply?: (props: IOnImportPasteResult) => void;
1594
+ validationRules?: TValidationRule_2[];
1548
1595
  }
1549
1596
 
1550
1597
  declare interface ITabOption {
@@ -1643,6 +1690,7 @@ export declare interface IToggleProps {
1643
1690
  testId?: string;
1644
1691
  helpText?: string;
1645
1692
  onClickHelp?: (evt: any) => void;
1693
+ textTransform?: TTextTransform;
1646
1694
  }
1647
1695
 
1648
1696
  export declare interface ITooltipProps {
@@ -1830,6 +1878,7 @@ export declare interface IUnitTableProps extends Omit<ITableProps, 'table'> {
1830
1878
  row: IUnitTableRow;
1831
1879
  rowIndex: number;
1832
1880
  }) => IUnitTableRow;
1881
+ enableMultiSelect?: boolean;
1833
1882
  }
1834
1883
 
1835
1884
  export declare interface IUnitTableRow extends Omit<TRowType, 'cells'> {
@@ -1839,6 +1888,8 @@ export declare interface IUnitTableRow extends Omit<TRowType, 'cells'> {
1839
1888
  declare interface IUnitTableStaticCell extends IStaticCell, IUnitTableCell {
1840
1889
  }
1841
1890
 
1891
+ declare type JsonDelta = Record<string, any>;
1892
+
1842
1893
  export declare const Label: ({ label, width, helpText, helpTextMaxWidth, onClickHelp, lock, info, libraryIcon, labelLeft, textTransform, }: ILabelProps) => JSX_2.Element;
1843
1894
 
1844
1895
  export declare const List: ({ list, bordered, expanding, narrow, toggleNarrow, onToggleNarrow, invokeEditOnRowClick, noHeader, stickyHeader, draggable, onListReorder, marginBottom, height, testId, scrollDetails, }: IListProps) => JSX_2.Element;
@@ -1921,9 +1972,9 @@ declare const SPLIT_VIEW = "split";
1921
1972
 
1922
1973
  declare type StringNumberOrNode = TStringOrNumber | ReactNode;
1923
1974
 
1924
- export declare const Table: (props: ITableProps) => JSX_2.Element;
1975
+ export declare const Table: default_2.MemoExoticComponent<default_2.ForwardRefExoticComponent<ITableProps & default_2.RefAttributes<any>>>;
1925
1976
 
1926
- export declare const TableImportExport: ({ config, smartUploadConfig, testId, }: ITableImportExportProps) => JSX_2.Element;
1977
+ export declare const TableImportExport: ({ config, smartUploadConfig, testId, __validationScopeId, }: ITableImportExportProps) => JSX_2.Element;
1927
1978
 
1928
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;
1929
1980
 
@@ -2001,6 +2052,13 @@ export declare const TextArea: ({ name, value, placeholder, cols, rows, disabled
2001
2052
 
2002
2053
  export declare const TextLink: ({ children, href, target, testId, onClick, component: Component, }: ITextLinkProps) => JSX_2.Element;
2003
2054
 
2055
+ export declare enum TextTransform {
2056
+ UPPERCASE = "uppercase",
2057
+ LOWERCASE = "lowercase",
2058
+ CAPITALIZE = "capitalize",
2059
+ NONE = "none"
2060
+ }
2061
+
2004
2062
  declare type TFileReaderMethod = TInputReaderMethods | string;
2005
2063
 
2006
2064
  declare type TFunction = (...args: any[]) => any;
@@ -2045,7 +2103,7 @@ export declare const toast: ({ id, message, autoClose, onClose, }: IToastProps)
2045
2103
 
2046
2104
  export { Toaster }
2047
2105
 
2048
- 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;
2049
2107
 
2050
2108
  export declare type TOnChangeEvent = {
2051
2109
  target: TOnChangeEventTarget;
@@ -2084,6 +2142,26 @@ declare const TRANSLATION_FALLBACK: {
2084
2142
  allUsers: string;
2085
2143
  adminOnly: string;
2086
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;
2087
2165
  };
2088
2166
 
2089
2167
  export declare const Tree: ({ list, draggable, onListReorder, onChangeOpen, testId, isInitialOpen, treeRef, itemHasChild, onItemToggle, icons, allowParentReassignment, stickyHeader, }: ITreeProps) => JSX_2.Element;
@@ -2116,7 +2194,7 @@ declare type TStringNumberNull = string | number | null;
2116
2194
 
2117
2195
  declare type TStringOrNumber = string | number;
2118
2196
 
2119
- declare type TTextTransform = 'uppercase' | 'lowercase' | 'capitalize' | 'none';
2197
+ export declare type TTextTransform = 'uppercase' | 'lowercase' | 'capitalize' | 'none';
2120
2198
 
2121
2199
  export declare type TTheme = 'dark' | 'white' | 'light' | 'inherit';
2122
2200
 
@@ -2153,13 +2231,36 @@ export declare interface TValidationRule {
2153
2231
  columnMessage?: Record<string, any>;
2154
2232
  }
2155
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
+
2156
2257
  declare const UNIFIED_VIEW = "unified";
2157
2258
 
2158
2259
  declare type UnitContextType = any;
2159
2260
 
2160
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;
2161
2262
 
2162
- 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;
2163
2264
 
2164
2265
  export declare const useFocus: () => UseFocusReturnType;
2165
2266