@crystaldesign/diva-backoffice 25.7.0-beta.19 → 25.7.0-beta.20
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/esm/index.js
CHANGED
@@ -2027,6 +2027,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
2027
2027
|
},
|
2028
2028
|
TableClientOEOverview: {
|
2029
2029
|
type: 'Table',
|
2030
|
+
canRefresh: true,
|
2030
2031
|
title: t('backoffice.table.roe.title'),
|
2031
2032
|
columns: [{
|
2032
2033
|
title: t('backoffice.table.roe.organizationId'),
|
@@ -2150,6 +2151,27 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
2150
2151
|
"default": 30,
|
2151
2152
|
onlyAsMappingData: true
|
2152
2153
|
}
|
2154
|
+
},
|
2155
|
+
downloadAction: {
|
2156
|
+
label: t('backoffice.table.roe.downloadAction.label'),
|
2157
|
+
actionType: 'Download',
|
2158
|
+
id: 'DownloadAction',
|
2159
|
+
icon: 'DownloadOutlined',
|
2160
|
+
download: [{
|
2161
|
+
type: 'request',
|
2162
|
+
request: '${mediaService}/renderjobs/overview/datafeed?from=${from}&to=${to}',
|
2163
|
+
mapping: {
|
2164
|
+
type: 'query',
|
2165
|
+
map: [{
|
2166
|
+
sourceField: 'from',
|
2167
|
+
targetField: 'from'
|
2168
|
+
}, {
|
2169
|
+
sourceField: 'to',
|
2170
|
+
targetField: 'to'
|
2171
|
+
}]
|
2172
|
+
},
|
2173
|
+
mediaType: 'file'
|
2174
|
+
}]
|
2153
2175
|
}
|
2154
2176
|
},
|
2155
2177
|
TableAllUsers: {
|
@@ -15058,7 +15080,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
15058
15080
|
value: function () {
|
15059
15081
|
var _downloadRequest = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(download, data) {
|
15060
15082
|
var _this$_rootStore2;
|
15061
|
-
var url, result, base64File, a, mimeType, res;
|
15083
|
+
var url, result, contentType, contentDisposition, fileName, fileNameMatch, blob, base64File, a, mimeType, res;
|
15062
15084
|
return _regeneratorRuntime.wrap(function _callee5$(_context6) {
|
15063
15085
|
while (1) switch (_context6.prev = _context6.next) {
|
15064
15086
|
case 0:
|
@@ -15074,33 +15096,56 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
15074
15096
|
method: 'GET',
|
15075
15097
|
headers: {
|
15076
15098
|
authorization: "Bearer ".concat((_this$_rootStore2 = this._rootStore) === null || _this$_rootStore2 === void 0 ? void 0 : _this$_rootStore2.dataStore.jwt),
|
15077
|
-
'content-type': 'application/json'
|
15099
|
+
'content-type': 'application/json',
|
15100
|
+
Accept: 'application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, */*'
|
15078
15101
|
}
|
15079
15102
|
});
|
15080
15103
|
case 3:
|
15081
15104
|
result = _context6.sent;
|
15105
|
+
contentType = result.headers.get('Content-Type');
|
15106
|
+
contentDisposition = result.headers.get('Content-Disposition');
|
15107
|
+
fileName = 'download'; // Extract filename from Content-Disposition header if available
|
15108
|
+
if (contentDisposition) {
|
15109
|
+
fileNameMatch = contentDisposition.match(/filename="?([^"]+)"?/i);
|
15110
|
+
if (fileNameMatch && fileNameMatch[1]) {
|
15111
|
+
fileName = fileNameMatch[1];
|
15112
|
+
}
|
15113
|
+
}
|
15082
15114
|
_context6.t0 = download.mediaType;
|
15083
|
-
_context6.next = _context6.t0 === 'file' ?
|
15115
|
+
_context6.next = _context6.t0 === 'file' ? 11 : _context6.t0 === 'json' ? 27 : 32;
|
15084
15116
|
break;
|
15085
|
-
case
|
15086
|
-
|
15117
|
+
case 11:
|
15118
|
+
if (!(contentType === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' || contentType === 'application/vnd.ms-excel')) {
|
15119
|
+
_context6.next = 18;
|
15120
|
+
break;
|
15121
|
+
}
|
15122
|
+
_context6.next = 14;
|
15123
|
+
return result.blob();
|
15124
|
+
case 14:
|
15125
|
+
blob = _context6.sent;
|
15126
|
+
DownloadStore.downloadBlob(blob, fileName);
|
15127
|
+
_context6.next = 26;
|
15128
|
+
break;
|
15129
|
+
case 18:
|
15130
|
+
_context6.next = 20;
|
15087
15131
|
return result.json();
|
15088
|
-
case
|
15132
|
+
case 20:
|
15089
15133
|
base64File = _context6.sent;
|
15090
15134
|
a = document.createElement('a'); //Create <a>
|
15091
15135
|
mimeType = (data === null || data === void 0 ? void 0 : data['fileFormat']) == 'glb' ? 'model/gltf-binary' : (data === null || data === void 0 ? void 0 : data['fileFormat']) == 'jpg' ? 'image/jpeg' : 'image/png';
|
15092
15136
|
a.href = 'data:' + mimeType + ';base64,' + base64File; //Image Base64 Goes here
|
15093
15137
|
a.download = (data === null || data === void 0 ? void 0 : data['fileName']) + '.' + (data === null || data === void 0 ? void 0 : data['fileFormat']); //File name Here
|
15094
15138
|
a.click();
|
15095
|
-
|
15096
|
-
|
15097
|
-
|
15139
|
+
case 26:
|
15140
|
+
return _context6.abrupt("break", 32);
|
15141
|
+
case 27:
|
15142
|
+
_context6.next = 29;
|
15098
15143
|
return result.json();
|
15099
|
-
case
|
15144
|
+
case 29:
|
15100
15145
|
res = _context6.sent;
|
15101
15146
|
DownloadStore.downloadText('hqRenderScript_' + (data === null || data === void 0 ? void 0 : data['fileName']) + '.json', JSON.stringify(res), 'application/json');
|
15102
|
-
return _context6.abrupt("break",
|
15103
|
-
case
|
15147
|
+
return _context6.abrupt("break", 32);
|
15148
|
+
case 32:
|
15104
15149
|
case "end":
|
15105
15150
|
return _context6.stop();
|
15106
15151
|
}
|
@@ -26073,7 +26118,11 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
26073
26118
|
return state.selected.find(function (sel) {
|
26074
26119
|
return sel == dt._id;
|
26075
26120
|
});
|
26076
|
-
})
|
26121
|
+
}).length ? state.data.filter(function (dt) {
|
26122
|
+
return state.selected.find(function (sel) {
|
26123
|
+
return sel == dt._id;
|
26124
|
+
});
|
26125
|
+
}) : state.mappingData,
|
26077
26126
|
action: state.configuration.downloadAction,
|
26078
26127
|
catalogCodex: (_state$catalogItem = state.catalogItem) === null || _state$catalogItem === void 0 ? void 0 : _state$catalogItem.codex,
|
26079
26128
|
dealerId: (_state$catalogItem2 = state.catalogItem) === null || _state$catalogItem2 === void 0 ? void 0 : _state$catalogItem2.dealerId,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DownloadStore.d.ts","sourceRoot":"","sources":["../../../../../src/store/DownloadStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpH,OAAO,SAAS,MAAM,aAAa,CAAC;AAKpC,UAAU,aAAa;IACrB,IAAI,EAAE,GAAG,CAAC;IACV,MAAM,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,OAAO,aAAa;IACpB,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,SAAS;IASzC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM;IAmB5C,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,MAAqB;IAKzE,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,MAAM;IAapC,cAAc,CAAC,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAiCzG,iBAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,GAAG,UAAU;;;;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AAe,yDAAgE,aAAa,KAAG,OAAO,CAAC,IAAI,CAAC,CA8B1G;IAEI,YAAY,CAAC,KAAK,EAAE,aAAa;IAwBvC,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM;CAOzC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/Table/BaseTable/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAK5D,OAAO,EAAE,KAAK,EAAwB,MAAM,UAAU,CAAC;AA+BvD,eAAO,MAAM,UAAU,yCAAoB,CAAC;AAG5C,UAAU,KAAK,CAAC,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;CACjB;0BAEqB,CAAC,SAAS,MAAM,aAAa,KAAK,CAAC,CAAC,CAAC;;;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/Table/BaseTable/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAK5D,OAAO,EAAE,KAAK,EAAwB,MAAM,UAAU,CAAC;AA+BvD,eAAO,MAAM,UAAU,yCAAoB,CAAC;AAG5C,UAAU,KAAK,CAAC,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;CACjB;0BAEqB,CAAC,SAAS,MAAM,aAAa,KAAK,CAAC,CAAC,CAAC;;;AAyU3D,wBAAsC;AACtC,cAAc,UAAU,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@crystaldesign/diva-backoffice",
|
3
|
-
"version": "25.7.0-beta.
|
3
|
+
"version": "25.7.0-beta.20",
|
4
4
|
"license": "COMMERCIAL",
|
5
5
|
"devDependencies": {
|
6
6
|
"@testing-library/jest-dom": "^6.5.0",
|
@@ -15,13 +15,13 @@
|
|
15
15
|
"dependencies": {
|
16
16
|
"@ant-design/icons": "5.4.0",
|
17
17
|
"@babel/runtime": "7.24.7",
|
18
|
-
"@crystaldesign/content-box": "25.7.0-beta.
|
19
|
-
"@crystaldesign/content-item": "25.7.0-beta.
|
20
|
-
"@crystaldesign/diva-core": "25.7.0-beta.
|
21
|
-
"@crystaldesign/diva-utils": "25.7.0-beta.
|
22
|
-
"@crystaldesign/media-upload": "25.7.0-beta.
|
23
|
-
"@crystaldesign/rtf-editor": "25.7.0-beta.
|
24
|
-
"@crystaldesign/spreadsheet": "25.7.0-beta.
|
18
|
+
"@crystaldesign/content-box": "25.7.0-beta.20",
|
19
|
+
"@crystaldesign/content-item": "25.7.0-beta.20",
|
20
|
+
"@crystaldesign/diva-core": "25.7.0-beta.20",
|
21
|
+
"@crystaldesign/diva-utils": "25.7.0-beta.20",
|
22
|
+
"@crystaldesign/media-upload": "25.7.0-beta.20",
|
23
|
+
"@crystaldesign/rtf-editor": "25.7.0-beta.20",
|
24
|
+
"@crystaldesign/spreadsheet": "25.7.0-beta.20",
|
25
25
|
"@google/model-viewer": "3.5.0",
|
26
26
|
"ag-charts-community": "^10.1.0",
|
27
27
|
"ag-charts-react": "^10.1.0",
|
@@ -51,5 +51,5 @@
|
|
51
51
|
},
|
52
52
|
"module": "build/esm/index.js",
|
53
53
|
"types": "./build/types/backoffice/src/index.d.ts",
|
54
|
-
"gitHead": "
|
54
|
+
"gitHead": "840fed496a02c2cdde726fa0c87f52b7875e98ee"
|
55
55
|
}
|