@codezee/sixtify-brahma 0.2.41 → 0.2.43
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/Actions/DownloadIconAction.js +1 -1
- package/packages/shared-components/dist/FormFields/FileUpload/Dialogs/FilePreview.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/FileUpload/Dialogs/FilePreview.js +1 -2
- package/packages/shared-components/dist/FormFields/FileUpload/Dialogs/ViewFilePreviewDialog.d.ts +0 -1
- package/packages/shared-components/dist/FormFields/FileUpload/Dialogs/ViewFilePreviewDialog.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/FileUpload/Dialogs/ViewFilePreviewDialog.js +3 -4
- package/packages/shared-components/dist/FormFields/FileUpload/FileNames.d.ts +1 -1
- package/packages/shared-components/dist/FormFields/FileUpload/FileNames.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/FileUpload/FileNames.js +1 -3
- package/packages/shared-components/dist/Svgs/SvgDownload.js +1 -1
- package/packages/shared-components/dist/utils/index.d.ts +1 -0
- package/packages/shared-components/dist/utils/index.d.ts.map +1 -1
- package/packages/shared-components/dist/utils/index.js +1 -0
package/package.json
CHANGED
|
@@ -6,6 +6,6 @@ const material_1 = require("@mui/material");
|
|
|
6
6
|
const Svgs_1 = require("../Svgs");
|
|
7
7
|
const Tooltip_1 = require("../Tooltip");
|
|
8
8
|
const DownloadIconAction = (props) => {
|
|
9
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { toolTipLabel: "Download", children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { ...props, children: (0, jsx_runtime_1.jsx)(Svgs_1.SvgDownload, {}) }) }));
|
|
10
10
|
};
|
|
11
11
|
exports.DownloadIconAction = DownloadIconAction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilePreview.d.ts","sourceRoot":"","sources":["../../../../src/FormFields/FileUpload/Dialogs/FilePreview.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilePreview.d.ts","sourceRoot":"","sources":["../../../../src/FormFields/FileUpload/Dialogs/FilePreview.tsx"],"names":[],"mappings":"AAMA,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,uBAAuB,oCAAqC,CAAC;AAE1E,eAAO,MAAM,qBAAqB,mBAAoB,CAAC;AAEvD,eAAO,MAAM,qBAAqB,4BAA6B,CAAC;AAEhE,eAAO,MAAM,uBAAuB,4BAA6B,CAAC;AAElE,wBAAgB,UAAU,CACxB,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,SAAS,MAAM,EAAE,GAC5B,OAAO,CAET;AAED,eAAO,MAAM,WAAW,GAAI,cAAc,gBAAgB,4CA0DzD,CAAC"}
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.FilePreview = exports.SUPPORTED_EXCEL_FORMATS = exports.SUPPORTED_DOC_FORMATS = exports.SUPPORTED_PDF_FORMATS = exports.SUPPORTED_IMAGE_FORMATS = void 0;
|
|
7
7
|
exports.isFileType = isFileType;
|
|
8
8
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
-
// components/FilePreview.tsx
|
|
10
9
|
const material_1 = require("@mui/material");
|
|
11
10
|
const image_1 = __importDefault(require("next/image"));
|
|
12
11
|
const Layouts_1 = require("../../../Layouts");
|
|
@@ -25,7 +24,7 @@ const FilePreview = ({ fileName }) => {
|
|
|
25
24
|
return ((0, jsx_runtime_1.jsx)(Layouts_1.FilePreviewContainer, { children: (0, jsx_runtime_1.jsx)("iframe", { src: `${fileName}#toolbar=0`, style: { width: "100%", height: "100%" } }) }));
|
|
26
25
|
}
|
|
27
26
|
if (isFileType(fileName, exports.SUPPORTED_IMAGE_FORMATS) && isValidUrl) {
|
|
28
|
-
return ((0, jsx_runtime_1.jsx)(Layouts_1.FilePreviewContainer, {
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)(Layouts_1.FilePreviewContainer, { children: (0, jsx_runtime_1.jsx)(image_1.default, { src: fileName, alt: "Attachment", width: 800, height: 0, style: {
|
|
29
28
|
width: "100%",
|
|
30
29
|
height: "100%",
|
|
31
30
|
objectFit: "contain",
|
package/packages/shared-components/dist/FormFields/FileUpload/Dialogs/ViewFilePreviewDialog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewFilePreviewDialog.d.ts","sourceRoot":"","sources":["../../../../src/FormFields/FileUpload/Dialogs/ViewFilePreviewDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ViewFilePreviewDialog.d.ts","sourceRoot":"","sources":["../../../../src/FormFields/FileUpload/Dialogs/ViewFilePreviewDialog.tsx"],"names":[],"mappings":"AAOA,KAAK,0BAA0B,GAAG;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,8BAInC,0BAA0B,4CA6C5B,CAAC"}
|
package/packages/shared-components/dist/FormFields/FileUpload/Dialogs/ViewFilePreviewDialog.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ViewFilePreviewDialog = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const material_1 = require("@mui/material");
|
|
6
|
-
require("react-multi-carousel/lib/styles.css");
|
|
7
6
|
const Actions_1 = require("../../../Actions");
|
|
8
7
|
const Dialog_1 = require("../../../Dialog");
|
|
9
8
|
const PadBox_1 = require("../../../PadBox");
|
|
@@ -18,7 +17,7 @@ const ViewFilePreviewDialog = ({ open, onClose, fileName, }) => {
|
|
|
18
17
|
}, children: (0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { padding: "20px" }, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
19
18
|
position: "relative",
|
|
20
19
|
backgroundColor: iron[600],
|
|
21
|
-
|
|
20
|
+
overflow: "none",
|
|
22
21
|
maxHeight: "650px",
|
|
23
22
|
boxShadow: "none",
|
|
24
23
|
}, children: [(0, jsx_runtime_1.jsx)(Actions_1.DownloadIconAction
|
|
@@ -27,8 +26,8 @@ const ViewFilePreviewDialog = ({ open, onClose, fileName, }) => {
|
|
|
27
26
|
// eslint-disable-next-line sonarjs/no-misused-promises
|
|
28
27
|
onClick: () => (0, download_1.downloadFile)(fileName, fileName), sx: {
|
|
29
28
|
position: "absolute",
|
|
30
|
-
top:
|
|
31
|
-
right:
|
|
29
|
+
top: 10,
|
|
30
|
+
right: 10,
|
|
32
31
|
zIndex: 10,
|
|
33
32
|
} }), (0, jsx_runtime_1.jsx)(FilePreview_1.FilePreview, { fileName: fileName })] }) }) }) }));
|
|
34
33
|
};
|
|
@@ -3,6 +3,6 @@ type FileNamesProps = {
|
|
|
3
3
|
onDelete: (index: number) => void;
|
|
4
4
|
previewEnabled?: boolean;
|
|
5
5
|
};
|
|
6
|
-
export declare const FileNames: ({ fileNames, previewEnabled, onDelete, }: FileNamesProps) => import("react/jsx-runtime").JSX.Element
|
|
6
|
+
export declare const FileNames: ({ fileNames, previewEnabled, onDelete, }: FileNamesProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=FileNames.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileNames.d.ts","sourceRoot":"","sources":["../../../src/FormFields/FileUpload/FileNames.tsx"],"names":[],"mappings":"AAYA,KAAK,cAAc,GAAG;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,0CAIvB,cAAc,
|
|
1
|
+
{"version":3,"file":"FileNames.d.ts","sourceRoot":"","sources":["../../../src/FormFields/FileUpload/FileNames.tsx"],"names":[],"mappings":"AAYA,KAAK,cAAc,GAAG;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,0CAIvB,cAAc,4CA8EhB,CAAC"}
|
|
@@ -35,8 +35,6 @@ const FileNames = ({ fileNames, previewEnabled = false, onDelete, }) => {
|
|
|
35
35
|
const dialogRenderer = {
|
|
36
36
|
viewAttachment: selectedFile && ((0, jsx_runtime_1.jsx)(ViewFilePreviewDialog_1.ViewFilePreviewDialog, { open: openedDialog === "viewAttachment", onClose: onDialogClose, fileName: selectedFile })),
|
|
37
37
|
};
|
|
38
|
-
return names.map((name, index) => {
|
|
39
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", gap: "5x", alignItems: "center", maxWidth: "80%", children: [(0, jsx_runtime_1.jsx)(icons_material_1.AttachFile, {}), (0, jsx_runtime_1.jsx)(material_1.Typography, { maxWidth: "100%", textOverflow: "clip", children: name })] }), (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", children: [previewEnabled && ((0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => fileNames[index] && handlePreviewClick(fileNames[index]), children: (0, jsx_runtime_1.jsx)(icons_material_1.VisibilityOutlined, {}) })), (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => onDelete(index), children: (0, jsx_runtime_1.jsx)(DeleteOutlineOutlined_1.default, {}) })] }), openedDialog && dialogRenderer[openedDialog]] }, (0, uuid_1.v4)()));
|
|
40
|
-
});
|
|
38
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [names.map((name, index) => ((0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", gap: "5x", alignItems: "center", maxWidth: "80%", overflow: "hidden", children: [(0, jsx_runtime_1.jsx)(icons_material_1.AttachFile, {}), (0, jsx_runtime_1.jsx)(material_1.Typography, { maxWidth: "100%", textOverflow: "clip", children: name })] }), (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", children: [previewEnabled && ((0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => fileNames[index] && handlePreviewClick(fileNames[index]), children: (0, jsx_runtime_1.jsx)(icons_material_1.VisibilityOutlined, {}) })), (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => onDelete(index), children: (0, jsx_runtime_1.jsx)(DeleteOutlineOutlined_1.default, {}) })] })] }, (0, uuid_1.v4)()))), openedDialog && dialogRenderer[openedDialog]] }));
|
|
41
39
|
};
|
|
42
40
|
exports.FileNames = FileNames;
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SvgDownload = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const SvgDownload = (props) => {
|
|
6
|
-
return ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width:
|
|
6
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: 42, height: 42, fill: "none", ...props, style: { color: "inherit" }, children: [(0, jsx_runtime_1.jsx)("rect", { width: "42", height: "42", rx: "5", fill: "#4C5D70" }), (0, jsx_runtime_1.jsx)("path", { d: "M26.75 21.5C26.5511 21.5 26.3603 21.579 26.2197 21.7197C26.079 21.8603 26 22.0511 26 22.25V25.25C26 25.4489 25.921 25.6397 25.7803 25.7803C25.6397 25.921 25.4489 26 25.25 26H14.75C14.5511 26 14.3603 25.921 14.2197 25.7803C14.079 25.6397 14 25.4489 14 25.25V22.25C14 22.0511 13.921 21.8603 13.7803 21.7197C13.6397 21.579 13.4489 21.5 13.25 21.5C13.0511 21.5 12.8603 21.579 12.7197 21.7197C12.579 21.8603 12.5 22.0511 12.5 22.25V25.25C12.5 25.8467 12.7371 26.419 13.159 26.841C13.581 27.2629 14.1533 27.5 14.75 27.5H25.25C25.8467 27.5 26.419 27.2629 26.841 26.841C27.2629 26.419 27.5 25.8467 27.5 25.25V22.25C27.5 22.0511 27.421 21.8603 27.2803 21.7197C27.1397 21.579 26.9489 21.5 26.75 21.5ZM19.4675 22.7825C19.5388 22.8508 19.6229 22.9043 19.715 22.94C19.8048 22.9797 19.9018 23.0002 20 23.0002C20.0982 23.0002 20.1952 22.9797 20.285 22.94C20.3771 22.9043 20.4612 22.8508 20.5325 22.7825L23.5325 19.7825C23.6737 19.6413 23.7531 19.4497 23.7531 19.25C23.7531 19.0503 23.6737 18.8587 23.5325 18.7175C23.3913 18.5763 23.1997 18.4969 23 18.4969C22.8003 18.4969 22.6087 18.5763 22.4675 18.7175L20.75 20.4425V13.25C20.75 13.0511 20.671 12.8603 20.5303 12.7197C20.3897 12.579 20.1989 12.5 20 12.5C19.8011 12.5 19.6103 12.579 19.4697 12.7197C19.329 12.8603 19.25 13.0511 19.25 13.25V20.4425L17.5325 18.7175C17.4626 18.6476 17.3796 18.5921 17.2882 18.5543C17.1968 18.5164 17.0989 18.4969 17 18.4969C16.9011 18.4969 16.8032 18.5164 16.7118 18.5543C16.6204 18.5921 16.5374 18.6476 16.4675 18.7175C16.3976 18.7874 16.3421 18.8704 16.3043 18.9618C16.2664 19.0532 16.2469 19.1511 16.2469 19.25C16.2469 19.3489 16.2664 19.4468 16.3043 19.5382C16.3421 19.6296 16.3976 19.7126 16.4675 19.7825L19.4675 22.7825Z", fill: "white" })] }));
|
|
7
7
|
};
|
|
8
8
|
exports.SvgDownload = SvgDownload;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC"}
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./colorVariant"), exports);
|
|
18
18
|
__exportStar(require("./date"), exports);
|
|
19
|
+
__exportStar(require("./download"), exports);
|
|
19
20
|
__exportStar(require("./file"), exports);
|
|
20
21
|
__exportStar(require("./hooks/useDialogActions"), exports);
|
|
21
22
|
__exportStar(require("./theme/colorPaletteUI"), exports);
|