@codezee/sixtify-brahma 0.2.164 → 0.2.166
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/package.json +1 -1
- package/packages/shared-components/dist/AgGrid/AgGrid.d.ts.map +1 -1
- package/packages/shared-components/dist/AgGrid/AgGrid.js +4 -6
- package/packages/shared-components/dist/AgGrid/RedirectionCell/RedirectionCell.d.ts +1 -1
- package/packages/shared-components/dist/AgGrid/RedirectionCell/RedirectionCell.d.ts.map +1 -1
- package/packages/shared-components/dist/AgGrid/RedirectionCell/RedirectionCell.js +62 -18
- package/packages/shared-components/dist/AgGrid/hooks/useAgGridCheckBoxSelection.d.ts.map +1 -1
- package/packages/shared-components/dist/AgGrid/hooks/useAgGridCheckBoxSelection.js +2 -1
- package/packages/shared-components/dist/AgGrid/hooks/useAgGridKeyboardShortcuts.d.ts +3 -2
- package/packages/shared-components/dist/AgGrid/hooks/useAgGridKeyboardShortcuts.d.ts.map +1 -1
- package/packages/shared-components/dist/AgGrid/hooks/useAgGridKeyboardShortcuts.js +141 -5
- package/packages/shared-components/dist/AgGrid/hooks/useCellEnterClick.d.ts.map +1 -1
- package/packages/shared-components/dist/AgGrid/hooks/useCellEnterClick.js +13 -14
- package/packages/shared-components/dist/Breadcrumbs/Breadcrumb.styled.d.ts +6 -0
- package/packages/shared-components/dist/Breadcrumbs/Breadcrumb.styled.d.ts.map +1 -0
- package/packages/shared-components/dist/Breadcrumbs/Breadcrumb.styled.js +91 -0
- package/packages/shared-components/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/packages/shared-components/dist/Breadcrumbs/Breadcrumbs.js +12 -38
- package/packages/shared-components/dist/Card/CardItem/CardItemValue.d.ts.map +1 -1
- package/packages/shared-components/dist/Card/CardItem/CardItemValue.js +1 -1
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgGrid.d.ts","sourceRoot":"","sources":["../../src/AgGrid/AgGrid.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAIV,OAAO,EAGR,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAOjC,OAAO,yBAAyB,CAAC;AAUjC,eAAO,MAAM,iBAAiB,GAAI,KAAK,OAAO,CAAC,OAAO,CAAC,KAAG,IAczD,CAAC;AAEF,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,eAAO,MAAM,eAAe,UAAqB,CAAC;AAGlD,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,OAAO,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,KAAK,UAAU,GAAG,KAAK,CAAC,yBAAyB,CAAC,WAAW,CAAC,GAC5D,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,WAAW,CAAC,WAAW,CAAC,KAAK,GAAG,CAAC,OAAO,CAAC,CAAC;AAElE,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"AgGrid.d.ts","sourceRoot":"","sources":["../../src/AgGrid/AgGrid.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAIV,OAAO,EAGR,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAOjC,OAAO,yBAAyB,CAAC;AAUjC,eAAO,MAAM,iBAAiB,GAAI,KAAK,OAAO,CAAC,OAAO,CAAC,KAAG,IAczD,CAAC;AAEF,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,eAAO,MAAM,eAAe,UAAqB,CAAC;AAGlD,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,OAAO,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,KAAK,UAAU,GAAG,KAAK,CAAC,yBAAyB,CAAC,WAAW,CAAC,GAC5D,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,WAAW,CAAC,WAAW,CAAC,KAAK,GAAG,CAAC,OAAO,CAAC,CAAC;AAElE,eAAO,MAAM,MAAM,EAqPd,UAAU,CAAC"}
|
|
@@ -37,7 +37,7 @@ exports.AgGrid = (0, react_1.forwardRef)((props, ref) => {
|
|
|
37
37
|
const { layout } = (0, utils_1.useGetDeviceType)();
|
|
38
38
|
const { height = "597px", rowHeight = 50, rowModelType = "infinite", defaultColDef, rowBuffer = 5,
|
|
39
39
|
// eslint-disable-next-line quotes
|
|
40
|
-
overlayNoRowsTemplate = '<span class="ag-overlay-no-rows-center">No Data Found</span>', pagination = false, enableSecondRowFilter, disableKeyBoardEvent, onModelUpdated, onFirstDataRendered, onViewportChanged, onFilterChanged, paginationPageSize: paginationPageSizeProp, cacheBlockSize: cacheBlockSizeProp, infiniteInitialRowCount: infiniteInitialRowCountProp, loading: gridLoading = false, ...rest } = props;
|
|
40
|
+
overlayNoRowsTemplate = '<span class="ag-overlay-no-rows-center">No Data Found</span>', pagination = false, enableSecondRowFilter, disableKeyBoardEvent = false, onModelUpdated, onFirstDataRendered, onViewportChanged, onFilterChanged, paginationPageSize: paginationPageSizeProp, cacheBlockSize: cacheBlockSizeProp, infiniteInitialRowCount: infiniteInitialRowCountProp, loading: gridLoading = false, ...rest } = props;
|
|
41
41
|
const resolvedPaginationPageSize = paginationPageSizeProp ?? exports.defaultPageSize;
|
|
42
42
|
const cacheBlockSize = cacheBlockSizeProp ?? resolvedPaginationPageSize;
|
|
43
43
|
const infiniteInitialRowCount = infiniteInitialRowCountProp ?? resolvedPaginationPageSize;
|
|
@@ -75,7 +75,7 @@ exports.AgGrid = (0, react_1.forwardRef)((props, ref) => {
|
|
|
75
75
|
if (datasource) {
|
|
76
76
|
setTimeout(() => {
|
|
77
77
|
const displayedCount = api.getDisplayedRowCount();
|
|
78
|
-
const renderedNodes = api.getRenderedNodes().length;
|
|
78
|
+
const renderedNodes = api.getRenderedNodes().length || 0;
|
|
79
79
|
updateNoRowsOverlay(api, displayedCount === 0 && renderedNodes === 0);
|
|
80
80
|
}, 50);
|
|
81
81
|
}
|
|
@@ -83,7 +83,7 @@ exports.AgGrid = (0, react_1.forwardRef)((props, ref) => {
|
|
|
83
83
|
else {
|
|
84
84
|
setTimeout(() => {
|
|
85
85
|
const displayedCount = api.getDisplayedRowCount();
|
|
86
|
-
const renderedNodes = api.getRenderedNodes().length;
|
|
86
|
+
const renderedNodes = api.getRenderedNodes().length || 0;
|
|
87
87
|
updateNoRowsOverlay(api, displayedCount === 0 && renderedNodes === 0);
|
|
88
88
|
}, 50);
|
|
89
89
|
}
|
|
@@ -152,9 +152,7 @@ exports.AgGrid = (0, react_1.forwardRef)((props, ref) => {
|
|
|
152
152
|
suppressFloatingFilterButton: enableSecondRowFilter,
|
|
153
153
|
filterParams: {
|
|
154
154
|
...defaultColumnDef.filterParams,
|
|
155
|
-
buttons:
|
|
156
|
-
? ["apply", "reset"]
|
|
157
|
-
: [],
|
|
155
|
+
buttons: disableKeyBoardEvent ? ["apply", "reset"] : [],
|
|
158
156
|
},
|
|
159
157
|
}, rowHeight: rowHeight, rowModelType: rowModelType, rowBuffer: rowBuffer, infiniteInitialRowCount: infiniteInitialRowCount, overlayNoRowsTemplate: overlayNoRowsTemplate, loadingOverlayComponent: LoadingOverlay_1.LoadingOverlay, loading: gridLoading, noRowsOverlayComponent: NoDataOverlay_1.NoDataOverlay, suppressNoRowsOverlay: rowModelType === "infinite" || gridLoading, pagination: pagination, onModelUpdated: handleModelUpdated, onFirstDataRendered: handleFirstDataRendered, onViewportChanged: handleViewportChanged, onFilterChanged: handleFilterChanged, ...(pagination
|
|
160
158
|
? { paginationPageSize: resolvedPaginationPageSize }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedirectionCell.d.ts","sourceRoot":"","sources":["../../../src/AgGrid/RedirectionCell/RedirectionCell.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAInD,KAAK,oBAAoB,GAAG;IAC1B,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"RedirectionCell.d.ts","sourceRoot":"","sources":["../../../src/AgGrid/RedirectionCell/RedirectionCell.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAInD,KAAK,oBAAoB,GAAG;IAC1B,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAClD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,6HAY7B,oBAAoB,4CA+MtB,CAAC"}
|
|
@@ -15,10 +15,21 @@ const RedirectionCell = ({ mainLabel, onClick, includeSubLabel = false, isSubLab
|
|
|
15
15
|
const theme = (0, material_1.useTheme)();
|
|
16
16
|
const { butterflyBlue, black } = theme.palette.app.color;
|
|
17
17
|
const mainLabelRef = (0, react_1.useRef)(null);
|
|
18
|
+
const mainLabelContainerRef = (0, react_1.useRef)(null);
|
|
18
19
|
const subLabelRef = (0, react_1.useRef)(null);
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
|
|
20
|
+
const subLabelContainerRef = (0, react_1.useRef)(null);
|
|
21
|
+
const isStringSubLabel = typeof subLabel === "string" ||
|
|
22
|
+
typeof subLabel === "number" ||
|
|
23
|
+
typeof subLabel === "bigint" ||
|
|
24
|
+
typeof subLabel === "boolean" ||
|
|
25
|
+
subLabel === null ||
|
|
26
|
+
typeof subLabel === "undefined";
|
|
27
|
+
const activeRef = (0, react_1.useMemo)(() => {
|
|
28
|
+
if (includeSubLabel && isSubLabelClickable) {
|
|
29
|
+
return isStringSubLabel ? subLabelRef : subLabelContainerRef;
|
|
30
|
+
}
|
|
31
|
+
return typeof mainLabel === "string" ? mainLabelRef : mainLabelContainerRef;
|
|
32
|
+
}, [includeSubLabel, isSubLabelClickable, isStringSubLabel, mainLabel]);
|
|
22
33
|
(0, useCellEnterClick_1.useCellEnterClick)({
|
|
23
34
|
buttonRef: activeRef,
|
|
24
35
|
disabled,
|
|
@@ -28,12 +39,12 @@ const RedirectionCell = ({ mainLabel, onClick, includeSubLabel = false, isSubLab
|
|
|
28
39
|
}
|
|
29
40
|
},
|
|
30
41
|
});
|
|
31
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Box, { component: "div", sx: { width: "100%" }, children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", sx: { width: "100%" }, children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", gap: "5px", alignItems: "center", children: [includeAvatar && ((0, jsx_runtime_1.jsx)(material_1.Avatar, { src: avatar ?? "", alt: "Photo", sx: { width: 28, height: 28 } })), (0, jsx_runtime_1.jsxs)(material_1.Stack, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", sx: {
|
|
42
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Box, { component: "div", sx: { width: "100%" }, children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", sx: { width: "100%" }, children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", gap: "5px", alignItems: "center", children: [includeAvatar && ((0, jsx_runtime_1.jsx)(material_1.Avatar, { src: avatar ?? "", alt: "Photo", sx: { width: 28, height: 28 } })), (0, jsx_runtime_1.jsxs)(material_1.Stack, { children: [typeof mainLabel === "string" ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", sx: {
|
|
32
43
|
width: "100%",
|
|
33
44
|
color: disabled || isSubLabelClickable
|
|
34
45
|
? black[900]
|
|
35
46
|
: butterflyBlue[900],
|
|
36
|
-
cursor:
|
|
47
|
+
cursor: disabled || isSubLabelClickable ? "default" : "pointer",
|
|
37
48
|
}, ref: mainLabelRef, tabIndex: !disabled && !isSubLabelClickable ? 0 : -1, onKeyDown: (e) => {
|
|
38
49
|
if ((e.key === "Enter" || e.key === " ") &&
|
|
39
50
|
!disabled &&
|
|
@@ -44,32 +55,65 @@ const RedirectionCell = ({ mainLabel, onClick, includeSubLabel = false, isSubLab
|
|
|
44
55
|
}
|
|
45
56
|
}
|
|
46
57
|
}, onClick: (e) => {
|
|
47
|
-
if (!disabled &&
|
|
58
|
+
if (!disabled &&
|
|
59
|
+
!isSubLabelClickable &&
|
|
60
|
+
(0, isFunction_1.default)(onClick)) {
|
|
48
61
|
onClick(e);
|
|
49
62
|
}
|
|
50
|
-
}, children: mainLabel })
|
|
51
|
-
cursor: !disabled
|
|
63
|
+
}, children: mainLabel })) : ((0, jsx_runtime_1.jsx)(material_1.Stack, { ref: mainLabelContainerRef, tabIndex: !disabled && !isSubLabelClickable ? 0 : -1, sx: {
|
|
64
|
+
cursor: !disabled || !isSubLabelClickable ? "default" : "pointer",
|
|
52
65
|
}, onKeyDown: (e) => {
|
|
53
66
|
if ((e.key === "Enter" || e.key === " ") &&
|
|
54
67
|
!disabled &&
|
|
55
|
-
isSubLabelClickable) {
|
|
56
|
-
e.preventDefault();
|
|
68
|
+
!isSubLabelClickable) {
|
|
57
69
|
if ((0, isFunction_1.default)(onClick)) {
|
|
58
70
|
onClick(e);
|
|
59
71
|
}
|
|
60
72
|
}
|
|
61
73
|
}, onClick: (e) => {
|
|
62
74
|
if (!disabled &&
|
|
63
|
-
isSubLabelClickable &&
|
|
75
|
+
!isSubLabelClickable &&
|
|
64
76
|
(0, isFunction_1.default)(onClick)) {
|
|
65
77
|
onClick(e);
|
|
66
78
|
}
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
79
|
+
}, children: mainLabel })), includeSubLabel &&
|
|
80
|
+
(isStringSubLabel ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: !isSubLabelClickable
|
|
81
|
+
? butterflyBlue[400]
|
|
82
|
+
: butterflyBlue[900], sx: {
|
|
83
|
+
cursor: !disabled && isSubLabelClickable ? "pointer" : "default",
|
|
84
|
+
lineHeight: "18px",
|
|
85
|
+
}, tabIndex: !disabled && isSubLabelClickable ? 0 : -1, ref: subLabelRef, onKeyDown: (e) => {
|
|
86
|
+
if (!disabled && isSubLabelClickable) {
|
|
87
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
88
|
+
e.preventDefault();
|
|
89
|
+
if ((0, isFunction_1.default)(onClick)) {
|
|
90
|
+
onClick(e);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}, onClick: (e) => {
|
|
95
|
+
if (!disabled &&
|
|
96
|
+
isSubLabelClickable &&
|
|
97
|
+
(0, isFunction_1.default)(onClick)) {
|
|
98
|
+
onClick(e);
|
|
99
|
+
}
|
|
100
|
+
}, children: subLabel ?? "-" })) : ((0, jsx_runtime_1.jsx)(material_1.Stack, { ref: subLabelContainerRef, sx: {
|
|
101
|
+
cursor: !disabled && isSubLabelClickable ? "pointer" : "default",
|
|
102
|
+
}, tabIndex: !disabled && isSubLabelClickable ? 0 : -1, onKeyDown: (e) => {
|
|
103
|
+
if (!disabled && isSubLabelClickable) {
|
|
104
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
105
|
+
e.preventDefault();
|
|
106
|
+
if ((0, isFunction_1.default)(onClick)) {
|
|
107
|
+
onClick(e);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}, onClick: (e) => {
|
|
112
|
+
if (!disabled &&
|
|
113
|
+
isSubLabelClickable &&
|
|
114
|
+
(0, isFunction_1.default)(onClick)) {
|
|
115
|
+
onClick(e);
|
|
116
|
+
}
|
|
117
|
+
}, children: subLabel })))] })] }), includeIcon && icon && (0, jsx_runtime_1.jsx)(material_1.Box, { children: icon })] }) }));
|
|
74
118
|
};
|
|
75
119
|
exports.RedirectionCell = RedirectionCell;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAgGridCheckBoxSelection.d.ts","sourceRoot":"","sources":["../../../src/AgGrid/hooks/useAgGridCheckBoxSelection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI9E,KAAK,8BAA8B,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,IAAI;IAC9D,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,mBAAmB,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACxD,gBAAgB,EAAE,CAAC,EAAE,CAAC;IACtB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAsCF,eAAO,MAAM,0BAA0B,GAAI,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,uEAKlE,8BAA8B,CAAC,CAAC,CAAC;;6BAyCF,WAAW,CAAC,gBAAgB,CAAC;;;
|
|
1
|
+
{"version":3,"file":"useAgGridCheckBoxSelection.d.ts","sourceRoot":"","sources":["../../../src/AgGrid/hooks/useAgGridCheckBoxSelection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI9E,KAAK,8BAA8B,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,IAAI;IAC9D,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,mBAAmB,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACxD,gBAAgB,EAAE,CAAC,EAAE,CAAC;IACtB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAsCF,eAAO,MAAM,0BAA0B,GAAI,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,uEAKlE,8BAA8B,CAAC,CAAC,CAAC;;6BAyCF,WAAW,CAAC,gBAAgB,CAAC;;;CAyJ9D,CAAC"}
|
|
@@ -134,7 +134,8 @@ const useAgGridCheckBoxSelection = ({ gridRef, setSelectedEmployee, currentPageI
|
|
|
134
134
|
return;
|
|
135
135
|
}
|
|
136
136
|
const target = event.target;
|
|
137
|
-
if (target.classList.contains("ag-floating-filter")
|
|
137
|
+
if (target.classList.contains("ag-floating-filter") ||
|
|
138
|
+
target.classList.contains("ag-text-field-input")) {
|
|
138
139
|
return;
|
|
139
140
|
}
|
|
140
141
|
event.preventDefault();
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { AgGridReact } from "ag-grid-react";
|
|
2
|
-
import type
|
|
2
|
+
import { type RefObject } from "react";
|
|
3
3
|
type UseAgGridKeyboardShortcutsArgs<T = unknown> = {
|
|
4
4
|
gridRef: RefObject<AgGridReact<T>>;
|
|
5
|
+
isClientSide?: boolean;
|
|
5
6
|
};
|
|
6
|
-
export declare const useAgGridKeyboardShortcuts: <T = unknown>({ gridRef, }: UseAgGridKeyboardShortcutsArgs<T>) => void;
|
|
7
|
+
export declare const useAgGridKeyboardShortcuts: <T = unknown>({ gridRef, isClientSide, }: UseAgGridKeyboardShortcutsArgs<T>) => void;
|
|
7
8
|
export {};
|
|
8
9
|
//# sourceMappingURL=useAgGridKeyboardShortcuts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAgGridKeyboardShortcuts.d.ts","sourceRoot":"","sources":["../../../src/AgGrid/hooks/useAgGridKeyboardShortcuts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useAgGridKeyboardShortcuts.d.ts","sourceRoot":"","sources":["../../../src/AgGrid/hooks/useAgGridKeyboardShortcuts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlD,KAAK,8BAA8B,CAAC,CAAC,GAAG,OAAO,IAAI;IACjD,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AA0DF,eAAO,MAAM,0BAA0B,GAAI,CAAC,GAAG,OAAO,EAAE,4BAGrD,8BAA8B,CAAC,CAAC,CAAC,SA0LnC,CAAC"}
|
|
@@ -1,16 +1,68 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useAgGridKeyboardShortcuts = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
4
5
|
const utils_1 = require("../../utils");
|
|
5
|
-
const
|
|
6
|
+
const isDialogOnTop = () => {
|
|
7
|
+
const backdrop = document.querySelector(".MuiBackdrop-root:not([style*='display: none'])");
|
|
8
|
+
if (backdrop) {
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
const dialogs = document.querySelectorAll("[role='dialog'], .MuiDialog-root, .MuiModal-root");
|
|
12
|
+
if (dialogs.length === 0) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
Array.from(dialogs).forEach((dialog) => {
|
|
16
|
+
const style = window.getComputedStyle(dialog);
|
|
17
|
+
const isVisible = style.display !== "none" &&
|
|
18
|
+
style.visibility !== "hidden" &&
|
|
19
|
+
parseFloat(style.opacity) > 0;
|
|
20
|
+
if (isVisible) {
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
return false;
|
|
25
|
+
};
|
|
26
|
+
const isInputField = () => {
|
|
27
|
+
const el = document.activeElement;
|
|
28
|
+
if (!el) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
const editableTags = ["INPUT", "TEXTAREA", "SELECT"];
|
|
32
|
+
if (editableTags.includes(el.tagName)) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
if (el.classList.contains("ag-text-field-input") ||
|
|
36
|
+
el.classList.contains("ag-input-field-input")) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
return el.getAttribute("contenteditable") === "true";
|
|
40
|
+
};
|
|
41
|
+
const useAgGridKeyboardShortcuts = ({ gridRef, isClientSide = false, }) => {
|
|
42
|
+
(0, react_1.useEffect)(() => {
|
|
43
|
+
const allowInputCtrlA = (e) => {
|
|
44
|
+
const isCtrlA = e.key.toLowerCase() === "a" && (e.ctrlKey || e.metaKey);
|
|
45
|
+
if (!isCtrlA || !isInputField()) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
e.stopPropagation();
|
|
49
|
+
if (typeof e.stopImmediatePropagation === "function") {
|
|
50
|
+
e.stopImmediatePropagation();
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
window.addEventListener("keydown", allowInputCtrlA, true);
|
|
54
|
+
return () => {
|
|
55
|
+
window.removeEventListener("keydown", allowInputCtrlA, true);
|
|
56
|
+
};
|
|
57
|
+
}, []);
|
|
6
58
|
(0, utils_1.useGlobalKeyboardShortcut)({
|
|
7
59
|
key: "a",
|
|
8
60
|
modifierKeys: "ctrl",
|
|
9
61
|
onTrigger: () => {
|
|
10
|
-
|
|
62
|
+
const api = gridRef.current?.api;
|
|
63
|
+
if (!api || isDialogOnTop() || isInputField()) {
|
|
11
64
|
return;
|
|
12
65
|
}
|
|
13
|
-
const api = gridRef.current.api;
|
|
14
66
|
api.forEachNodeAfterFilterAndSort((node) => {
|
|
15
67
|
if (node.displayed && node.data) {
|
|
16
68
|
node.setSelected(true);
|
|
@@ -22,10 +74,10 @@ const useAgGridKeyboardShortcuts = ({ gridRef, }) => {
|
|
|
22
74
|
key: "a",
|
|
23
75
|
modifierKeys: "alt",
|
|
24
76
|
onTrigger: () => {
|
|
25
|
-
|
|
77
|
+
const api = gridRef.current?.api;
|
|
78
|
+
if (!api || isDialogOnTop() || isInputField()) {
|
|
26
79
|
return;
|
|
27
80
|
}
|
|
28
|
-
const api = gridRef.current.api;
|
|
29
81
|
api.forEachNodeAfterFilterAndSort((node) => {
|
|
30
82
|
if (node.displayed && node.data) {
|
|
31
83
|
node.setSelected(false);
|
|
@@ -33,5 +85,89 @@ const useAgGridKeyboardShortcuts = ({ gridRef, }) => {
|
|
|
33
85
|
});
|
|
34
86
|
},
|
|
35
87
|
});
|
|
88
|
+
// TODO: Need To Add This UseEffect To Track AgGrid Active Cell Tracking
|
|
89
|
+
(0, react_1.useEffect)(() => {
|
|
90
|
+
if (!isClientSide) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
94
|
+
const handler = (e) => {
|
|
95
|
+
if (e.code !== "Space") {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const api = gridRef.current?.api;
|
|
99
|
+
if (!api) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (isDialogOnTop() || isInputField()) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const target = e.target;
|
|
106
|
+
if (target.classList.contains("ag-floating-filter") ||
|
|
107
|
+
target.classList.contains("ag-text-field-input")) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
const headerElement = target.closest(".ag-header");
|
|
111
|
+
const isHeaderCell = target.closest(".ag-header-cell") !== null ||
|
|
112
|
+
target.classList.contains("ag-header-cell");
|
|
113
|
+
const focusedCell = api.getFocusedCell();
|
|
114
|
+
if (headerElement && isHeaderCell && !focusedCell?.rowIndex) {
|
|
115
|
+
e.preventDefault();
|
|
116
|
+
e.stopPropagation();
|
|
117
|
+
const pageSize = api.paginationGetPageSize?.();
|
|
118
|
+
const currentPage = api.paginationGetCurrentPage?.();
|
|
119
|
+
const pageStart = pageSize != null && currentPage != null
|
|
120
|
+
? pageSize * currentPage
|
|
121
|
+
: null;
|
|
122
|
+
const pageEnd = pageStart != null && pageSize != null ? pageStart + pageSize : null;
|
|
123
|
+
let selectableOnPage = 0;
|
|
124
|
+
let selectedOnPage = 0;
|
|
125
|
+
api.forEachNodeAfterFilterAndSort((node) => {
|
|
126
|
+
if (!node.displayed || !node.data || node.selectable === false) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
if (pageStart != null &&
|
|
130
|
+
pageEnd != null &&
|
|
131
|
+
((node.rowIndex ?? -1) < pageStart ||
|
|
132
|
+
(node.rowIndex ?? -1) >= pageEnd)) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
selectableOnPage++;
|
|
136
|
+
if (node.isSelected()) {
|
|
137
|
+
selectedOnPage++;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
if (selectableOnPage === 0) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const allSelected = selectedOnPage === selectableOnPage;
|
|
144
|
+
api.forEachNodeAfterFilterAndSort((node) => {
|
|
145
|
+
if (!node.displayed || !node.data || node.selectable === false) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
if (pageStart != null &&
|
|
149
|
+
pageEnd != null &&
|
|
150
|
+
((node.rowIndex ?? -1) < pageStart ||
|
|
151
|
+
(node.rowIndex ?? -1) >= pageEnd)) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
node.setSelected(!allSelected, false);
|
|
155
|
+
});
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
e.preventDefault();
|
|
159
|
+
const focused = api.getFocusedCell();
|
|
160
|
+
if (!focused) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
const rowNode = api.getDisplayedRowAtIndex(focused.rowIndex);
|
|
164
|
+
if (!rowNode) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
rowNode.setSelected(!rowNode.isSelected());
|
|
168
|
+
};
|
|
169
|
+
window.addEventListener("keydown", handler, true);
|
|
170
|
+
return () => window.removeEventListener("keydown", handler, true);
|
|
171
|
+
}, [gridRef, isClientSide]);
|
|
36
172
|
};
|
|
37
173
|
exports.useAgGridKeyboardShortcuts = useAgGridKeyboardShortcuts;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCellEnterClick.d.ts","sourceRoot":"","sources":["../../../src/AgGrid/hooks/useCellEnterClick.ts"],"names":[],"mappings":"AAEA,KAAK,qBAAqB,GAAG;IAC3B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;CAC/C,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,QAAQ,EACR,WAAW,EACX,YAAY,GACb,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"useCellEnterClick.d.ts","sourceRoot":"","sources":["../../../src/AgGrid/hooks/useCellEnterClick.ts"],"names":[],"mappings":"AAEA,KAAK,qBAAqB,GAAG;IAC3B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;CAC/C,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,QAAQ,EACR,WAAW,EACX,YAAY,GACb,EAAE,qBAAqB,QA8DvB"}
|
|
@@ -4,8 +4,13 @@ exports.useCellEnterClick = useCellEnterClick;
|
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
function useCellEnterClick({ buttonRef, disabled, popoverOpen, onPressEnter, }) {
|
|
6
6
|
(0, react_1.useEffect)(() => {
|
|
7
|
+
const button = buttonRef.current;
|
|
8
|
+
if (!button) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
7
11
|
const handleKeyDown = (event) => {
|
|
8
|
-
|
|
12
|
+
const keyIsClickTrigger = event.key === "Enter" || event.key === " ";
|
|
13
|
+
if (!keyIsClickTrigger ||
|
|
9
14
|
event.shiftKey ||
|
|
10
15
|
event.ctrlKey ||
|
|
11
16
|
event.metaKey ||
|
|
@@ -14,13 +19,12 @@ function useCellEnterClick({ buttonRef, disabled, popoverOpen, onPressEnter, })
|
|
|
14
19
|
popoverOpen) {
|
|
15
20
|
return;
|
|
16
21
|
}
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (!cell || !button || !cell.contains(button)) {
|
|
22
|
+
const focusedCell = document.querySelector(".ag-cell-focus") ??
|
|
23
|
+
event.target?.closest(".ag-cell");
|
|
24
|
+
if (!focusedCell?.contains(button)) {
|
|
21
25
|
return;
|
|
22
26
|
}
|
|
23
|
-
const isEditing =
|
|
27
|
+
const isEditing = focusedCell.classList.contains("ag-cell-inline-editing");
|
|
24
28
|
if (isEditing) {
|
|
25
29
|
return;
|
|
26
30
|
}
|
|
@@ -33,12 +37,7 @@ function useCellEnterClick({ buttonRef, disabled, popoverOpen, onPressEnter, })
|
|
|
33
37
|
button.click();
|
|
34
38
|
}
|
|
35
39
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
cell.addEventListener("keydown", handleKeyDown, true);
|
|
40
|
-
return () => cell.removeEventListener("keydown", handleKeyDown, true);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}, [buttonRef, disabled, popoverOpen]);
|
|
40
|
+
document.addEventListener("keydown", handleKeyDown, true);
|
|
41
|
+
return () => document.removeEventListener("keydown", handleKeyDown, true);
|
|
42
|
+
}, [buttonRef, disabled, popoverOpen, onPressEnter]);
|
|
44
43
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { StyledComponent } from "@emotion/styled";
|
|
2
|
+
import type { BreadcrumbsProps as MuiBreadcrumbsProps } from "@mui/material";
|
|
3
|
+
export declare const StyledBreadcrumb: StyledComponent<MuiBreadcrumbsProps>;
|
|
4
|
+
export declare const StyledBreadcrumbItem: StyledComponent<MuiBreadcrumbsProps>;
|
|
5
|
+
export declare const StyledBreadcrumbClickableItem: StyledComponent<MuiBreadcrumbsProps>;
|
|
6
|
+
//# sourceMappingURL=Breadcrumb.styled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Breadcrumb.styled.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/Breadcrumb.styled.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAG7E,eAAO,MAAM,gBAAgB,EAAE,eAAe,CAAC,mBAAmB,CAiBhE,CAAC;AAEH,eAAO,MAAM,oBAAoB,EAAE,eAAe,CAAC,mBAAmB,CA8BlE,CAAC;AAEL,eAAO,MAAM,6BAA6B,EAAE,eAAe,CAAC,mBAAmB,CA2C3E,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StyledBreadcrumbClickableItem = exports.StyledBreadcrumbItem = exports.StyledBreadcrumb = void 0;
|
|
4
|
+
const material_1 = require("@mui/material");
|
|
5
|
+
exports.StyledBreadcrumb = (0, material_1.styled)(material_1.Breadcrumbs)({
|
|
6
|
+
display: "flex",
|
|
7
|
+
flexWrap: "nowrap",
|
|
8
|
+
overflowX: "auto",
|
|
9
|
+
whiteSpace: "nowrap",
|
|
10
|
+
"& .MuiBreadcrumbs-ol": {
|
|
11
|
+
display: "flex",
|
|
12
|
+
flexWrap: "nowrap",
|
|
13
|
+
},
|
|
14
|
+
"& .MuiBreadcrumbs-li": {
|
|
15
|
+
whiteSpace: "nowrap",
|
|
16
|
+
},
|
|
17
|
+
"&::-webkit-scrollbar": {
|
|
18
|
+
display: "none",
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
exports.StyledBreadcrumbItem = (0, material_1.styled)(material_1.Breadcrumbs)(({ theme }) => {
|
|
22
|
+
const { black, butterflyBlue } = theme.palette.app.color;
|
|
23
|
+
return {
|
|
24
|
+
display: "flex",
|
|
25
|
+
alignItems: "center",
|
|
26
|
+
gap: "4px",
|
|
27
|
+
color: black[900],
|
|
28
|
+
"& .MuiTypography-root": {
|
|
29
|
+
color: black[900],
|
|
30
|
+
position: "relative",
|
|
31
|
+
display: "inline-flex",
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
"&::after": {
|
|
34
|
+
// eslint-disable-next-line quotes
|
|
35
|
+
content: '""',
|
|
36
|
+
position: "absolute",
|
|
37
|
+
left: 0,
|
|
38
|
+
bottom: -2,
|
|
39
|
+
width: "0%",
|
|
40
|
+
height: 2,
|
|
41
|
+
backgroundColor: butterflyBlue[900],
|
|
42
|
+
transition: "width 200ms ease",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
"& .MuiIconButton-root": {
|
|
46
|
+
color: butterflyBlue[900],
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
exports.StyledBreadcrumbClickableItem = (0, material_1.styled)(material_1.Breadcrumbs)(({ theme }) => {
|
|
51
|
+
const { black, butterflyBlue } = theme.palette.app.color;
|
|
52
|
+
return {
|
|
53
|
+
background: "none",
|
|
54
|
+
border: "none",
|
|
55
|
+
padding: 0,
|
|
56
|
+
cursor: "pointer",
|
|
57
|
+
display: "flex",
|
|
58
|
+
alignItems: "center",
|
|
59
|
+
transition: "color 180ms ease, filter 180ms ease",
|
|
60
|
+
color: black[900],
|
|
61
|
+
"& .MuiTypography-root": {
|
|
62
|
+
position: "relative",
|
|
63
|
+
display: "inline-flex",
|
|
64
|
+
alignItems: "center",
|
|
65
|
+
color: black[900],
|
|
66
|
+
"&::after": {
|
|
67
|
+
// eslint-disable-next-line quotes
|
|
68
|
+
content: '""',
|
|
69
|
+
position: "absolute",
|
|
70
|
+
left: 0,
|
|
71
|
+
bottom: 0,
|
|
72
|
+
width: "0%",
|
|
73
|
+
height: 2,
|
|
74
|
+
backgroundColor: butterflyBlue[900],
|
|
75
|
+
transition: "width 400ms ease",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
"& .MuiIconButton-root": {
|
|
79
|
+
transition: "color 180ms ease",
|
|
80
|
+
color: butterflyBlue[900],
|
|
81
|
+
},
|
|
82
|
+
"&:hover": {
|
|
83
|
+
"& .MuiTypography-root": {
|
|
84
|
+
color: butterflyBlue[900],
|
|
85
|
+
"&::after": {
|
|
86
|
+
width: "100%",
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO/C,KAAK,cAAc,GAAG;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,WAAW,eAAe,4CAoDrD,CAAC"}
|
|
@@ -4,46 +4,20 @@ exports.Breadcrumbs = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const material_1 = require("@mui/material");
|
|
6
6
|
const uuid_1 = require("uuid");
|
|
7
|
+
const Breadcrumb_styled_1 = require("./Breadcrumb.styled");
|
|
7
8
|
const Breadcrumbs = ({ items }) => {
|
|
8
9
|
const theme = (0, material_1.useTheme)();
|
|
9
10
|
const { butterflyBlue } = theme.palette.app.color;
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Breadcrumbs, {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
"&::-webkit-scrollbar": {
|
|
23
|
-
display: "none",
|
|
24
|
-
},
|
|
25
|
-
}, children: items.map((item) => {
|
|
26
|
-
const { icon, text, onClick } = item;
|
|
27
|
-
if (onClick) {
|
|
28
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { onClick: onClick, sx: {
|
|
29
|
-
background: "none",
|
|
30
|
-
border: "none",
|
|
31
|
-
padding: 0,
|
|
32
|
-
cursor: "pointer",
|
|
33
|
-
display: "flex",
|
|
34
|
-
alignItems: "center",
|
|
35
|
-
"&:hover": {
|
|
36
|
-
"& .MuiTypography-root": {
|
|
37
|
-
color: butterflyBlue[900],
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
}, children: [icon && ((0, jsx_runtime_1.jsx)(material_1.IconButton, { sx: {
|
|
41
|
-
color: butterflyBlue[900],
|
|
42
|
-
}, children: icon })), text && (0, jsx_runtime_1.jsx)(material_1.Typography, { children: text })] }, (0, uuid_1.v4)()));
|
|
43
|
-
}
|
|
44
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { children: [icon && ((0, jsx_runtime_1.jsx)(material_1.IconButton, { sx: {
|
|
45
|
-
color: butterflyBlue[900],
|
|
46
|
-
}, children: icon })), text && (0, jsx_runtime_1.jsx)(material_1.Typography, { children: text })] }, (0, uuid_1.v4)()));
|
|
47
|
-
}) }));
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)(Breadcrumb_styled_1.StyledBreadcrumb, { children: (0, jsx_runtime_1.jsx)(material_1.Breadcrumbs, { children: items.map((item) => {
|
|
12
|
+
const { icon, text, onClick } = item;
|
|
13
|
+
if (onClick) {
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(Breadcrumb_styled_1.StyledBreadcrumbClickableItem, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { onClick: onClick, children: [icon && ((0, jsx_runtime_1.jsx)(material_1.IconButton, { sx: {
|
|
15
|
+
color: butterflyBlue[900],
|
|
16
|
+
}, children: icon })), text && (0, jsx_runtime_1.jsx)(material_1.Typography, { children: text })] }) }, (0, uuid_1.v4)()));
|
|
17
|
+
}
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)(Breadcrumb_styled_1.StyledBreadcrumbItem, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [icon && ((0, jsx_runtime_1.jsx)(material_1.IconButton, { sx: {
|
|
19
|
+
color: butterflyBlue[900],
|
|
20
|
+
}, children: icon })), text && (0, jsx_runtime_1.jsx)(material_1.Typography, { children: text })] }) }, (0, uuid_1.v4)()));
|
|
21
|
+
}) }) }));
|
|
48
22
|
};
|
|
49
23
|
exports.Breadcrumbs = Breadcrumbs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardItemValue.d.ts","sourceRoot":"","sources":["../../../src/Card/CardItem/CardItemValue.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAIpE,KAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"CardItemValue.d.ts","sourceRoot":"","sources":["../../../src/Card/CardItem/CardItemValue.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAIpE,KAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,aAAa,gHAwFzB,CAAC"}
|
|
@@ -10,7 +10,7 @@ exports.CardItemValue = (0, react_1.forwardRef)(({ title, subTitle, avatar, load
|
|
|
10
10
|
if (loading) {
|
|
11
11
|
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "10px ", flex: "1", children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", gap: "10px", alignItems: "center", children: [avatar && ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "circular", height: "30px", animation: "wave", width: "30px" })), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 20, animation: "wave", width: "150px" })] }), subTitle && ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 20, animation: "wave", width: "200px" }))] }));
|
|
12
12
|
}
|
|
13
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { width: "50%", sx: containerSx, gap: "10px", flex: 1, children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "10px", direction: "row", alignItems: "center", flex: 1, children: [showAvatar && (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: title, src: avatar, variant: variant }), !isHideTitle && ((0, jsx_runtime_1.jsx)(material_1.Typography, { ref: ref, variant: "body1", sx: {
|
|
13
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { width: "50%", sx: containerSx, gap: "10px", flex: 1, children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "10px", direction: "row", alignItems: "center", flex: 1, children: [showAvatar && ((0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: title, src: avatar, variant: variant, sx: { width: 28, height: 28 } })), !isHideTitle && ((0, jsx_runtime_1.jsx)(material_1.Typography, { ref: ref, variant: "body1", sx: {
|
|
14
14
|
width: "100%",
|
|
15
15
|
fontWeight: 400,
|
|
16
16
|
color: slate[900],
|