@inceptionbg/iui 1.0.5 → 1.0.7

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 (107) hide show
  1. package/dist/index.css +1 -0
  2. package/dist/index.d.ts +407 -0
  3. package/dist/index.js +269 -0
  4. package/dist/index.js.map +1 -0
  5. package/package.json +7 -6
  6. package/src/Elements/Accordions/Accordions.tsx +0 -63
  7. package/src/Elements/Alert/Alert.tsx +0 -31
  8. package/src/Elements/Alert/alert.scss +0 -36
  9. package/src/Elements/Button/Button.tsx +0 -55
  10. package/src/Elements/Button/IconButton.tsx +0 -42
  11. package/src/Elements/Button/button.scss +0 -97
  12. package/src/Elements/Dialog/Dialog.tsx +0 -175
  13. package/src/Elements/Helper/Collapse.tsx +0 -39
  14. package/src/Elements/Helper/NoAccessInfo.tsx +0 -195
  15. package/src/Elements/Tooltip/Tooltip.tsx +0 -116
  16. package/src/Elements/Tooltip/tooltip.scss +0 -46
  17. package/src/Elements/Wrappers/ConditionalWrapper.tsx +0 -10
  18. package/src/Elements/Wrappers/FormWrapper.tsx +0 -67
  19. package/src/Elements/Wrappers/FullPageWrapper.tsx +0 -87
  20. package/src/icons/duotone/faArrowLeftFromLine.ts +0 -17
  21. package/src/icons/duotone/faArrowRightToLine.ts +0 -17
  22. package/src/icons/duotone/faBell.ts +0 -17
  23. package/src/icons/duotone/faEye.ts +0 -17
  24. package/src/icons/duotone/faEyeSlash.ts +0 -17
  25. package/src/icons/duotone/faHouseHeart.ts +0 -17
  26. package/src/icons/duotone/faPlusCircle.ts +0 -18
  27. package/src/icons/duotone/faUser.ts +0 -18
  28. package/src/icons/duotone/index.ts +0 -19
  29. package/src/icons/light/faAngleDown.ts +0 -15
  30. package/src/icons/light/faArrowDownShortWide.ts +0 -15
  31. package/src/icons/light/faArrowDownWideShort.ts +0 -15
  32. package/src/icons/light/faArrowsToLine.ts +0 -15
  33. package/src/icons/light/faArrowsUpDown.ts +0 -15
  34. package/src/icons/light/faBell.ts +0 -15
  35. package/src/icons/light/faCheck.ts +0 -15
  36. package/src/icons/light/faClockRotateLeft.ts +0 -15
  37. package/src/icons/light/faEllipsisVertical.ts +0 -15
  38. package/src/icons/light/faXmark.ts +0 -15
  39. package/src/icons/light/index.ts +0 -23
  40. package/src/icons/regular/faArrowRightArrowLeft.ts +0 -15
  41. package/src/icons/regular/faCalendar.ts +0 -15
  42. package/src/icons/regular/faCircleCheck.ts +0 -15
  43. package/src/icons/regular/faCircleExclamation.ts +0 -15
  44. package/src/icons/regular/faCircleInfo.ts +0 -15
  45. package/src/icons/regular/faFileArrowDown.ts +0 -15
  46. package/src/icons/regular/faFilterCircleXmark.ts +0 -15
  47. package/src/icons/regular/faTriangleExclamation.ts +0 -15
  48. package/src/icons/solid/faAngleLeft.ts +0 -15
  49. package/src/icons/solid/faAngleRight.ts +0 -15
  50. package/src/icons/solid/faArrowDownWideShort.ts +0 -15
  51. package/src/icons/solid/faArrowLeft.ts +0 -15
  52. package/src/icons/solid/faEllipsisVertical.ts +0 -15
  53. package/src/icons/solid/faFilter.ts +0 -15
  54. package/src/icons/solid/faGripDotsVertical.ts +0 -15
  55. package/src/icons/solid/faListUl.ts +0 -15
  56. package/src/icons/solid/faMagnifyingGlass.ts +0 -15
  57. package/src/icons/solid/faPrint.ts +0 -15
  58. package/src/icons/solid/faRotateRight.ts +0 -15
  59. package/src/icons/solid/faXmark.ts +0 -15
  60. package/src/index.ts +0 -186
  61. package/src/styles/App.scss +0 -25
  62. package/src/styles/iui/common/_animations.scss +0 -56
  63. package/src/styles/iui/common/_typography.scss +0 -76
  64. package/src/styles/iui/common/_variables.scss +0 -56
  65. package/src/styles/iui/common/helpers/_base.scss +0 -32
  66. package/src/styles/iui/common/helpers/_color.scss +0 -7
  67. package/src/styles/iui/common/helpers/_display.scss +0 -54
  68. package/src/styles/iui/common/helpers/_size.scss +0 -17
  69. package/src/styles/iui/common/maps/_align.scss +0 -24
  70. package/src/styles/iui/common/maps/_spacing.scss +0 -78
  71. package/src/styles/iui/components/_accordions.scss +0 -47
  72. package/src/styles/iui/components/_badge.scss +0 -52
  73. package/src/styles/iui/components/_card.scss +0 -24
  74. package/src/styles/iui/components/_dialog.scss +0 -75
  75. package/src/styles/iui/components/_header.scss +0 -22
  76. package/src/styles/iui/components/_input.scss +0 -225
  77. package/src/styles/iui/components/_loader.scss +0 -93
  78. package/src/styles/iui/components/_menu.scss +0 -44
  79. package/src/styles/iui/components/_notifications.scss +0 -86
  80. package/src/styles/iui/components/_page.scss +0 -50
  81. package/src/styles/iui/components/_pagePrelogin.scss +0 -66
  82. package/src/styles/iui/components/_portal.scss +0 -8
  83. package/src/styles/iui/components/_print.scss +0 -92
  84. package/src/styles/iui/components/_scrollbar.scss +0 -18
  85. package/src/styles/iui/components/_selectInput.scss +0 -15
  86. package/src/styles/iui/components/_sidebar.scss +0 -171
  87. package/src/styles/iui/components/_smallComponents.scss +0 -24
  88. package/src/styles/iui/components/_table.scss +0 -207
  89. package/src/styles/iui/components/_tabs.scss +0 -94
  90. package/src/styles/iui.scss +0 -28
  91. package/src/styles/red-variables.scss +0 -9
  92. package/src/types/IBasic.ts +0 -31
  93. package/src/types/IError.ts +0 -4
  94. package/src/types/IHeaderAction.ts +0 -12
  95. package/src/types/ISelect.ts +0 -6
  96. package/src/types/ISidebar.ts +0 -29
  97. package/src/types/ITab.ts +0 -10
  98. package/src/types/ITable.ts +0 -210
  99. package/src/types/custom.d.ts +0 -9
  100. package/src/utils/DateUtils.ts +0 -30
  101. package/src/utils/NumberUtils.ts +0 -21
  102. package/src/utils/ObjectUtils.ts +0 -49
  103. package/src/utils/StringUtils.ts +0 -2
  104. package/src/utils/Toasts.ts +0 -6
  105. package/src/utils/icons.ts +0 -11
  106. package/src/utils/index.ts +0 -41
  107. package/tsconfig.json +0 -20
@@ -1,21 +0,0 @@
1
- // export const toNumberOrZero = (value?: string | number) => (!!value ? +value : 0);
2
-
3
- export const formatCurrency = (
4
- number?: string | number,
5
- minimumFractionDigits?: number,
6
- maximumFractionDigits?: number
7
- ) =>
8
- Number(number || 0).toLocaleString('sr-RS', {
9
- minimumFractionDigits: minimumFractionDigits || 2,
10
- maximumFractionDigits: maximumFractionDigits || 2,
11
- });
12
-
13
- export const formatCurrencyNoDecimals = (number?: string | number) =>
14
- // number?.toString().replace(',', '.') || 0;
15
- Number(number || 0).toLocaleString('sr-RS');
16
-
17
- // export const formatDecimalNumber = (number?: string | number) =>
18
- // number?.toString().replace('.', ',') || 0;
19
-
20
- // export const roundTwoDecimals = (value?: string | number) =>
21
- // !!value ? Math.round(+value * 100) / 100 : 0;
@@ -1,49 +0,0 @@
1
- import { IAnyObject } from "../types/IBasic";
2
- import { ITableColumn } from "../types/ITable";
3
-
4
- export const deleteProps = (obj: any, props: string[]) => {
5
- let newObj = { ...obj };
6
- props.forEach((e) => delete newObj[e]);
7
- return newObj;
8
- };
9
-
10
- export const deleteEmptyProps = (obj: IAnyObject) =>
11
- Object.entries(obj).reduce(
12
- (a: any, [k, v]) =>
13
- [null, undefined, ""].includes(v) ? a : ((a[k] = v), a),
14
- {}
15
- );
16
-
17
- export const deleteEmptyPropsIncludingArray = (obj: IAnyObject) =>
18
- Object.entries(obj).reduce(
19
- (a: any, [k, v]) =>
20
- [null, undefined, ""].includes(v) || (Array.isArray(v) && !v.length)
21
- ? a
22
- : ((a[k] = v), a),
23
- {}
24
- );
25
-
26
- export const getActiveFilterNumber = (obj: any) => Object.keys(obj).length;
27
-
28
- export const getPrintColumns = (tableCols: ITableColumn[]) =>
29
- tableCols.reduce(
30
- (arr: string[], col) =>
31
- col.hidden || col.unavailable ? arr : arr.concat(col.id),
32
- []
33
- );
34
-
35
- export const getVisibleColumnsIds = (
36
- tableCols: ITableColumn[],
37
- isPrint?: boolean
38
- ) =>
39
- tableCols.reduce(
40
- (arr: string[], col) =>
41
- col.hidden ||
42
- col.unavailable ||
43
- (isPrint && ["select", "icons", "actions"].includes(col.id))
44
- ? arr
45
- : arr.concat(col.id),
46
- []
47
- );
48
-
49
- export const deepCopy = (el: any[] | object) => JSON.parse(JSON.stringify(el));
@@ -1,2 +0,0 @@
1
- export const maxChar = (str = '', maxLength = 30) =>
2
- str.length > maxLength ? `${str.substring(0, maxLength)}...` : str;
@@ -1,6 +0,0 @@
1
- import { toast } from "react-toastify";
2
-
3
- export const toastSuccess = (message: string) => toast.success(message);
4
- export const toastError = (message: string) => toast.error(message, { autoClose: false });
5
- // export const toastInfo = (message: string) => toast.info(message);
6
- // export const toastWarn = (message: string) => toast.warn(message);
@@ -1,11 +0,0 @@
1
- import { faCircleCheck } from "../icons/regular/faCircleCheck";
2
- import { faCircleExclamation } from "../icons/regular/faCircleExclamation";
3
- import { faCircleInfo } from "../icons/regular/faCircleInfo";
4
- import { faTriangleExclamation } from "../icons/regular/faTriangleExclamation";
5
-
6
- export const infoIcons = {
7
- error: faCircleExclamation,
8
- success: faCircleCheck,
9
- info: faCircleInfo,
10
- warning: faTriangleExclamation,
11
- };
@@ -1,41 +0,0 @@
1
- import {
2
- checkIfExpired,
3
- dateAddDays,
4
- formatDate,
5
- formatDateAndTime,
6
- formatTime,
7
- formatYearMonth,
8
- getCurrentDateFormattedYMD,
9
- getDaysLeft,
10
- } from "./DateUtils";
11
- import { formatCurrency, formatCurrencyNoDecimals } from "./NumberUtils";
12
- import {
13
- deleteEmptyProps,
14
- deleteEmptyPropsIncludingArray,
15
- deleteProps,
16
- getActiveFilterNumber,
17
- getVisibleColumnsIds,
18
- } from "./ObjectUtils";
19
- import { maxChar } from "./StringUtils";
20
-
21
- export {
22
- checkIfExpired,
23
- dateAddDays,
24
- formatDate,
25
- formatDateAndTime,
26
- formatTime,
27
- formatYearMonth,
28
- getCurrentDateFormattedYMD,
29
- getDaysLeft,
30
- formatCurrency,
31
- formatCurrencyNoDecimals,
32
- deleteEmptyProps,
33
- deleteEmptyPropsIncludingArray,
34
- deleteProps,
35
- getActiveFilterNumber,
36
- getVisibleColumnsIds,
37
- // apiResponseHandler,
38
- // toastError,
39
- // toastSuccess,
40
- maxChar,
41
- };
package/tsconfig.json DELETED
@@ -1,20 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "esnext",
4
- "module": "esnext",
5
- "strict": true,
6
- "esModuleInterop": true,
7
- "jsx": "react-jsx",
8
- "rootDir": "src",
9
- "outDir": "dist",
10
- "sourceMap": true,
11
- "moduleResolution": "node",
12
- "forceConsistentCasingInFileNames": true,
13
- "skipLibCheck": true,
14
- "emitDeclarationOnly": true,
15
- "declaration": true,
16
- "declarationDir": "dist/types"
17
- },
18
- "include": ["src"],
19
- "exclude": ["node_modules"]
20
- }