|
|
|
@ -839,21 +839,6 @@ export class GristDoc extends DisposableWithEvents {
|
|
|
|
|
return this.docPageModel.appModel.api.getDocAPI(this.docId()).getDownloadXlsxUrl(params);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private _getDocApiDownloadParams() {
|
|
|
|
|
const filters = this.viewModel.activeSection.peek().activeFilters.get().map(filterInfo => ({
|
|
|
|
|
colRef : filterInfo.fieldOrColumn.origCol().origColRef(),
|
|
|
|
|
filter : filterInfo.filter()
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
const params = {
|
|
|
|
|
viewSection: this.viewModel.activeSectionId(),
|
|
|
|
|
tableId: this.viewModel.activeSection().table().tableId(),
|
|
|
|
|
activeSortSpec: JSON.stringify(this.viewModel.activeSection().activeSortSpec()),
|
|
|
|
|
filters : JSON.stringify(filters),
|
|
|
|
|
};
|
|
|
|
|
return params;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public hasGranularAccessRules(): boolean {
|
|
|
|
|
const rulesTable = this.docData.getMetaTable('_grist_ACLRules');
|
|
|
|
|
// To check if there are rules, ignore the default no-op rule created for an older incarnation
|
|
|
|
@ -1151,6 +1136,21 @@ export class GristDoc extends DisposableWithEvents {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private _getDocApiDownloadParams() {
|
|
|
|
|
const filters = this.viewModel.activeSection.peek().activeFilters.get().map(filterInfo => ({
|
|
|
|
|
colRef : filterInfo.fieldOrColumn.origCol().origColRef(),
|
|
|
|
|
filter : filterInfo.filter()
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
const params = {
|
|
|
|
|
viewSection: this.viewModel.activeSectionId(),
|
|
|
|
|
tableId: this.viewModel.activeSection().table().tableId(),
|
|
|
|
|
activeSortSpec: JSON.stringify(this.viewModel.activeSection().activeSortSpec()),
|
|
|
|
|
filters : JSON.stringify(filters),
|
|
|
|
|
};
|
|
|
|
|
return params;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Switch to a given sectionId, wait for it to load, and return a Promise for the instantiated
|
|
|
|
|
* viewInstance (such as an instance of GridView or DetailView).
|
|
|
|
@ -1278,5 +1278,6 @@ const cssViewContentPane = styled('div', `
|
|
|
|
|
}
|
|
|
|
|
&-contents {
|
|
|
|
|
margin: 0px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
`);
|
|
|
|
|