Skip to content

Commit

Permalink
Merge pull request #275 from rpbouman/dev
Browse files Browse the repository at this point in the history
fix export bug
  • Loading branch information
rpbouman authored Dec 2, 2024
2 parents 043cd77 + bab3b54 commit 27ccae2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
4 changes: 3 additions & 1 deletion src/AttributeUi/AttributeUi.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ main.layout:has( .workarea > .pivotTableUiContainer[aria-busy=true] ) > nav#side
details[role=treeitem] {

> summary {

white-space: nowrap;

> span.label {
max-width: calc(100% - 166px);
width: 100%;
}

> span.label::before {
Expand Down
7 changes: 4 additions & 3 deletions src/AttributeUi/AttributeUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -638,24 +638,25 @@ class AttributeUi {
var head = createEl('summary', {
});

var caption = AttributeUi.#getUiNodeCaption(config);
var title = config.title;
if (!title){
switch (config.type) {
case 'column':
title = `"${columnExpression}": ${config.profile.column_type}`;
title = `${config.profile.column_type}`;
break;
case 'member':
title = `${columnExpression}: ${config.columnType}`;
title = `${config.columnType} ${columnExpression}`;
break;
case 'aggregate':
case 'derived':
var expressionTemplate = config.expressionTemplate;
title = extrapolateColumnExpression(expressionTemplate, columnExpression);
break;
}
title = `${caption}: ${title}`;
}

var caption = AttributeUi.#getUiNodeCaption(config);
var label = createEl('span', {
"class": 'label',
"title": title,
Expand Down
12 changes: 5 additions & 7 deletions src/ExportUi/ExportDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class ExportUi {
escape = exportSettings[exportType + 'Escape'];
dateFormat = exportSettings[exportType + 'DateFormat'];
timestampFormat = exportSettings[exportType + 'TimestampFormat'];
compression = exportSettings[exportType + 'Compression'].value;
compression = exportSettings[exportType + 'Compression'];

copyStatementOptions = {
"FORMAT": 'CSV',
Expand All @@ -153,7 +153,7 @@ class ExportUi {
fileExtension = 'csv';
break;
case 'exportJson':
compression = exportSettings[exportType + 'Compression'].value;
compression = exportSettings[exportType + 'Compression'];
dateFormat = exportSettings[exportType + 'DateFormat'];
timestampFormat = exportSettings[exportType + 'TimestampFormat'];
rowDelimiter = exportSettings[exportType + 'RowDelimiter'];
Expand All @@ -168,7 +168,7 @@ class ExportUi {
fileExtension = 'json';
break;
case 'exportParquet':
compression = exportSettings[exportType + 'Compression'].value;
compression = exportSettings[exportType + 'Compression'];
copyStatementOptions = {
"FORMAT": 'PARQUET',
"COMPRESSION": compression,
Expand All @@ -178,9 +178,9 @@ class ExportUi {
break;
case 'exportSql':
sqlOptions = {
keywordLettercase: exportSettings[exportType + 'KeywordLettercase'].value,
keywordLettercase: exportSettings[exportType + 'KeywordLettercase'],
alwaysQuoteIdentifiers: exportSettings[exportType + 'AlwaysQuoteIdentifiers'],
commaStyle: exportSettings[exportType + 'CommaStyle'].value
commaStyle: exportSettings[exportType + 'CommaStyle']
};
mimeType = 'text/plain';
fileExtension = 'sql';
Expand Down Expand Up @@ -388,8 +388,6 @@ class ExportDialog {
var valueProperty;
switch (control.type){
case 'radio':
valueProperty = 'selected';
break;
case 'checkbox':
valueProperty = 'checked';
break;
Expand Down

0 comments on commit 27ccae2

Please sign in to comment.