cloudmr-ux 4.1.9 → 4.2.2
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/dist/CmrComponents/CmrCheckbox/CmrCheckbox.css +1 -1
- package/dist/CmrComponents/CmrCheckbox/CmrCheckbox.d.ts +2 -0
- package/dist/CmrComponents/CmrCheckbox/CmrCheckbox.js +4 -2
- package/dist/core/features/jobs/jobActionCreation.d.ts +1 -0
- package/dist/core/features/jobs/jobActionCreation.js +14 -28
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.Mui-checked {
|
|
18
|
-
color: #
|
|
18
|
+
color: var(--cmr-checkbox-checked-color, #580f8b) !important; /* Default #580f8b; override via checkedColor prop */
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.MuiCheckbox-root:active, .MuiCheckbox-root:focus {
|
|
@@ -9,6 +9,8 @@ interface CmrCheckboxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
9
9
|
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
10
10
|
children?: any;
|
|
11
11
|
style?: any;
|
|
12
|
+
/** Checked state color (e.g. '#580F8B'). Defaults to #580f8b when not set. */
|
|
13
|
+
checkedColor?: string;
|
|
12
14
|
}
|
|
13
15
|
export declare const CmrCheckbox: (props: CmrCheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
16
|
export {};
|
|
@@ -25,6 +25,8 @@ import { Checkbox } from '@mui/material';
|
|
|
25
25
|
import './CmrCheckbox.css';
|
|
26
26
|
import { FormControlLabel } from '@mui/material';
|
|
27
27
|
export var CmrCheckbox = function (props) {
|
|
28
|
-
var
|
|
29
|
-
|
|
28
|
+
var _a;
|
|
29
|
+
var defaultChecked = props.defaultChecked, onChange = props.onChange, children = props.children, checkedColor = props.checkedColor, rest = __rest(props, ["defaultChecked", "onChange", "children", "checkedColor"]);
|
|
30
|
+
var wrapperStyle = __assign({ display: 'contents' }, (checkedColor != null && (_a = {}, _a['--cmr-checkbox-checked-color'] = checkedColor, _a)));
|
|
31
|
+
return (_jsx("div", __assign({ className: "cmr-checkbox-wrapper", style: wrapperStyle }, { children: _jsx(FormControlLabel, { disabled: props.disabled, style: props.style, className: props.className, control: _jsx(Checkbox, { style: props.style, checked: props.checked, defaultChecked: defaultChecked, onChange: onChange }), label: _jsx("span", __assign({ className: "cmr-label", style: { paddingRight: 0, color: 'var(--bs-card-color)' } }, { children: children })), labelPlacement: "end" }) })));
|
|
30
32
|
};
|
|
@@ -34,17 +34,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
34
34
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
38
|
-
var t = {};
|
|
39
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
40
|
-
t[p] = s[p];
|
|
41
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
42
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
43
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
44
|
-
t[p[i]] = s[p[i]];
|
|
45
|
-
}
|
|
46
|
-
return t;
|
|
47
|
-
};
|
|
48
37
|
import axios from 'axios';
|
|
49
38
|
import { createAsyncThunk } from '@reduxjs/toolkit';
|
|
50
39
|
import { getFileExtension } from "../../common/utilities/SystemUtilities";
|
|
@@ -107,8 +96,7 @@ export var uploadJob = createAsyncThunk('UploadJob', function (_a, thunkAPI) {
|
|
|
107
96
|
switch (_a.label) {
|
|
108
97
|
case 0:
|
|
109
98
|
_a.trys.push([0, 2, , 7]);
|
|
110
|
-
return [4 /*yield*/,
|
|
111
|
-
// const response = await AuthenticatedHttpClient.put(partUrl, part, {
|
|
99
|
+
return [4 /*yield*/, AuthenticatedHttpClient.put(partUrl, part, {
|
|
112
100
|
headers: {
|
|
113
101
|
'Content-Type': ""
|
|
114
102
|
},
|
|
@@ -147,18 +135,18 @@ export var uploadJob = createAsyncThunk('UploadJob', function (_a, thunkAPI) {
|
|
|
147
135
|
});
|
|
148
136
|
});
|
|
149
137
|
}
|
|
150
|
-
var endpoints, FILE_CHUNK_SIZE, payload, initResponse, _b, uploadId, partUrls_1, Key, fileParts, i, part, totalSize_1, totalUploadedParts_1, uploadedParts, finalizeResponse,
|
|
151
|
-
return __generator(this, function (
|
|
152
|
-
switch (
|
|
138
|
+
var endpoints, FILE_CHUNK_SIZE, payload, initResponse, _b, uploadId, partUrls_1, Key, fileParts, i, part, totalSize_1, totalUploadedParts_1, uploadedParts, finalizeResponse, e_1;
|
|
139
|
+
return __generator(this, function (_c) {
|
|
140
|
+
switch (_c.label) {
|
|
153
141
|
case 0:
|
|
154
142
|
endpoints = getEndpoints();
|
|
155
|
-
|
|
143
|
+
_c.label = 1;
|
|
156
144
|
case 1:
|
|
157
|
-
|
|
145
|
+
_c.trys.push([1, 6, , 7]);
|
|
158
146
|
FILE_CHUNK_SIZE = 10 * 1024 * 1024;
|
|
159
147
|
return [4 /*yield*/, createPayload(uploadToken, file, fileAlias)];
|
|
160
148
|
case 2:
|
|
161
|
-
payload =
|
|
149
|
+
payload = _c.sent();
|
|
162
150
|
if (payload === undefined)
|
|
163
151
|
return [2 /*return*/, { code: 403, response: 'file not found', file: undefined, uploadTarget: uploadTarget }
|
|
164
152
|
// thunkAPI.dispatch(setupSetters.setUploadProgress({target: uploadTarget, progress: 0}));
|
|
@@ -166,7 +154,7 @@ export var uploadJob = createAsyncThunk('UploadJob', function (_a, thunkAPI) {
|
|
|
166
154
|
];
|
|
167
155
|
return [4 /*yield*/, AuthenticatedHttpClient.post(payload.destination, payload.lambdaFile, payload.config)];
|
|
168
156
|
case 3:
|
|
169
|
-
initResponse =
|
|
157
|
+
initResponse = _c.sent();
|
|
170
158
|
console.log(initResponse);
|
|
171
159
|
_b = initResponse.data, uploadId = _b.uploadId, partUrls_1 = _b.partUrls, Key = _b.Key;
|
|
172
160
|
fileParts = [];
|
|
@@ -192,23 +180,22 @@ export var uploadJob = createAsyncThunk('UploadJob', function (_a, thunkAPI) {
|
|
|
192
180
|
});
|
|
193
181
|
}); }))];
|
|
194
182
|
case 4:
|
|
195
|
-
uploadedParts =
|
|
196
|
-
return [4 /*yield*/,
|
|
183
|
+
uploadedParts = _c.sent();
|
|
184
|
+
return [4 /*yield*/, axios.post(endpoints.JOB_UPLOAD_FINALIZE, {
|
|
197
185
|
uploadId: uploadId,
|
|
198
186
|
parts: uploadedParts,
|
|
199
187
|
Key: Key
|
|
200
188
|
}, payload.config)];
|
|
201
189
|
case 5:
|
|
202
|
-
finalizeResponse =
|
|
190
|
+
finalizeResponse = _c.sent();
|
|
203
191
|
console.log(finalizeResponse);
|
|
204
192
|
console.log('all uploads completed');
|
|
205
193
|
if (onUploaded)
|
|
206
194
|
onUploaded(initResponse, file);
|
|
207
195
|
thunkAPI.dispatch(getUpstreamJobs());
|
|
208
|
-
|
|
209
|
-
return [2 /*return*/, { code: 200, response: initResponse.data.response, file: lambdaFileMeta, uploadTarget: uploadTarget }];
|
|
196
|
+
return [2 /*return*/, { code: 200, response: initResponse.data.response, file: payload.lambdaFile, uploadTarget: uploadTarget }];
|
|
210
197
|
case 6:
|
|
211
|
-
e_1 =
|
|
198
|
+
e_1 = _c.sent();
|
|
212
199
|
console.log("Following error encountered during uploading:");
|
|
213
200
|
console.error(e_1);
|
|
214
201
|
return [2 /*return*/, { code: 500, response: e_1.response, file: undefined, uploadTarget: uploadTarget }];
|
|
@@ -245,8 +232,7 @@ var createPayload = function (uploadToken, file, fileAlias) { return __awaiter(v
|
|
|
245
232
|
case 2:
|
|
246
233
|
UploadHeaders = {
|
|
247
234
|
headers: {
|
|
248
|
-
'Content-Type': 'application/json'
|
|
249
|
-
'X-Api-Key': uploadToken
|
|
235
|
+
'Content-Type': 'application/json'
|
|
250
236
|
}
|
|
251
237
|
};
|
|
252
238
|
return [2 /*return*/, { destination: endpoints.JOB_UPLOAD_INIT, lambdaFile: lambdaFile, file: file, config: UploadHeaders }];
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export { default as CmrConfirmation } from "./CmrComponents/dialogue/Confirmatio
|
|
|
11
11
|
export { default as CmrDeletionDialog } from "./CmrComponents/dialogue/DeletionDialog";
|
|
12
12
|
export { default as CmrEditConfirmation } from "./CmrComponents/dialogue/EditConfirmation";
|
|
13
13
|
export { default as CmrTabs } from "./CmrTabs/CmrTabs";
|
|
14
|
-
export { default as CmrCheckbox } from "./CmrComponents/checkbox/Checkbox";
|
|
15
14
|
export { default as CmrLabel } from "./CmrComponents/label/Label";
|
|
16
15
|
export { default as CmrButton } from "./CmrComponents/CmrButton/CmrButton";
|
|
17
16
|
export { default as CmrInputNumber } from "./CmrComponents/input-number/InputNumber";
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ export { default as CmrConfirmation } from "./CmrComponents/dialogue/Confirmatio
|
|
|
12
12
|
export { default as CmrDeletionDialog } from "./CmrComponents/dialogue/DeletionDialog";
|
|
13
13
|
export { default as CmrEditConfirmation } from "./CmrComponents/dialogue/EditConfirmation";
|
|
14
14
|
export { default as CmrTabs } from "./CmrTabs/CmrTabs";
|
|
15
|
-
export { default as CmrCheckbox } from "./CmrComponents/checkbox/Checkbox";
|
|
15
|
+
// export { default as CmrCheckbox } from "./CmrComponents/checkbox/Checkbox";
|
|
16
16
|
export { default as CmrLabel } from "./CmrComponents/label/Label";
|
|
17
17
|
export { default as CmrButton } from "./CmrComponents/CmrButton/CmrButton";
|
|
18
18
|
export { default as CmrInputNumber } from "./CmrComponents/input-number/InputNumber";
|