@inceptionbg/iui 2.0.17 → 2.0.20

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.
Files changed (35) hide show
  1. package/dist/index.d.ts +16 -7
  2. package/dist/index.js +1 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/iui.css +1 -1
  5. package/package.json +2 -1
  6. package/src/components/Accordions/Accordions.tsx +35 -27
  7. package/src/components/Dialog/Dialog.tsx +27 -25
  8. package/src/components/Header/Components/EnvBadge.tsx +17 -0
  9. package/src/components/Header/Header.tsx +7 -3
  10. package/src/components/Inputs/Selects/components/SelectWrapper.tsx +4 -33
  11. package/src/components/Pullover/Pullover.tsx +32 -26
  12. package/src/components/Table/components/items/TableItemActions.tsx +5 -7
  13. package/src/components/Table/contexts/TableContext.tsx +8 -5
  14. package/src/components/Table/hooks/localHooks/useLocalTableData.tsx +1 -1
  15. package/src/components/Table/hooks/localHooks/useLocalTableKeyboard.ts +3 -1
  16. package/src/components/Table/hooks/useTableEdit.tsx +9 -2
  17. package/src/components/Table/hooks/useTableSearch.ts +2 -1
  18. package/src/components/Tabs/Tabs.tsx +3 -3
  19. package/src/components/Tooltip/Tooltip.tsx +14 -81
  20. package/src/index.ts +2 -0
  21. package/src/styles/common/_typography.scss +2 -2
  22. package/src/styles/components/_accordions.scss +1 -0
  23. package/src/styles/components/_dialog.scss +25 -19
  24. package/src/styles/components/_header.scss +5 -0
  25. package/src/styles/components/_table.scss +1 -1
  26. package/src/styles/components/_tabs.scss +1 -1
  27. package/src/types/ISelect.ts +1 -0
  28. package/src/types/ITable.ts +1 -1
  29. package/src/utils/InputPatternValidation.ts +2 -2
  30. package/src/utils/objectUtils.ts +15 -5
  31. package/src/assets/icons/duotone/faPen.ts +0 -18
  32. package/src/assets/icons/duotone/faTrashCan.ts +0 -18
  33. package/src/assets/icons/regular/faEllipsisVertical.ts +0 -15
  34. package/src/components/Inputs/Select2/Select.tsx +0 -258
  35. package/src/components/Inputs/Select2/select.scss +0 -42
package/dist/index.d.ts CHANGED
@@ -181,7 +181,7 @@ interface ITableDataItemCells {
181
181
  };
182
182
  }
183
183
  interface ITableDataActions<T = unknown> {
184
- hasEditAccess: boolean;
184
+ hasEditAccess?: boolean;
185
185
  actions?: (item?: T) => {
186
186
  label: string;
187
187
  onClick: () => void;
@@ -456,6 +456,7 @@ interface AsyncSelectProps extends BaseSelectProps {
456
456
  variant: 'async';
457
457
  loadOptions: any;
458
458
  defaultData?: ISelectData[];
459
+ refresh?: any[];
459
460
  }
460
461
  interface CreatableSelectProps extends BaseSelectProps {
461
462
  variant: 'async-creatable';
@@ -591,6 +592,10 @@ interface Props$k {
591
592
  initialValue?: string;
592
593
  compact?: boolean;
593
594
  keepContentInDom?: boolean;
595
+ control?: {
596
+ value: string;
597
+ setValue: (value: string) => void;
598
+ };
594
599
  className?: string;
595
600
  }
596
601
  declare const Accordions: FC<Props$k>;
@@ -1088,9 +1093,11 @@ interface BaseItemProps$1<T> {
1088
1093
  placeholder?: string;
1089
1094
  required?: boolean;
1090
1095
  additionalClearIds?: (keyof T)[];
1096
+ inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
1091
1097
  }
1092
1098
  interface SelectProps$1<T> extends BaseItemProps$1<T> {
1093
1099
  options: readonly (string | boolean)[] | (string | boolean)[];
1100
+ minWidth?: number;
1094
1101
  formatOption: (value: string | boolean) => {
1095
1102
  value: string | boolean;
1096
1103
  label: string;
@@ -1098,16 +1105,16 @@ interface SelectProps$1<T> extends BaseItemProps$1<T> {
1098
1105
  }
1099
1106
  declare const useTableEdit: <T extends Record<string, any>>() => {
1100
1107
  editable: Pick<ITableEdit<T>, "selectedItem" | "setSelectedItem" | "editData" | "setEditData">;
1101
- textEditCell: ({ placeholder, required, id, additionalClearIds, }: BaseItemProps$1<T>) => {
1108
+ textEditCell: ({ placeholder, required, id, additionalClearIds, inputProps, }: BaseItemProps$1<T>) => {
1102
1109
  value: react_jsx_runtime.JSX.Element;
1103
1110
  };
1104
- numberEditCell: ({ placeholder, required, id, additionalClearIds, }: BaseItemProps$1<T>) => {
1111
+ numberEditCell: ({ placeholder, required, id, additionalClearIds, inputProps, }: BaseItemProps$1<T>) => {
1105
1112
  value: react_jsx_runtime.JSX.Element;
1106
1113
  };
1107
- dateEditCell: ({ id, required, additionalClearIds, }: Omit<BaseItemProps$1<T>, "placeholder">) => {
1114
+ dateEditCell: ({ id, required, additionalClearIds, }: Omit<BaseItemProps$1<T>, "placeholder" | "inputProps">) => {
1108
1115
  value: react_jsx_runtime.JSX.Element;
1109
1116
  };
1110
- selectEditCell: ({ id, placeholder, required, options, formatOption, additionalClearIds, }: SelectProps$1<T>) => {
1117
+ selectEditCell: ({ id, placeholder, required, options, formatOption, additionalClearIds, minWidth, }: SelectProps$1<T>) => {
1111
1118
  value: react_jsx_runtime.JSX.Element;
1112
1119
  };
1113
1120
  };
@@ -1237,6 +1244,7 @@ declare const inputPattern: {
1237
1244
  year: string;
1238
1245
  number: string;
1239
1246
  strongPassword: string;
1247
+ email: string;
1240
1248
  };
1241
1249
 
1242
1250
  type LocalStorageItem = 'activeUser' | 'token' | 'refreshToken' | 'logInWay' | 'nextUrl' | 'codeVerifier' | 'language';
@@ -1253,7 +1261,7 @@ declare const formatCurrencyNoDecimals: (number?: string | number) => string;
1253
1261
  declare const formatDecimalNumber: (number?: string | number) => string | 0;
1254
1262
 
1255
1263
  declare const deleteProps: <T extends Record<string, any>>(obj: T, props: (keyof T)[]) => Partial<T>;
1256
- declare const deletePropsThatEndsWith: <T extends Record<string, any>>(obj: T, endsWith: string) => T;
1264
+ declare const deletePropsThatEndsWith: <T>(obj: T, endsWith: string) => Partial<T>;
1257
1265
  declare const deleteEmptyProps: <T extends Record<string, any>>(obj: T) => T;
1258
1266
  declare const deleteEmptyPropsIncludingArray: <T extends Record<string, any>>(obj: T) => T;
1259
1267
  declare const convertBooleanObjectToArray: (obj: IBooleanObject) => string[];
@@ -1264,6 +1272,7 @@ declare const deepCopy: (el: any[] | object) => any;
1264
1272
  declare const areStringArraysEqual: (arr1: string[], arr2: string[]) => boolean;
1265
1273
  declare const compareArrayItemsIndex: <T>(array: T[] | readonly T[], item1: T, comparison: "greaterThan" | "greaterThanOrEqualTo" | "lessThan" | "lessThanOrEqualTo", item2: T) => boolean;
1266
1274
  declare const intersectArrays: <T>(arr1: any[] | readonly T[], arr2: any[] | readonly T[]) => T[];
1275
+ declare const flattenTreeForSelect: (items: any[], depth?: number, maxDepth?: number) => any[];
1267
1276
 
1268
1277
  declare const getActiveFilterNumber: (obj: IAnyObject) => number;
1269
1278
  declare const getVisibleColumnsIds: (tableCols: ITableColumn[], isPrint?: boolean) => string[];
@@ -1576,5 +1585,5 @@ declare const usePopupControl: (props?: {
1576
1585
  onCloseCallback?: () => void;
1577
1586
  }) => IPopupControl;
1578
1587
 
1579
- export { Accordions, Alert, Button, Checkbox, Collapse, ConditionalWrapper, CreateTemplateDialog, CurrencyInput, Dashboard, DashboardWidget, DateInput, Dialog, DotBadge, FastLinksWidget, FormWrapper, FullScreenLoader, IconButton, LazyLoader, List, Loader, Menu, MenuItem, NotificationBadge, NumberInput, PageLayout, PasswordInput, PillBadge, ProgressBar, Pullover, Radio, RadioLarge, Router, SearchInput, Select, SelectAsyncPaginate, SelectCreatable, SplitButton, Table, Tabs, TextAreaInput, TextInput, TimeInput, Tooltip, Tree, areStringArraysEqual, calculateFilesSize, checkIfExpired, compareArrayItemsIndex, convertArrayToBooleanObject, convertBooleanObjectToArray, convertReportTemplateFilterToSearch, convertSearchToReportTemplateFilter, dataURLtoFile, dateAddDays, deepCopy, deleteEmptyProps, deleteEmptyPropsIncludingArray, deleteProps, deletePropsThatEndsWith, downloadDocumentFile, downloadFile, formatCurrency, formatCurrencyNoDecimals, formatDate, formatDateAndTime, formatDateYMD, formatDecimalNumber, formatTime, formatYearMonth, getActiveFilterNumber, getActiveOrgUuid, getBase64FromFile, getBase64FromUrl, getCurrentDateFormatted, getCurrentDateFormattedYMD, getDaysLeft, getDefaultOrgUuid, getExtensionFromFilename, getFileFromUrl, getInputHelperText, getInputMinMaxPattern, getPrintColumns, getVisibleColumnsIds, i18nIUICyrilic, i18nIUILatin, i18nIUIMe, inputPattern, intersectArrays, lsGet, lsRemove, lsSet, maxChar, parseUrlSearch, rootDir, rotateBase64Image, setActiveOrgUuid, setDefaultOrgUuid, setTemplateData, sizeInBytesPretty, splitBase64File, tableCustomLimit1000, toastError, toastSuccess, useHideZendesk, useIsMenuOpen, useOnEsc, usePopupControl, useTableColumns, useTableEdit, useTableFilterFields, useTablePagination, useTablePrint, useTableSearch, useTableSelect, useTableSort };
1588
+ export { Accordions, Alert, Button, Checkbox, Collapse, ConditionalWrapper, CreateTemplateDialog, CurrencyInput, Dashboard, DashboardWidget, DateInput, Dialog, DotBadge, FastLinksWidget, FormWrapper, FullScreenLoader, IconButton, LazyLoader, List, Loader, Menu, MenuItem, NotificationBadge, NumberInput, PageLayout, PasswordInput, PillBadge, ProgressBar, Pullover, Radio, RadioLarge, Router, SearchInput, Select, SelectAsyncPaginate, SelectCreatable, SplitButton, Table, Tabs, TextAreaInput, TextInput, TimeInput, Tooltip, Tree, areStringArraysEqual, calculateFilesSize, checkIfExpired, compareArrayItemsIndex, convertArrayToBooleanObject, convertBooleanObjectToArray, convertReportTemplateFilterToSearch, convertSearchToReportTemplateFilter, dataURLtoFile, dateAddDays, deepCopy, deleteEmptyProps, deleteEmptyPropsIncludingArray, deleteProps, deletePropsThatEndsWith, downloadDocumentFile, downloadFile, flattenTreeForSelect, formatCurrency, formatCurrencyNoDecimals, formatDate, formatDateAndTime, formatDateYMD, formatDecimalNumber, formatTime, formatYearMonth, getActiveFilterNumber, getActiveOrgUuid, getBase64FromFile, getBase64FromUrl, getCurrentDateFormatted, getCurrentDateFormattedYMD, getDaysLeft, getDefaultOrgUuid, getExtensionFromFilename, getFileFromUrl, getInputHelperText, getInputMinMaxPattern, getPrintColumns, getVisibleColumnsIds, i18nIUICyrilic, i18nIUILatin, i18nIUIMe, inputPattern, intersectArrays, lsGet, lsRemove, lsSet, maxChar, parseUrlSearch, rootDir, rotateBase64Image, setActiveOrgUuid, setDefaultOrgUuid, setTemplateData, sizeInBytesPretty, splitBase64File, tableCustomLimit1000, toastError, toastSuccess, useHideZendesk, useIsMenuOpen, useOnEsc, usePopupControl, useTableColumns, useTableEdit, useTableFilterFields, useTablePagination, useTablePrint, useTableSearch, useTableSelect, useTableSort };
1580
1589
  export type { DeepPartial, IAlertProps, IAnyObject, IBooleanObject, IError, IFormWrapper, IGetPrintData, IHeaderAction, IHeaderUserMenuProps, IKeyboardAction, ILocalPopupControl, IMenuItem, IMenuPlacement, INotification, INotificationsProps, IPagination, IPaginationControl, IPopupControl, IPrintData, IReportTemplate, IReportTemplateData, IReportTemplateFilterValue, IRoute, ISelectData, ISidebarItem, ISimpleObject, ISimpleObjectWithCode, IStringObject, ITab, ITable, ITableColumn, ITableDataActions, ITableDataItem, ITableDataItemCells, ITableEdit, ITableFilter, ITableFilterData, ITableFilterItem, ITableItemDeleteData, ITableSearchProps, ITableSort, ITableTemplateData, ITreeItem, IValueLabel, IPopupControlRef as PopupControlRef };