oa-componentbook 0.18.218 → 0.18.220
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/build/components/oa-component-upload/CustomUpload.js +13 -16
- package/build/components/oa-component-upload/styles.js +1 -1
- package/build/components/oa-component-viewer/CustomViewer.js +115 -106
- package/build/components/oa-component-viewer/styles.js +1 -1
- package/build/global-css/GridLayout.js +1 -1
- package/build/widgets/oa-widget-document-upload/styles.js +1 -1
- package/build/widgets/oa-widget-spare-part/SparePartsCollapseWidget.js +7 -7
- package/package.json +1 -1
|
@@ -101,29 +101,26 @@ function DocumentUpload(_ref) {
|
|
|
101
101
|
fileList: newFileList,
|
|
102
102
|
file
|
|
103
103
|
} = _ref2;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
let modifiedFile = files;
|
|
110
|
-
setLoading(true);
|
|
111
|
-
try {
|
|
104
|
+
const modifiedList = await Promise.all(newFileList.map(async files => {
|
|
105
|
+
let modifiedFile = files;
|
|
106
|
+
setLoading(true);
|
|
107
|
+
try {
|
|
108
|
+
if ((file === null || file === void 0 ? void 0 : file.uid) === (files === null || files === void 0 ? void 0 : files.uid)) {
|
|
112
109
|
await onChange(files);
|
|
113
110
|
modifiedFile.status = 'done';
|
|
114
111
|
if (!isImageFile(file === null || file === void 0 ? void 0 : file.name)) {
|
|
115
112
|
modifiedFile.url = _PdfSampleImage.default;
|
|
116
113
|
// delete modifiedFile?.type;
|
|
117
114
|
}
|
|
118
|
-
} catch (error) {
|
|
119
|
-
modifiedFile = null;
|
|
120
115
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
116
|
+
} catch (error) {
|
|
117
|
+
modifiedFile = null;
|
|
118
|
+
}
|
|
119
|
+
setLoading(false);
|
|
120
|
+
return modifiedFile;
|
|
121
|
+
}));
|
|
122
|
+
const tempList = modifiedList === null || modifiedList === void 0 ? void 0 : modifiedList.filter(Boolean);
|
|
123
|
+
setFileList(tempList);
|
|
127
124
|
};
|
|
128
125
|
const uploadButton = /*#__PURE__*/_react.default.createElement("button", {
|
|
129
126
|
style: {
|
|
@@ -9,5 +9,5 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
9
9
|
var _templateObject, _templateObject2;
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
12
|
-
const MainStyleSec = exports.MainStyleSec = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.ant-upload-list{\n display: flex !important;\n gap: 16px !important;\n flex-wrap: wrap !important;\n}\n.ant-upload-wrapper .ant-upload-list::before {\n display: none;\n}\n.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload.ant-upload-select,.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container{\n width: 96px;\n height: 96px;\n margin-block: 0;\n margin-inline: 0;\n}\n.ant-upload-select button > span.UploadImg{\n width: 24px !important;\n height: 24px;\n}\n.ant-upload-select button > span.UploadImg > img{\n width: 100% !important;\n}\n.ant-upload-list-item-container:last-child{\n margin: 0 !important;\n}\n.ant-form-item{\n margin-bottom: 0;\n}\n.ant-upload button{\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n} \n\n.uploadSecPad div{\n padding: 0 0 8px;\n}\n.anticon-upload{\n font-size: 24px;\n}\n.uploadSecPad{\n width: 100%;\n}\n.uploadSecPad div:last-child{\n padding: 0;\n}\n display: flex;\n flex-direction: column;\n gap: 24px;\n .ant-upload-list-item-done{\n border: 1px solid var(--color-divider) !important;\n }\n \n .ant-upload-list-item-actions{\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 16px;\n }\n \n.ant-upload-list-item-actions button{\n background: #212121;\n border-radius: 50px;\n height: 24px !important;\n display: flex;\n align-items: center;\n}\n.ant-btn-text:not(:disabled):not(.ant-btn-disabled):hover{\n background: #212121;\n}\n .ant-upload-list-item-actions a{\n background: #212121;\n border-radius: 50px;\n height: 24px;\n display: flex;\n }\n \n .ant-upload-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item{\n opacity: 1 !important;\n }\n \n @media only screen and (max-width: 600px) {\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container,.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload.ant-upload-select{\n width: 64px;\n height: 64px;\n }\n }\n"])));
|
|
12
|
+
const MainStyleSec = exports.MainStyleSec = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.ant-upload-list{\n display: flex !important;\n gap: 16px !important;\n flex-wrap: wrap !important;\n}\n.ant-upload-wrapper .ant-upload-list::before {\n display: none;\n}\n.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload.ant-upload-select,.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container{\n width: 96px;\n height: 96px;\n margin-block: 0;\n margin-inline: 0;\n}\n.ant-upload-select button > span.UploadImg{\n width: 24px !important;\n height: 24px;\n}\n.ant-upload-select button > span.UploadImg > img{\n width: 100% !important;\n}\n.ant-upload-list-item-container:last-child{\n margin: 0 !important;\n}\n.ant-form-item{\n margin-bottom: 0;\n}\n.ant-upload button{\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n} \n\n.uploadSecPad div{\n padding: 0 0 8px;\n}\n.anticon-upload{\n font-size: 24px;\n}\n.uploadSecPad{\n width: 100%;\n}\n.uploadSecPad div:last-child{\n padding: 0;\n}\n display: flex;\n flex-direction: column;\n gap: 24px;\n .ant-upload-list-item-done,.ant-upload-list-item-A{\n border: 1px solid var(--color-divider) !important;\n }\n \n .ant-upload-list-item-actions{\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 16px;\n }\n \n.ant-upload-list-item-actions button{\n background: #212121;\n border-radius: 50px;\n height: 24px !important;\n display: flex;\n align-items: center;\n}\n.ant-btn-text:not(:disabled):not(.ant-btn-disabled):hover{\n background: #212121;\n}\n .ant-upload-list-item-actions a{\n background: #212121;\n border-radius: 50px;\n height: 24px;\n display: flex;\n }\n \n .ant-upload-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item{\n opacity: 1 !important;\n }\n \n @media only screen and (max-width: 600px) {\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container,.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload.ant-upload-select{\n width: 64px;\n height: 64px;\n }\n }\n"])));
|
|
13
13
|
const StyledSection = exports.StyledSection = _styledComponents.default.section(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n gap: 16px;\n justify-content: space-between;\n h2{\n margin: 0;\n }\n \n @media only screen and (max-width: 600px) {\n \n .ant-upload-list-item-actions button {\n height: 16px!important;\n width: 16px !important;\n justify-content: center;\n }\n .ant-upload-list-item-actions a {\n height: 16px;\n width: 16px !important;\n align-items: center;\n justify-content: center;\n}\n .ant-upload-list-item-actions {\n gap: 8px;\n }\n .ant-upload button span + div{\n display: none;\n }\n }\n"])));
|
|
@@ -37,59 +37,135 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
37
37
|
_reactPdf.pdfjs.GlobalWorkerOptions.workerSrc = "//cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(_reactPdf.pdfjs.version, "/pdf.worker.js");
|
|
38
38
|
const supportedImage = ['png', 'jpeg', 'jpg'];
|
|
39
39
|
const supportedPdf = ['pdf'];
|
|
40
|
-
const renderContent = (format, file, url, pageNumber, onDocumentLoadSuccess
|
|
40
|
+
const renderContent = (format, file, url, pageNumber, onDocumentLoadSuccess) => {
|
|
41
41
|
if (format === 'PDF') {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}));
|
|
49
|
-
}
|
|
50
|
-
return /*#__PURE__*/_react.default.createElement(_CustomLoader.default, null);
|
|
42
|
+
return file ? /*#__PURE__*/_react.default.createElement(_reactPdf.Document, {
|
|
43
|
+
file: url,
|
|
44
|
+
onLoadSuccess: onDocumentLoadSuccess
|
|
45
|
+
}, /*#__PURE__*/_react.default.createElement(_reactPdf.Page, {
|
|
46
|
+
pageNumber: pageNumber
|
|
47
|
+
})) : /*#__PURE__*/_react.default.createElement(_CustomLoader.default, null);
|
|
51
48
|
}
|
|
52
49
|
if (format === 'IMAGE') {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}));
|
|
63
|
-
}
|
|
64
|
-
return /*#__PURE__*/_react.default.createElement(_CustomLoader.default, null);
|
|
50
|
+
return file ? /*#__PURE__*/_react.default.createElement("div", {
|
|
51
|
+
className: "overflowScroll"
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
53
|
+
alt: "example",
|
|
54
|
+
style: {
|
|
55
|
+
width: '100%'
|
|
56
|
+
},
|
|
57
|
+
src: url
|
|
58
|
+
})) : /*#__PURE__*/_react.default.createElement(_CustomLoader.default, null);
|
|
65
59
|
}
|
|
66
60
|
return /*#__PURE__*/_react.default.createElement("div", null, "Unsupported file format");
|
|
67
61
|
};
|
|
68
|
-
function
|
|
62
|
+
function Controls(_ref) {
|
|
63
|
+
let {
|
|
64
|
+
setRotationDegree,
|
|
65
|
+
pageNumber,
|
|
66
|
+
numPages,
|
|
67
|
+
setPageNumber,
|
|
68
|
+
getFileFormat,
|
|
69
|
+
handleZoomIn,
|
|
70
|
+
handleZoomOut
|
|
71
|
+
} = _ref;
|
|
72
|
+
const rotate = () => {
|
|
73
|
+
setRotationDegree(prevRotationDegree => prevRotationDegree + 90);
|
|
74
|
+
};
|
|
75
|
+
const handleKeyPress = (event, callback) => {
|
|
76
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
77
|
+
callback();
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
return /*#__PURE__*/_react.default.createElement(_styles.StyledZoom, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
81
|
+
className: "flextBodyContain"
|
|
82
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
83
|
+
role: "button",
|
|
84
|
+
tabIndex: 0,
|
|
85
|
+
onClick: handleZoomIn,
|
|
86
|
+
onKeyDown: event => handleKeyPress(event, handleZoomIn),
|
|
87
|
+
className: "iconWidthPad"
|
|
88
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
89
|
+
size: 18,
|
|
90
|
+
icon: _Add.default,
|
|
91
|
+
color: "primary"
|
|
92
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
93
|
+
role: "button",
|
|
94
|
+
tabIndex: 0,
|
|
95
|
+
onClick: handleZoomOut,
|
|
96
|
+
onKeyDown: event => handleKeyPress(event, handleZoomOut),
|
|
97
|
+
className: "iconWidthPad"
|
|
98
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
99
|
+
size: 18,
|
|
100
|
+
icon: _Remove.default,
|
|
101
|
+
color: "primary"
|
|
102
|
+
}))), getFileFormat === 'PDF' && /*#__PURE__*/_react.default.createElement("div", {
|
|
103
|
+
className: "flextBodyContain pdfFlexStyles"
|
|
104
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
105
|
+
role: "button",
|
|
106
|
+
tabIndex: 0,
|
|
107
|
+
onClick: () => setPageNumber(pageNumber - 1),
|
|
108
|
+
onKeyDown: event => handleKeyPress(event, () => setPageNumber(pageNumber - 1)),
|
|
109
|
+
className: "iconWidthPad iconWidthPadPdf"
|
|
110
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
111
|
+
size: 18,
|
|
112
|
+
icon: _ArrowBackIos.default,
|
|
113
|
+
disabled: pageNumber <= 1
|
|
114
|
+
})), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
115
|
+
className: "type-b2-400",
|
|
116
|
+
color: "primary-content"
|
|
117
|
+
}, "Page", ' ', pageNumber, ' ', "of", ' ', numPages), /*#__PURE__*/_react.default.createElement("div", {
|
|
118
|
+
role: "button",
|
|
119
|
+
tabIndex: 0,
|
|
120
|
+
onClick: () => setPageNumber(pageNumber + 1),
|
|
121
|
+
onKeyDown: event => handleKeyPress(event, () => setPageNumber(pageNumber + 1)),
|
|
122
|
+
className: "iconWidthPad iconWidthPadPdf"
|
|
123
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
124
|
+
size: 18,
|
|
125
|
+
icon: _ArrowForwardIos.default,
|
|
126
|
+
disabled: pageNumber >= numPages
|
|
127
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
128
|
+
role: "button",
|
|
129
|
+
tabIndex: 0,
|
|
130
|
+
onClick: rotate,
|
|
131
|
+
onKeyDown: event => handleKeyPress(event, rotate),
|
|
132
|
+
className: "iconWidthPad posroated"
|
|
133
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
134
|
+
size: 18,
|
|
135
|
+
icon: _Rotate90DegreesCcw.default,
|
|
136
|
+
color: "primary"
|
|
137
|
+
})));
|
|
138
|
+
}
|
|
139
|
+
Controls.propTypes = {
|
|
140
|
+
setRotationDegree: _propTypes.default.func.isRequired,
|
|
141
|
+
pageNumber: _propTypes.default.number.isRequired,
|
|
142
|
+
numPages: _propTypes.default.number.isRequired,
|
|
143
|
+
setPageNumber: _propTypes.default.func.isRequired,
|
|
144
|
+
getFileFormat: _propTypes.default.string.isRequired,
|
|
145
|
+
handleZoomIn: _propTypes.default.func.isRequired,
|
|
146
|
+
handleZoomOut: _propTypes.default.func.isRequired
|
|
147
|
+
};
|
|
148
|
+
function CustomViewer(_ref2) {
|
|
69
149
|
let {
|
|
70
150
|
downloadCallback,
|
|
71
151
|
title,
|
|
72
152
|
selectedDocumentData,
|
|
73
153
|
previewFile,
|
|
74
154
|
fileName = 'download'
|
|
75
|
-
} =
|
|
76
|
-
antDesignProps = _objectWithoutProperties(
|
|
155
|
+
} = _ref2,
|
|
156
|
+
antDesignProps = _objectWithoutProperties(_ref2, _excluded);
|
|
77
157
|
const [rotationDegree, setRotationDegree] = (0, _react.useState)(0);
|
|
78
158
|
const [numPages, setNumPages] = (0, _react.useState)(null);
|
|
79
159
|
const [pageNumber, setPageNumber] = (0, _react.useState)(1);
|
|
80
160
|
const [initialScale, setInitialScale] = (0, _react.useState)(1);
|
|
81
161
|
const [scale, setScale] = (0, _react.useState)(1);
|
|
82
|
-
const onDocumentLoadSuccess =
|
|
162
|
+
const onDocumentLoadSuccess = _ref3 => {
|
|
83
163
|
let {
|
|
84
164
|
numPages: pages
|
|
85
|
-
} =
|
|
165
|
+
} = _ref3;
|
|
86
166
|
setNumPages(pages);
|
|
87
167
|
setPageNumber(1);
|
|
88
168
|
};
|
|
89
|
-
const handlePreview = file => {
|
|
90
|
-
const url = URL.createObjectURL(file === null || file === void 0 ? void 0 : file.originFileObj);
|
|
91
|
-
return url;
|
|
92
|
-
};
|
|
93
169
|
const handleZoomIn = () => {
|
|
94
170
|
setScale(scale + 0.1);
|
|
95
171
|
};
|
|
@@ -103,13 +179,13 @@ function CustomViewer(_ref) {
|
|
|
103
179
|
return previewFile;
|
|
104
180
|
}
|
|
105
181
|
if (typeof previewFile === 'object' && previewFile) {
|
|
106
|
-
return URL.createObjectURL(previewFile
|
|
182
|
+
return URL.createObjectURL(previewFile.originFileObj);
|
|
107
183
|
}
|
|
108
184
|
return null;
|
|
109
185
|
}, [previewFile]);
|
|
110
186
|
const getFileFormat = (0, _react.useMemo)(() => {
|
|
111
|
-
var
|
|
112
|
-
const fileExtension = typeof previewFile === 'string' ? title
|
|
187
|
+
var _previewFile$type;
|
|
188
|
+
const fileExtension = typeof previewFile === 'string' ? title.split('.').pop().toLowerCase() : previewFile === null || previewFile === void 0 || (_previewFile$type = previewFile.type) === null || _previewFile$type === void 0 ? void 0 : _previewFile$type.split('/')[1];
|
|
113
189
|
if (supportedImage.includes(fileExtension)) {
|
|
114
190
|
return 'IMAGE';
|
|
115
191
|
}
|
|
@@ -126,12 +202,12 @@ function CustomViewer(_ref) {
|
|
|
126
202
|
},
|
|
127
203
|
label: 'Download'
|
|
128
204
|
}]
|
|
129
|
-
}, antDesignProps), /*#__PURE__*/_react.default.createElement(_reactZoomPanPinch.TransformWrapper, null,
|
|
205
|
+
}, antDesignProps), /*#__PURE__*/_react.default.createElement(_reactZoomPanPinch.TransformWrapper, null, _ref4 => {
|
|
130
206
|
let {
|
|
131
207
|
zoomIn,
|
|
132
208
|
zoomOut
|
|
133
|
-
} =
|
|
134
|
-
rest = _objectWithoutProperties(
|
|
209
|
+
} = _ref4,
|
|
210
|
+
rest = _objectWithoutProperties(_ref4, _excluded2);
|
|
135
211
|
return /*#__PURE__*/_react.default.createElement(_styles.PdfStyles, null, /*#__PURE__*/_react.default.createElement(Controls, {
|
|
136
212
|
setRotationDegree: setRotationDegree,
|
|
137
213
|
pageNumber: pageNumber,
|
|
@@ -144,7 +220,7 @@ function CustomViewer(_ref) {
|
|
|
144
220
|
style: {
|
|
145
221
|
transform: "rotate(".concat(rotationDegree, "deg) scale(").concat(scale, ")")
|
|
146
222
|
}
|
|
147
|
-
}, renderContent(getFileFormat, previewFile, getUrl, pageNumber, onDocumentLoadSuccess
|
|
223
|
+
}, renderContent(getFileFormat, previewFile, getUrl, pageNumber, onDocumentLoadSuccess))));
|
|
148
224
|
}));
|
|
149
225
|
}
|
|
150
226
|
CustomViewer.propTypes = {
|
|
@@ -153,7 +229,6 @@ CustomViewer.propTypes = {
|
|
|
153
229
|
fileName: _propTypes.default.string,
|
|
154
230
|
antDesignProps: _propTypes.default.object,
|
|
155
231
|
downloadCallback: _propTypes.default.func,
|
|
156
|
-
// function will be used to download the document
|
|
157
232
|
selectedDocumentData: _propTypes.default.object
|
|
158
233
|
};
|
|
159
234
|
CustomViewer.defaultProps = {
|
|
@@ -162,70 +237,4 @@ CustomViewer.defaultProps = {
|
|
|
162
237
|
downloadCallback: () => {},
|
|
163
238
|
selectedDocumentData: {}
|
|
164
239
|
};
|
|
165
|
-
var _default = exports.default = CustomViewer;
|
|
166
|
-
function Controls(_ref4) {
|
|
167
|
-
let {
|
|
168
|
-
setRotationDegree,
|
|
169
|
-
pageNumber,
|
|
170
|
-
numPages,
|
|
171
|
-
setPageNumber,
|
|
172
|
-
getFileFormat,
|
|
173
|
-
handleZoomIn,
|
|
174
|
-
handleZoomOut
|
|
175
|
-
} = _ref4;
|
|
176
|
-
const rotate = () => {
|
|
177
|
-
setRotationDegree(prevRotationDegree => prevRotationDegree + 90);
|
|
178
|
-
};
|
|
179
|
-
return /*#__PURE__*/_react.default.createElement(_styles.StyledZoom, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
180
|
-
className: "flextBodyContain"
|
|
181
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
182
|
-
className: "iconWidthPad"
|
|
183
|
-
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
184
|
-
onClick: handleZoomIn,
|
|
185
|
-
size: 18,
|
|
186
|
-
icon: _Add.default,
|
|
187
|
-
color: "primary"
|
|
188
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
189
|
-
className: "iconWidthPad"
|
|
190
|
-
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
191
|
-
onClick: handleZoomOut,
|
|
192
|
-
size: 18,
|
|
193
|
-
icon: _Remove.default,
|
|
194
|
-
color: "primary"
|
|
195
|
-
}))), getFileFormat === 'PDF' && /*#__PURE__*/_react.default.createElement("div", {
|
|
196
|
-
className: "flextBodyContain pdfFlexStyles"
|
|
197
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
198
|
-
className: "iconWidthPad iconWidthPadPdf"
|
|
199
|
-
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
200
|
-
onClick: () => setPageNumber(pageNumber - 1),
|
|
201
|
-
disabled: pageNumber <= 1,
|
|
202
|
-
size: 18,
|
|
203
|
-
icon: _ArrowBackIos.default
|
|
204
|
-
})), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
205
|
-
className: "type-b2-400",
|
|
206
|
-
color: "primary-content"
|
|
207
|
-
}, "Page", ' ', pageNumber, ' ', "of", ' ', numPages), /*#__PURE__*/_react.default.createElement("div", {
|
|
208
|
-
className: "iconWidthPad iconWidthPadPdf"
|
|
209
|
-
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
210
|
-
onClick: () => setPageNumber(pageNumber + 1),
|
|
211
|
-
disabled: pageNumber >= numPages,
|
|
212
|
-
size: 18,
|
|
213
|
-
icon: _ArrowForwardIos.default
|
|
214
|
-
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
215
|
-
className: "iconWidthPad posroated"
|
|
216
|
-
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
217
|
-
onClick: rotate,
|
|
218
|
-
size: 18,
|
|
219
|
-
icon: _Rotate90DegreesCcw.default,
|
|
220
|
-
color: "primary"
|
|
221
|
-
})));
|
|
222
|
-
}
|
|
223
|
-
Controls.propTypes = {
|
|
224
|
-
setRotationDegree: _propTypes.default.func.isRequired,
|
|
225
|
-
pageNumber: _propTypes.default.number.isRequired,
|
|
226
|
-
numPages: _propTypes.default.number.isRequired,
|
|
227
|
-
setPageNumber: _propTypes.default.func.isRequired,
|
|
228
|
-
getFileFormat: _propTypes.default.string.isRequired,
|
|
229
|
-
handleZoomIn: _propTypes.default.func.isRequired,
|
|
230
|
-
handleZoomOut: _propTypes.default.func.isRequired
|
|
231
|
-
};
|
|
240
|
+
var _default = exports.default = CustomViewer;
|
|
@@ -10,5 +10,5 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
12
12
|
const mainStyle = exports.mainStyle = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\nposition: relative;\nbackground: red;\n"])));
|
|
13
|
-
const StyledZoom = exports.StyledZoom = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n.
|
|
13
|
+
const StyledZoom = exports.StyledZoom = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n.flextBodyContain{\n position: absolute;\n right: 42px;\n bottom: 116px;\n flex-direction: column;\n z-index: 9999;\n display: flex;\n border-radius: 4px;\n overflow: hidden;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n}\n.posroated{\n position: absolute;\n right: 42px;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n top: 92px;\n z-index: 999;\n border-radius: 4px;\n}\n.iconWidthPad{\n cursor: pointer;\n background: var(--color-primary-background); \n padding: 6px;\n height: 32px;\n width: 32px;\n border-bottom: 1px solid var(--color-divider);\n}\n.iconWidthPad:last-child{\n border: none;\n}\n"])));
|
|
14
14
|
const PdfStyles = exports.PdfStyles = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\ncanvas{\n margin: 0 auto;\n}\n.react-pdf__Page{\n height: 350px;\n overflow-y: auto;\n}\n.pdfFlexStyles{\n left: 0;\n right: 0;\n bottom: 92px;\n width: fit-content;\n display: flex;\n flex-direction: row;\n align-items: center;\n background: #fff;\n margin-left: auto;\n margin-right: auto;\n padding: 8px;\n gap: 12px;\n}\n.iconWidthPadPdf {\n width: auto;\n height: auto;\n padding: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n border-bottom: none;\n}\nbutton:disabled {\n color: var(--color-disabled-button);\n cursor: not-allowed; \n }\n button{\n color: var(--color-primary-content);\n }\n@media screen and (max-width: 600px) {\n .react-pdf__Page {\n height: auto;\n overflow-y: inherit;\n\n }\n canvas {\n width: 100% !important;\n height: auto !important;\n }\n }\n"])));
|
|
@@ -21,5 +21,5 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
|
21
21
|
// TODO: Figure out a way to make this work with storybook.
|
|
22
22
|
// Can be used to wrap the entire application, to make these styles available to every component
|
|
23
23
|
|
|
24
|
-
const GridLayout = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.container {\n max-width: 1154px;\n margin: 0 auto;\n padding: 0 16px;\n}\n\n.container-fluid {\n width: 100%;\n padding: 0 16px;\n}\n\n.row {\n display: flex;\n flex-direction: column;\n}\n\n.gutter {\n padding: 0 24px 0 0;\n}\n\n.row::after {\n content: \"\";\n clear: both;\n display: table;\n}\n\n.col-xs-1 {\n width: 8.33333%;\n}\n\n.col-xs-2 {\n width: 16.66667%;\n}\n\n.col-xs-3 {\n width: 25%;\n}\n\n.col-xs-4 {\n width: 33.33333%;\n}\n\n.col-xs-5 {\n width: 41.66667%;\n}\n\n.col-xs-6 {\n width: 50%;\n}\n\n.col-xs-7 {\n width: 58.33333%;\n}\n\n.col-xs-8 {\n width: 66.66667%;\n}\n\n.col-xs-9 {\n width: 75%;\n}\n\n.col-xs-10 {\n width: 83.33333%;\n}\n\n.col-xs-11 {\n width: 91.66667%;\n}\n\n.col-xs-12 {\n width: 100%;\n}\n\n@media (min-width: 768px) {\n .row {\n flex-direction: row;\n }\n\n .col-sm-1 {\n width: 8.33333%;\n }\n\n .col-sm-2 {\n width: 16.66667%;\n }\n\n .col-sm-3 {\n width: 25%;\n }\n\n .col-sm-4 {\n width: 33.33333%;\n }\n\n .col-sm-5 {\n width: 41.66667%;\n }\n\n .col-sm-6 {\n width: 50%;\n }\n\n .col-sm-7 {\n width: 58.33333%;\n }\n\n .col-sm-8 {\n width: 66.66667%;\n }\n\n .col-sm-9 {\n width: 75%;\n }\n\n .col-sm-10 {\n width: 83.33333%;\n }\n\n .col-sm-11 {\n width: 91.66667%;\n }\n\n .col-sm-12 {\n width: 100%;\n }\n}\n\n@media (min-width: 768px) {\n .col-md-1 {\n width: 8.33333%;\n }\n\n .col-md-2 {\n width: 16.66667%;\n }\n\n .col-md-3 {\n width: 25%;\n }\n\n .col-md-4 {\n width: 33.33333%;\n float: left;\n }\n\n .col-md-5 {\n width: 41.66667%;\n }\n\n .col-md-6 {\n width: 50%;\n }\n\n .col-md-7 {\n width: 58.33333%;\n }\n\n .col-md-8 {\n width: 66.66667%;\n }\n\n .col-md-9 {\n width: 75%;\n }\n\n .col-md-10 {\n width: 83.33333%;\n }\n\n .col-md-11 {\n width: 91.66667%;\n }\n\n .col-md-12 {\n width: 100%;\n }\n}\n\n/* Large Devices (desktops) */\n@media (min-width: 992px) {\n .gutter {\n padding: 0 24px 0 0;\n }\n\n .col-lg-1 {\n width: 8.33333%;\n }\n\n .col-lg-2 {\n width: 16.66667%;\n }\n\n .col-lg-3 {\n width: 25%;\n }\n\n .col-lg-4 {\n width: 33.33333%;\n }\n\n .col-lg-5 {\n width: 41.66667%;\n }\n\n .col-lg-6 {\n width: 50%;\n }\n\n .col-lg-7 {\n width: 58.33333%;\n }\n\n .col-lg-8 {\n width: 66.66667%;\n }\n\n .col-lg-9 {\n width: 75%;\n }\n\n .col-lg-10 {\n width: 83.33333%;\n }\n\n .col-lg-11 {\n width: 91.66667%;\n }\n\n .col-lg-12 {\n width: 100%;\n }\n}\n.ant-modal .ant-modal-content {\n padding: 24px 24px 32px;\n border-radius: 12px;\n }\n .ant-select-dropdown .ant-select-item{\n min-height: auto !important;\n }\n @media (max-width: 372px) {\n .ant-picker-date-panel .ant-picker-body{\n padding: 8px !important;\n }\n }\n@media (max-width: 600px) {\n .ant-drawer .ant-drawer-header,.ant-drawer .ant-drawer-body{\n padding: 16px !important;\n }\n .ant-drawer .ant-drawer-footer {\n padding: 12px 16px;\n }\n .ant-picker-dropdown .ant-picker-date-panel{\n width: 100%;\n }\n .ant-picker-dropdown .ant-picker-time-panel-column {\n overflow-y: auto;\n}\n.ant-picker-dropdown .ant-picker-time-panel-column::-webkit-scrollbar {\n width: 2px;\n }\n\n .ant-modal-root .ant-modal-wrap {\n position: fixed;\n overflow: inherit;\n }\n .ant-modal-root .ant-modal-centered .ant-modal{\n vertical-align: middle;\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100% !important;\n max-width: 100%!important;\n // transform-origin: bottom !important;\n //animation-duration: 0s !important;\n animation-name: slideUp;\n animation-duration: 0.2s;\n transition: .3s ease-in-out;\n animation-timing-function: ease-in;\n }\n @keyframes slideUp {\n 0%,\n 50% {\n transform: translateY(100%);\n opacity: 0;\n }\n \n 60%,\n 100% {\n transform: translateY(0);\n opacity: 1;\n \n }\n }\n .ant-modal .ant-modal-content {\n bottom: -8px;\n left: 0;\n position: absolute;\n right: 0;\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n }\n .ant-modal .ant-modal-body{\n max-height: calc(90vh - 126px);\n overflow: auto;\n padding-right: 16px;\n }\n .ant-modal-footer{\n padding-right: 16px !important;\n }\n .ant-modal .ant-modal-content{\n padding: 24px 16px 32px;\n padding-right: 0;\n }\n}\n@media (min-width: 1200px) {\n .gutter {\n padding: 0 32px 0 0;\n }\n\n .col-xl-1 {\n width: 8.33333%;\n }\n \n .col-xl-2 {\n width: 16.66667%;\n }\n\n .col-xl-3 {\n width: 25%;\n }\n\n .col-xl-4 {\n width: 33.33333%;\n }\n\n .col-xl-5 {\n width: 41.66667%;\n }\n\n .col-xl-6 {\n width: 50%;\n }\n\n .col-xl-7 {\n width: 58.33333%;\n }\n\n .col-xl-8 {\n width: 66.66667%;\n }\n\n .col-xl-9 {\n width: 75%;\n }\n\n .col-xl-10 {\n width: 83.33333%;\n }\n\n .col-xl-11 {\n width: 91.66667%;\n }\n\n .col-xl-12 {\n width: 100%;\n }\n \n}\n.ant-dropdown .ant-dropdown-menu .ant-dropdown-menu-item{\n padding: 12px 24px;\n}\n.ant-dropdown-menu{\n min-width: 256px;\n top: 4px;\n}\n.ant-space-item span{\n line-height: 0 !important;\n display: flex;\n}\n\n\n.ant-select-dropdown{border-radius: 4px; padding:8px 0 !important;\n background: var(--color-primary-background) ;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);}\n\n\n\n .ant-select-dropdown .ant-select-item { \n min-height: auto;\n padding: 12px 16px;\n color: var(--color-primary-content) ;\n line-height: 20px;\n border-radius: 0px;\n}\n\n.label-date-dropdown {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n gap: 16px;\n}\n\n.ant-select-dropdown .ant-select-item-option-active span{ color: var(--color-primary) !important;}\n.ant-picker-range {opacity: 0;}\n.ant-picker-dropdown-range { padding: 0; }\n\n.fadeImg{\n position: relative;\n width: 100%;\n max-height: 300px;\n overflow-x: auto;\n}\n.overLayImg{\n background: rgb(0 0 0 / 40%);\n border-radius: 12px 12px 0px 0px;\n overflow: hidden;\n}\n.react-transform-component,.react-transform-wrapper,.react-transform-component > div{\n width: 100%;\n}\n.ascCollapse .ant-collapse-arrow{\n transform: rotate(90deg);\n color: var(--color-primary) !important;\n font-size: 14px !important;\n}\n.gappingIcons{\n display: flex;\n gap: 16px;\n}\n.overflowScroll{\n height: 350px;\n overflow-y: auto;\n}\n.ascCollapse .ant-collapse-header{\n border-radius: 4px !important;\n background: var(--color-secondary-background);\n}\n.ascCollapse,.ant-collapse{\n overflow: hidden;\n}\n.ascCollapse.ant-collapse-item-active .ant-collapse-arrow{\n transform: rotate(180deg) !important;\n}\n@media only screen and (max-width: 600px) {\n .ant-picker-dropdown .ant-picker-date-panel .ant-picker-body {\n padding: 8px;\n }\n .overflowScroll{\n height: 350px;\n overflow-y: auto;\n}\n .fadeImg{\n max-height: auto;\n }\n .ant-picker-dropdown .ant-picker-date-panel .ant-picker-content th {\n width: 24px; font-size: 12px; font-weight: bold; }\n\n .ant-picker-dropdown .ant-picker-content th {\n height: 24px;\n }\n .ant-picker-dropdown .ant-picker-content td {\n font-size: 12px;\n }\n .ant-picker-dropdown .ant-picker-date-panel .ant-picker-content {\n width: 100%;\n }\n\n}\n\n\n.ant-picker .ant-picker-clear{\n font-size: 20px;\n}\n"])));
|
|
24
|
+
const GridLayout = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.container {\n max-width: 1154px;\n margin: 0 auto;\n padding: 0 16px;\n}\n\n.container-fluid {\n width: 100%;\n padding: 0 16px;\n}\n\n.row {\n display: flex;\n flex-direction: column;\n}\n\n.gutter {\n padding: 0 24px 0 0;\n}\n\n.row::after {\n content: \"\";\n clear: both;\n display: table;\n}\n\n.col-xs-1 {\n width: 8.33333%;\n}\n\n.col-xs-2 {\n width: 16.66667%;\n}\n\n.col-xs-3 {\n width: 25%;\n}\n\n.col-xs-4 {\n width: 33.33333%;\n}\n\n.col-xs-5 {\n width: 41.66667%;\n}\n\n.col-xs-6 {\n width: 50%;\n}\n\n.col-xs-7 {\n width: 58.33333%;\n}\n\n.col-xs-8 {\n width: 66.66667%;\n}\n\n.col-xs-9 {\n width: 75%;\n}\n\n.col-xs-10 {\n width: 83.33333%;\n}\n\n.col-xs-11 {\n width: 91.66667%;\n}\n\n.col-xs-12 {\n width: 100%;\n}\n\n@media (min-width: 768px) {\n .row {\n flex-direction: row;\n }\n\n .col-sm-1 {\n width: 8.33333%;\n }\n\n .col-sm-2 {\n width: 16.66667%;\n }\n\n .col-sm-3 {\n width: 25%;\n }\n\n .col-sm-4 {\n width: 33.33333%;\n }\n\n .col-sm-5 {\n width: 41.66667%;\n }\n\n .col-sm-6 {\n width: 50%;\n }\n\n .col-sm-7 {\n width: 58.33333%;\n }\n\n .col-sm-8 {\n width: 66.66667%;\n }\n\n .col-sm-9 {\n width: 75%;\n }\n\n .col-sm-10 {\n width: 83.33333%;\n }\n\n .col-sm-11 {\n width: 91.66667%;\n }\n\n .col-sm-12 {\n width: 100%;\n }\n}\n\n@media (min-width: 768px) {\n .col-md-1 {\n width: 8.33333%;\n }\n\n .col-md-2 {\n width: 16.66667%;\n }\n\n .col-md-3 {\n width: 25%;\n }\n\n .col-md-4 {\n width: 33.33333%;\n float: left;\n }\n\n .col-md-5 {\n width: 41.66667%;\n }\n\n .col-md-6 {\n width: 50%;\n }\n\n .col-md-7 {\n width: 58.33333%;\n }\n\n .col-md-8 {\n width: 66.66667%;\n }\n\n .col-md-9 {\n width: 75%;\n }\n\n .col-md-10 {\n width: 83.33333%;\n }\n\n .col-md-11 {\n width: 91.66667%;\n }\n\n .col-md-12 {\n width: 100%;\n }\n}\n\n/* Large Devices (desktops) */\n@media (min-width: 992px) {\n .gutter {\n padding: 0 24px 0 0;\n }\n\n .col-lg-1 {\n width: 8.33333%;\n }\n\n .col-lg-2 {\n width: 16.66667%;\n }\n\n .col-lg-3 {\n width: 25%;\n }\n\n .col-lg-4 {\n width: 33.33333%;\n }\n\n .col-lg-5 {\n width: 41.66667%;\n }\n\n .col-lg-6 {\n width: 50%;\n }\n\n .col-lg-7 {\n width: 58.33333%;\n }\n\n .col-lg-8 {\n width: 66.66667%;\n }\n\n .col-lg-9 {\n width: 75%;\n }\n\n .col-lg-10 {\n width: 83.33333%;\n }\n\n .col-lg-11 {\n width: 91.66667%;\n }\n\n .col-lg-12 {\n width: 100%;\n }\n}\n.ant-modal .ant-modal-content {\n padding: 24px 24px 32px;\n border-radius: 12px;\n }\n .ant-select-dropdown .ant-select-item{\n min-height: auto !important;\n }\n @media (max-width: 372px) {\n .ant-picker-date-panel .ant-picker-body{\n padding: 8px !important;\n }\n }\n@media (max-width: 600px) {\n .ant-drawer .ant-drawer-header,.ant-drawer .ant-drawer-body{\n padding: 16px !important;\n }\n .ant-drawer .ant-drawer-footer {\n padding: 12px 16px;\n }\n .ant-picker-dropdown .ant-picker-date-panel{\n width: 100%;\n }\n .ant-picker-dropdown .ant-picker-time-panel-column {\n overflow-y: auto;\n}\n.ant-picker-dropdown .ant-picker-time-panel-column::-webkit-scrollbar {\n width: 2px;\n }\n\n .ant-modal-root .ant-modal-wrap {\n position: fixed;\n overflow: inherit;\n }\n .ant-modal-root .ant-modal-centered .ant-modal{\n vertical-align: middle;\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100% !important;\n max-width: 100%!important;\n // transform-origin: bottom !important;\n //animation-duration: 0s !important;\n animation-name: slideUp;\n animation-duration: 0.2s;\n transition: .3s ease-in-out;\n animation-timing-function: ease-in;\n }\n @keyframes slideUp {\n 0%,\n 50% {\n transform: translateY(100%);\n opacity: 0;\n }\n \n 60%,\n 100% {\n transform: translateY(0);\n opacity: 1;\n \n }\n }\n .ant-modal .ant-modal-content {\n bottom: -8px;\n left: 0;\n position: absolute;\n right: 0;\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n }\n .ant-modal .ant-modal-body{\n max-height: calc(90vh - 126px);\n overflow: auto;\n padding-right: 16px;\n }\n .ant-modal-footer{\n padding-right: 16px !important;\n }\n .ant-modal .ant-modal-content{\n padding: 24px 16px 32px;\n padding-right: 0;\n }\n}\n@media (min-width: 1200px) {\n .gutter {\n padding: 0 32px 0 0;\n }\n\n .col-xl-1 {\n width: 8.33333%;\n }\n \n .col-xl-2 {\n width: 16.66667%;\n }\n\n .col-xl-3 {\n width: 25%;\n }\n\n .col-xl-4 {\n width: 33.33333%;\n }\n\n .col-xl-5 {\n width: 41.66667%;\n }\n\n .col-xl-6 {\n width: 50%;\n }\n\n .col-xl-7 {\n width: 58.33333%;\n }\n\n .col-xl-8 {\n width: 66.66667%;\n }\n\n .col-xl-9 {\n width: 75%;\n }\n\n .col-xl-10 {\n width: 83.33333%;\n }\n\n .col-xl-11 {\n width: 91.66667%;\n }\n\n .col-xl-12 {\n width: 100%;\n }\n \n}\n.ant-dropdown .ant-dropdown-menu .ant-dropdown-menu-item{\n padding: 12px 24px;\n}\n.ant-dropdown-menu{\n min-width: 256px;\n top: 4px;\n}\n.ant-space-item span{\n line-height: 0 !important;\n display: flex;\n}\n\n\n.ant-select-dropdown{border-radius: 4px; padding:8px 0 !important;\n background: var(--color-primary-background) ;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);}\n\n\n\n .ant-select-dropdown .ant-select-item { \n min-height: auto;\n padding: 12px 16px;\n color: var(--color-primary-content) ;\n line-height: 20px;\n border-radius: 0px;\n}\n\n.label-date-dropdown {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n gap: 16px;\n}\n\n.ant-select-dropdown .ant-select-item-option-active span{ color: var(--color-primary) !important;}\n.ant-picker-range {opacity: 0;}\n.ant-picker-dropdown-range { padding: 0; }\n\n.fadeImg{\n position: relative;\n width: 100%;\n max-height: 300px;\n overflow-x: auto;\n}\n.overLayImg{\n background: rgb(0 0 0 / 40%);\n border-radius: 12px 12px 0px 0px;\n overflow: hidden;\n}\n.react-transform-component,.react-transform-wrapper,.react-transform-component > div{\n width: 100%;\n}\n.ascCollapse .ant-collapse-arrow{\n transform: rotate(90deg);\n color: var(--color-primary) !important;\n font-size: 14px !important;\n}\n.gappingIcons{\n display: flex;\n gap: 16px;\n}\n.overflowScroll{\n height: 350px;\n overflow-y: auto;\n margin: 20px 0 0;\n}\n.ascCollapse .ant-collapse-header{\n border-radius: 4px !important;\n background: var(--color-secondary-background);\n}\n.ascCollapse,.ant-collapse{\n overflow: hidden;\n}\n.ascCollapse.ant-collapse-item-active .ant-collapse-arrow{\n transform: rotate(180deg) !important;\n}\n@media only screen and (max-width: 600px) {\n .ant-picker-dropdown .ant-picker-date-panel .ant-picker-body {\n padding: 8px;\n }\n .overflowScroll{\n height: 350px;\n overflow-y: auto;\n}\n .fadeImg{\n max-height: auto;\n }\n .ant-picker-dropdown .ant-picker-date-panel .ant-picker-content th {\n width: 24px; font-size: 12px; font-weight: bold; }\n\n .ant-picker-dropdown .ant-picker-content th {\n height: 24px;\n }\n .ant-picker-dropdown .ant-picker-content td {\n font-size: 12px;\n }\n .ant-picker-dropdown .ant-picker-date-panel .ant-picker-content {\n width: 100%;\n }\n\n}\n\n\n.ant-picker .ant-picker-clear{\n font-size: 20px;\n}\n"])));
|
|
25
25
|
var _default = exports.default = GridLayout;
|
|
@@ -9,5 +9,5 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
9
9
|
var _templateObject, _templateObject2;
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
12
|
-
const MainStyleSec = exports.MainStyleSec = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.ant-form-item{\n margin-bottom: 0;\n}\n.ant-upload button{\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n} \n.uploadDiv{\n width: 96px;\n position: relative;\n}\n.uploadDiv em{\n position: absolute;\n right: -9px;\n top: -9px;\n font-style: normal;\n width: 20px;\n height: 20px;\n background: var(--color-warning);\n z-index: 9;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n color: #fff;\n font-size: 12px;\n line-height: 0;\n}\n.UploadImg img{\n height: 24px;\n width: 24px;\n\n}\n.UploadImg{\n justify-content: center;\n cursor: pointer;\n}\n.uploadSecPad div{\n padding: 0 0 8px;\n}\n.anticon-upload{\n font-size: 24px;\n}\n.uploadSecPad{\n width: 100%;\n}\n.uploadSecPad div:last-child{\n padding: 0;\n}\n display: flex;\n flex-direction: column;\n gap: 24px;\n .ant-upload-list-item-done{\n border: 1px solid var(--color-divider) !important;\n }\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item:hover::before{\n opacity: 1 !important;\n }\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item:hover::before ant-upload-list-item-actions > a\n {\n background: red !important;\n }\n .ant-upload-list-item-actions{\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 16px;\n }\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item::before{\n background: transparent;\n opacity: 1;\n }\n.ant-upload-list-item-actions button{\n background: #212121;\n border-radius: 50px;\n height: 24px !important;\n display: flex;\n align-items: center;\n}\n.ant-btn-text:not(:disabled):not(.ant-btn-disabled):hover{\n background: #212121;\n}\n .ant-upload-list-item-actions a{\n background: #212121;\n border-radius: 50px;\n height: 24px;\n display: flex;\n }\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-actions,.ant-upload-wrapper .ant-upload-list .ant-upload-list-item .ant-upload-list-item-actions .ant-upload-list-item-action {\n opacity: 1;\n }\n .ant-upload-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item{\n opacity: 1 !important;\n }\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye,.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete{\n color: #fff;\n }\n @media only screen and (max-width: 600px) {\n .uploadDiv {\n width: 64px;\n }\n .uploadDiv em{\n width: 16px;\n height: 16px;\n }\n }\n"])));
|
|
12
|
+
const MainStyleSec = exports.MainStyleSec = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.ant-form-item{\n margin-bottom: 0;\n}\n.ant-upload button{\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n} \n.uploadDiv{\n width: 96px;\n position: relative;\n}\n.uploadDiv em{\n position: absolute;\n right: -9px;\n top: -9px;\n font-style: normal;\n width: 20px;\n height: 20px;\n background: var(--color-warning);\n z-index: 9;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n color: #fff;\n font-size: 12px;\n line-height: 0;\n}\n.UploadImg img{\n height: 24px;\n width: 24px;\n\n}\n.UploadImg{\n justify-content: center;\n cursor: pointer;\n}\n.uploadSecPad div{\n padding: 0 0 8px;\n}\n.anticon-upload{\n font-size: 24px;\n}\n.uploadSecPad{\n width: 100%;\n}\n.uploadSecPad div:last-child{\n padding: 0;\n}\n display: flex;\n flex-direction: column;\n gap: 24px;\n .ant-upload-list-item-done,.ant-upload-list-item-A{\n border: 1px solid var(--color-divider) !important;\n }\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item:hover::before{\n opacity: 1 !important;\n }\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item:hover::before ant-upload-list-item-actions > a\n {\n background: red !important;\n }\n .ant-upload-list-item-actions{\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 16px;\n }\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item::before{\n background: transparent;\n opacity: 1;\n }\n.ant-upload-list-item-actions button{\n background: #212121;\n border-radius: 50px;\n height: 24px !important;\n display: flex;\n align-items: center;\n}\n.ant-btn-text:not(:disabled):not(.ant-btn-disabled):hover{\n background: #212121;\n}\n .ant-upload-list-item-actions a{\n background: #212121;\n border-radius: 50px;\n height: 24px;\n display: flex;\n }\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-actions,.ant-upload-wrapper .ant-upload-list .ant-upload-list-item .ant-upload-list-item-actions .ant-upload-list-item-action {\n opacity: 1;\n }\n .ant-upload-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item{\n opacity: 1 !important;\n }\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye,.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete{\n color: #fff;\n }\n @media only screen and (max-width: 600px) {\n .uploadDiv {\n width: 64px;\n }\n .uploadDiv em{\n width: 16px;\n height: 16px;\n }\n }\n"])));
|
|
13
13
|
const StyledSection = exports.StyledSection = _styledComponents.default.section(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n gap: 16px;\n justify-content: space-between;\n h2{\n margin: 0;\n }\n .ant-upload-select, .ant-upload-wrapper, .ant-upload-wrapper, .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container{\n width: 96px;\n height: 96px;\n margin: 0;\n }\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload.ant-upload-select{\n width: 96px !important;\n height: 96px !important;\n margin: 0;\n }\n @media only screen and (max-width: 600px) {\n .ant-upload-select, .ant-upload-wrapper, .ant-upload-wrapper, .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container{\n width: 64px;\n height: 64px;\n }\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload.ant-upload-select{\n width: 64px !important;\n height: 64px !important;\n }\n .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye,.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete{\n font-size:12px;\n margin: 0 !important;\n padding: 0 !important;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .ant-upload-list-item-actions button {\n height: 16px!important;\n width: 16px !important;\n justify-content: center;\n }\n .ant-upload-list-item-actions a {\n height: 16px;\n width: 16px !important;\n align-items: center;\n justify-content: center;\n}\n .ant-upload-list-item-actions {\n gap: 8px;\n }\n .ant-upload button span + div{\n display: none;\n }\n }\n"])));
|
|
@@ -7,12 +7,9 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _antd = require("antd");
|
|
10
|
-
var _icons = require("@ant-design/icons");
|
|
11
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
12
11
|
var _DeleteForever = _interopRequireDefault(require("@material-ui/icons/DeleteForever"));
|
|
13
|
-
var _Edit = _interopRequireDefault(require("@material-ui/icons/Edit"));
|
|
14
12
|
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
15
|
-
var _CustomInfo = _interopRequireDefault(require("../../components/oa-component-info/CustomInfo"));
|
|
16
13
|
var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
|
|
17
14
|
var _templateObject;
|
|
18
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -29,7 +26,7 @@ function SparePartsCollapseWidget(_ref) {
|
|
|
29
26
|
data,
|
|
30
27
|
onDelete
|
|
31
28
|
} = _ref;
|
|
32
|
-
const generateItemRows = (items, panelKey) => items.map(
|
|
29
|
+
const generateItemRows = (items, panelKey) => items.map(item => /*#__PURE__*/_react.default.createElement("div", {
|
|
33
30
|
key: item.id,
|
|
34
31
|
style: {
|
|
35
32
|
display: 'flex',
|
|
@@ -64,10 +61,10 @@ function SparePartsCollapseWidget(_ref) {
|
|
|
64
61
|
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
65
62
|
className: "type-b2-400",
|
|
66
63
|
color: "secondary-content"
|
|
67
|
-
}
|
|
64
|
+
}, panel.subTitle))),
|
|
68
65
|
key: panel.id,
|
|
69
66
|
className: "ascCollapse",
|
|
70
|
-
extra: /*#__PURE__*/_react.default.createElement("div", {
|
|
67
|
+
extra: onDelete && /*#__PURE__*/_react.default.createElement("div", {
|
|
71
68
|
onClick: e => e.stopPropagation(),
|
|
72
69
|
onKeyDown: e => handleKeyDown(e, index),
|
|
73
70
|
role: "button",
|
|
@@ -83,6 +80,9 @@ function SparePartsCollapseWidget(_ref) {
|
|
|
83
80
|
}
|
|
84
81
|
SparePartsCollapseWidget.propTypes = {
|
|
85
82
|
data: _propTypes.default.array.isRequired,
|
|
86
|
-
onDelete: _propTypes.default.func
|
|
83
|
+
onDelete: _propTypes.default.func
|
|
84
|
+
};
|
|
85
|
+
SparePartsCollapseWidget.defaultProps = {
|
|
86
|
+
onDelete: null
|
|
87
87
|
};
|
|
88
88
|
var _default = exports.default = SparePartsCollapseWidget;
|