@crystaldesign/diva-archive 24.15.0-beta.41 → 24.15.0-beta.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/build/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
2
|
import React, { useState, useMemo, createElement } from 'react';
|
|
3
3
|
import { HelpButton, getLogger, useDivaCore, useTranslation, DivaUtils, DivaError } from '@crystaldesign/diva-core';
|
|
4
|
-
import Grid from '@crystaldesign/grid';
|
|
4
|
+
import Grid, { Loading, cellStyleHelper } from '@crystaldesign/grid';
|
|
5
5
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
6
6
|
import { Typography } from '@mui/material';
|
|
7
7
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -13,7 +13,6 @@ import createStyles from '@mui/styles/createStyles';
|
|
|
13
13
|
import makeStyles from '@mui/styles/makeStyles';
|
|
14
14
|
import TableRow from '@mui/material/TableRow';
|
|
15
15
|
import TableCell from '@mui/material/TableCell';
|
|
16
|
-
import Skeleton from '@mui/material/Skeleton';
|
|
17
16
|
import { Histogram } from '@crystaldesign/analytics';
|
|
18
17
|
|
|
19
18
|
(function() {
|
|
@@ -1166,86 +1165,74 @@ function SubRow$1 (_ref) {
|
|
|
1166
1165
|
return /*#__PURE__*/jsx(Fragment, {});
|
|
1167
1166
|
}
|
|
1168
1167
|
if (loading) {
|
|
1169
|
-
return /*#__PURE__*/
|
|
1170
|
-
|
|
1171
|
-
key: "".concat(row.getRowProps().key, "-expanded-loading")
|
|
1172
|
-
}), row.cells.map(function (cell) {
|
|
1173
|
-
return /*#__PURE__*/jsx(TableCell, _objectSpread(_objectSpread({}, cell.getCellProps()), {}, {
|
|
1174
|
-
children: /*#__PURE__*/jsx(Skeleton, {})
|
|
1175
|
-
}));
|
|
1176
|
-
})), /*#__PURE__*/createElement(TableRow, _objectSpread(_objectSpread({}, row.getRowProps()), {}, {
|
|
1177
|
-
key: "".concat(row.getRowProps().key, "-expanded-loading1")
|
|
1178
|
-
}), row.cells.map(function (cell) {
|
|
1179
|
-
return /*#__PURE__*/jsx(TableCell, _objectSpread(_objectSpread({}, cell.getCellProps()), {}, {
|
|
1180
|
-
children: /*#__PURE__*/jsx(Skeleton, {})
|
|
1181
|
-
}));
|
|
1182
|
-
})), /*#__PURE__*/createElement(TableRow, _objectSpread(_objectSpread({}, row.getRowProps()), {}, {
|
|
1183
|
-
key: "".concat(row.getRowProps().key, "-expanded-loading2")
|
|
1184
|
-
}), row.cells.map(function (cell) {
|
|
1185
|
-
return /*#__PURE__*/jsx(TableCell, _objectSpread(_objectSpread({}, cell.getCellProps()), {}, {
|
|
1186
|
-
children: /*#__PURE__*/jsx(Skeleton, {})
|
|
1187
|
-
}));
|
|
1188
|
-
}))]
|
|
1168
|
+
return /*#__PURE__*/jsx(Loading, {
|
|
1169
|
+
parentRow: row
|
|
1189
1170
|
});
|
|
1190
1171
|
}
|
|
1191
1172
|
return /*#__PURE__*/jsx(Fragment, {
|
|
1192
1173
|
children: data.map(function (x, i) {
|
|
1193
1174
|
return /*#__PURE__*/createElement(TableRow, _objectSpread(_objectSpread({}, row.getRowProps()), {}, {
|
|
1175
|
+
className: "childRow",
|
|
1194
1176
|
key: "".concat(row.getRowProps().key, "-expanded-").concat(i)
|
|
1195
|
-
}),
|
|
1196
|
-
var
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
backgroundColor: 'white',
|
|
1204
|
-
zIndex: 4
|
|
1205
|
-
}
|
|
1206
|
-
}))));
|
|
1207
|
-
cells.push(/*#__PURE__*/jsx(TableCell, _objectSpread(_objectSpread({}, cell.getCellProps({
|
|
1208
|
-
style: {
|
|
1209
|
-
width: 1,
|
|
1210
|
-
padding: 0,
|
|
1211
|
-
position: 'sticky',
|
|
1212
|
-
backgroundColor: 'white',
|
|
1213
|
-
zIndex: 3,
|
|
1214
|
-
right: 242
|
|
1215
|
-
}
|
|
1216
|
-
})), {}, {
|
|
1217
|
-
children: /*#__PURE__*/jsx("div", {
|
|
1177
|
+
}), function () {
|
|
1178
|
+
var cellSettings = row.cells.flat();
|
|
1179
|
+
return cellSettings.map(function (cell, i) {
|
|
1180
|
+
var _cellSettings;
|
|
1181
|
+
var lastFlexible = ((_cellSettings = cellSettings[i + 1]) === null || _cellSettings === void 0 ? void 0 : _cellSettings.column.fixed) === true;
|
|
1182
|
+
var cells = [];
|
|
1183
|
+
if (cell.column.fixed) {
|
|
1184
|
+
cells.push(/*#__PURE__*/jsx(TableCell, _objectSpread(_objectSpread({}, cell.getCellProps({
|
|
1218
1185
|
style: {
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
boxShadow: '-1px 0px 0px 0px rgba(224, 224, 224, 1)'
|
|
1186
|
+
width: 15,
|
|
1187
|
+
minWidth: 15,
|
|
1188
|
+
padding: 0,
|
|
1189
|
+
position: 'relative',
|
|
1190
|
+
zIndex: 4
|
|
1225
1191
|
}
|
|
1226
|
-
})
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1192
|
+
})), {}, {
|
|
1193
|
+
className: "fixed"
|
|
1194
|
+
})));
|
|
1195
|
+
cells.push(/*#__PURE__*/jsx(TableCell, _objectSpread(_objectSpread({}, cell.getCellProps({
|
|
1196
|
+
style: {
|
|
1197
|
+
width: 5,
|
|
1198
|
+
minWidth: 5,
|
|
1199
|
+
padding: 0,
|
|
1200
|
+
position: 'sticky',
|
|
1201
|
+
backgroundColor: 'white',
|
|
1202
|
+
zIndex: 3,
|
|
1203
|
+
right: 247
|
|
1204
|
+
}
|
|
1205
|
+
})), {}, {
|
|
1206
|
+
children: /*#__PURE__*/jsx("div", {
|
|
1207
|
+
className: "fixed",
|
|
1208
|
+
style: {
|
|
1209
|
+
position: 'absolute',
|
|
1210
|
+
top: 0,
|
|
1211
|
+
left: 5,
|
|
1212
|
+
bottom: 0,
|
|
1213
|
+
width: 15,
|
|
1214
|
+
boxShadow: 'rgb(224, 224, 224) -2px 0px 1px 0px'
|
|
1215
|
+
}
|
|
1216
|
+
})
|
|
1217
|
+
})));
|
|
1237
1218
|
}
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
row: _objectSpread(_objectSpread({}, row), {}, {
|
|
1242
|
-
original: x,
|
|
1243
|
-
canExpand: false
|
|
1219
|
+
cells.push(/*#__PURE__*/jsx(TableCell, _objectSpread(_objectSpread({}, cell.getCellProps({
|
|
1220
|
+
style: _objectSpread(_objectSpread({}, cellStyleHelper(cell)), {}, {
|
|
1221
|
+
width: lastFlexible ? undefined : cell.column.width
|
|
1244
1222
|
})
|
|
1245
|
-
})
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1223
|
+
})), {}, {
|
|
1224
|
+
className: cell.column.fixed ? 'fixed' : '',
|
|
1225
|
+
children: cell.render('Cell', {
|
|
1226
|
+
value: cell.column.id != 'DivaNr' ? x[cell.column.id.replaceAll(/\[/g, '.').replaceAll(/\]/g, '')] : undefined,
|
|
1227
|
+
row: _objectSpread(_objectSpread({}, row), {}, {
|
|
1228
|
+
original: x,
|
|
1229
|
+
canExpand: false
|
|
1230
|
+
})
|
|
1231
|
+
})
|
|
1232
|
+
})));
|
|
1233
|
+
return cells;
|
|
1234
|
+
});
|
|
1235
|
+
}());
|
|
1249
1236
|
})
|
|
1250
1237
|
});
|
|
1251
1238
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubRow.d.ts","sourceRoot":"","sources":["../../../../../src/ui/SubRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SubRow.d.ts","sourceRoot":"","sources":["../../../../../src/ui/SubRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAA4B,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAEpE,MAAM,CAAC,OAAO,WAAW,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,GAAG,EAAE,CAAA;CAAE,qBAsFjG"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ArchiveItem, Configuration } from './types';
|
|
2
|
-
import { GridColumnActions } from '@crystaldesign/grid';
|
|
3
2
|
interface Props {
|
|
4
3
|
config: Configuration;
|
|
5
4
|
trashed: boolean;
|
|
6
5
|
showTrash: boolean;
|
|
7
6
|
setReloadPage: React.Dispatch<React.SetStateAction<number>>;
|
|
8
7
|
}
|
|
9
|
-
export default function useActions({ config, trashed, showTrash, setReloadPage }: Props):
|
|
8
|
+
export default function useActions({ config, trashed, showTrash, setReloadPage }: Props): import("@crystaldesign/grid").GridColumnAction<ArchiveItem>[];
|
|
10
9
|
export {};
|
|
11
10
|
//# sourceMappingURL=useActions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useActions.d.ts","sourceRoot":"","sources":["../../../../src/useActions.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAiB,WAAW,EAAE,aAAa,EAA0B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"useActions.d.ts","sourceRoot":"","sources":["../../../../src/useActions.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAiB,WAAW,EAAE,aAAa,EAA0B,MAAM,SAAS,CAAC;AAI5F,UAAU,KAAK;IACb,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;CAC7D;AAID,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,EAAE,KAAK,iEAmEtF"}
|
|
@@ -8,6 +8,6 @@ export default function useArchive({ config, trashed, hirarchy }: {
|
|
|
8
8
|
options: GridOptions<ArchiveItem>;
|
|
9
9
|
fetchHistory: (divaNr: string, version: string) => Promise<any>;
|
|
10
10
|
prepareRow: (row: any) => void;
|
|
11
|
-
actions: import("@crystaldesign/grid").
|
|
11
|
+
actions: import("@crystaldesign/grid").GridColumnAction<ArchiveItem>[];
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=useArchive.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-archive",
|
|
3
|
-
"version": "24.15.0-beta.
|
|
3
|
+
"version": "24.15.0-beta.43",
|
|
4
4
|
"license": "COMMERCIAL",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@testing-library/jest-dom": "^6.5.0",
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"react-dom": "^18.3.1"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@crystaldesign/grid": "24.15.0-beta.
|
|
18
|
+
"@crystaldesign/grid": "24.15.0-beta.43",
|
|
19
19
|
"flat": "^5.0.2"
|
|
20
20
|
},
|
|
21
21
|
"module": "build/esm/index.js",
|
|
22
22
|
"types": "./build/types/archive/src/index.d.ts",
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "67c3f84588d7e31a864a94c8025b8682aae40279"
|
|
24
24
|
}
|