Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6ae86220e | ||
|
|
3397bd419d | ||
|
|
2dd11ad24c | ||
|
|
1099be87fa | ||
|
|
13c5b9613d | ||
|
|
32890ba3db | ||
|
|
8f7465dd8d | ||
|
|
be710cb17b | ||
|
|
2729321f40 | ||
|
|
2710d4629f | ||
|
|
8c093a4692 | ||
|
|
ec822b843b | ||
|
|
5dc8bb49a4 | ||
|
|
0d98553a71 | ||
|
|
6513a294b3 |
@@ -33,27 +33,34 @@ class DataTable extends React.PureComponent {
|
||||
};
|
||||
|
||||
const renderMeasurementData = (dimIndex, atEvery) => {
|
||||
const injectSeparatorsArray = injectSeparators(
|
||||
matrix[dimIndex],
|
||||
columnSeparatorWidth,
|
||||
atEvery
|
||||
);
|
||||
|
||||
if (dimension2.length <= 0) {
|
||||
return injectSeparatorsArray;
|
||||
return injectSeparators(
|
||||
matrix[dimIndex],
|
||||
columnSeparatorWidth,
|
||||
atEvery
|
||||
);
|
||||
}
|
||||
|
||||
const measurementDataRow = [];
|
||||
let index = 0,
|
||||
match;
|
||||
dimension2.forEach((dim2) => {
|
||||
dimension2.forEach(dim2 => {
|
||||
measurements.forEach((measure, mesInd) => {
|
||||
for (index = 0; index < injectSeparatorsArray.length; index++) {
|
||||
for (index = 0; index < matrix[dimIndex].length; index++) {
|
||||
match = false;
|
||||
if (injectSeparatorsArray[index].parents && dimension1[dimIndex].displayValue === injectSeparatorsArray[index].parents.dimension1.header) {
|
||||
if (dim2.displayValue === injectSeparatorsArray[index].parents.dimension2.header) {
|
||||
if (measure.name === injectSeparatorsArray[index].parents.measurement.header) {
|
||||
measurementDataRow.push(injectSeparatorsArray[index]);
|
||||
if (
|
||||
matrix[dimIndex][index].parents &&
|
||||
dimension1[dimIndex].displayValue ===
|
||||
matrix[dimIndex][index].parents.dimension1.header
|
||||
) {
|
||||
if (
|
||||
dim2.displayValue ===
|
||||
matrix[dimIndex][index].parents.dimension2.header
|
||||
) {
|
||||
if (
|
||||
measure.name ===
|
||||
matrix[dimIndex][index].parents.measurement.header
|
||||
) {
|
||||
measurementDataRow.push(matrix[dimIndex][index]);
|
||||
match = true;
|
||||
break;
|
||||
}
|
||||
@@ -62,7 +69,7 @@ class DataTable extends React.PureComponent {
|
||||
}
|
||||
if (!match) {
|
||||
measurementDataRow.push({
|
||||
displayValue: '',
|
||||
displayValue: "",
|
||||
parents: {
|
||||
dimension1: {
|
||||
elementNumber: dimension1[dimIndex].elementNumber,
|
||||
@@ -81,9 +88,14 @@ class DataTable extends React.PureComponent {
|
||||
}
|
||||
});
|
||||
});
|
||||
return measurementDataRow;
|
||||
return injectSeparators(
|
||||
measurementDataRow,
|
||||
columnSeparatorWidth,
|
||||
atEvery
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<div className="row-wrapper">
|
||||
<table>
|
||||
@@ -109,7 +121,7 @@ class DataTable extends React.PureComponent {
|
||||
};
|
||||
|
||||
return (
|
||||
<tr key={dimensionEntry.displayValue}>
|
||||
<tr key={`${dimensionEntry.displayValue}-${dimensionIndex}-separator`}>
|
||||
{!renderData ?
|
||||
<RowHeader
|
||||
component={component}
|
||||
|
||||
@@ -86,6 +86,6 @@ export function initializeDesignList (component, layout) {
|
||||
resolve(data);
|
||||
};
|
||||
stylingField.OnData.bind(listener);
|
||||
stylingField.getData();
|
||||
stylingField.getData({ rows: 5000 });
|
||||
});
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ class HeadersTable extends React.PureComponent {
|
||||
colSpan={measurements.length}
|
||||
component={component}
|
||||
entry={entry}
|
||||
key={entry.displayValue}
|
||||
key={`${entry.displayValue}-${index}-separator`}
|
||||
styling={styling}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -108,6 +108,8 @@ export default {
|
||||
async getContextMenu (obj, menu) {
|
||||
const app = qlik.currApp(this);
|
||||
const isPersonalResult = await app.global.isPersonalMode();
|
||||
// This check is done because the desktop wrapper blocks downloads.
|
||||
// It also blocks this feature in QCS currently as isPersonalMode returns true
|
||||
if (
|
||||
!this.$scope.layout.allowexportxls ||
|
||||
(isPersonalResult && isPersonalResult.qReturn)
|
||||
@@ -115,7 +117,7 @@ export default {
|
||||
return menu;
|
||||
}
|
||||
|
||||
if (typeof (this.backendApi.model.layout.qMeta.privileges[3]) !== 'undefined' && this.backendApi.model.layout.qMeta.privileges[3] === 'exportdata') {
|
||||
if (this.backendApi.model.layout.qMeta.privileges.indexOf('exportdata') !== -1) {
|
||||
menu.addItem({
|
||||
translation: 'Export as XLS',
|
||||
tid: 'export-excel',
|
||||
|
||||
@@ -33,7 +33,7 @@ class Root extends React.PureComponent {
|
||||
// Determine cell- and column separator width
|
||||
let cellWidth = '0px';
|
||||
let columnSeparatorWidth = '';
|
||||
if (this.dataTableRef) {
|
||||
if (this.dataTableRef && !error) {
|
||||
const tableWidth = this.dataTableRef.getBoundingClientRect().width;
|
||||
this.renderedTableWidth = tableWidth;
|
||||
|
||||
|
||||
@@ -4,11 +4,13 @@ const path = require('path');
|
||||
|
||||
const DIST = path.resolve("./dist");
|
||||
const MODE = process.env.NODE_ENV || 'development';
|
||||
const SOURCE_MAP = 'sourec-map';
|
||||
const DEVTOOL = (process.env.NODE_ENV === 'development') ? SOURCE_MAP : false;
|
||||
|
||||
console.log('Webpack mode:', MODE); // eslint-disable-line no-console
|
||||
|
||||
const config = {
|
||||
devtool: 'source-map',
|
||||
devtool: DEVTOOL,
|
||||
entry: ['./src/index.js'],
|
||||
externals: {
|
||||
jquery: {
|
||||
|
||||
Reference in New Issue
Block a user