Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions demos/aurelia/src/examples/slickgrid/example12.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
type AureliaGridInstance,
type Column,
DelimiterType,
FileType,
Filters,
type Formatter,
Formatters,
Expand Down Expand Up @@ -310,15 +309,15 @@ export class Example12 {
exportToExcel() {
this.excelExportService.exportToExcel({
filename: 'Export',
format: FileType.xlsx,
format: 'xlsx',
});
}

exportToFile(type = 'csv') {
this.textExportService.exportToFile({
delimiter: type === 'csv' ? DelimiterType.comma : DelimiterType.tab,
filename: 'myExport',
format: type === 'csv' ? FileType.csv : FileType.txt,
format: type === 'csv' ? 'csv' : 'txt',
});
}

Expand Down
3 changes: 1 addition & 2 deletions demos/aurelia/src/examples/slickgrid/example13.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
Aggregators,
type AureliaGridInstance,
type Column,
FileType,
Filters,
Formatters,
type GridOption,
Expand Down Expand Up @@ -278,7 +277,7 @@ export class Example13 {
exportToExcel() {
this.excelExportService.exportToExcel({
filename: 'Export',
format: FileType.xlsx,
format: 'xlsx',
});
}

Expand Down
3 changes: 1 addition & 2 deletions demos/aurelia/src/examples/slickgrid/example18.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
Aggregators,
type AureliaGridInstance,
type Column,
FileType,
Filters,
Formatters,
type GridOption,
Expand Down Expand Up @@ -327,7 +326,7 @@ export class Example18 {
exportToExcel() {
this.excelExportService.exportToExcel({
filename: 'Export',
format: FileType.xlsx,
format: 'xlsx',
});
}

Expand Down
4 changes: 2 additions & 2 deletions demos/aurelia/src/examples/slickgrid/example27.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ExcelExportService } from '@slickgrid-universal/excel-export';

import type { AureliaGridInstance, Column, GridOption, GridStateChange, TreeToggledItem, TreeToggleStateChange } from 'aurelia-slickgrid';
import { GridStateType, Filters, Formatters } from 'aurelia-slickgrid';
import { Filters, Formatters } from 'aurelia-slickgrid';
import './example27.scss'; // provide custom CSS/SASS styling

const NB_ITEMS = 500;
Expand Down Expand Up @@ -351,7 +351,7 @@ export class Example27 {
handleOnGridStateChanged(gridStateChange: GridStateChange) {
this.hasNoExpandCollapseChanged = false;

if (gridStateChange?.change?.type === GridStateType.treeData) {
if (gridStateChange?.change?.type === 'treeData') {
console.log('Tree Data gridStateChange', gridStateChange?.gridState?.treeData);
this.treeToggleItems = gridStateChange?.gridState?.treeData?.toggledItems as TreeToggledItem[];
}
Expand Down
5 changes: 2 additions & 3 deletions demos/react/src/examples/slickgrid/Example12.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import i18next from 'i18next';
import {
type Column,
DelimiterType,
FileType,
Filters,
type Formatter,
Formatters,
Expand Down Expand Up @@ -248,15 +247,15 @@ const Example12: React.FC = () => {
function exportToExcel() {
excelExportService.exportToExcel({
filename: 'Export',
format: FileType.xlsx,
format: 'xlsx',
});
}

function exportToFile(type = 'csv') {
textExportService.exportToFile({
delimiter: type === 'csv' ? DelimiterType.comma : DelimiterType.tab,
filename: 'myExport',
format: type === 'csv' ? FileType.csv : FileType.txt,
format: type === 'csv' ? 'csv' : 'txt',
});
}

Expand Down
3 changes: 1 addition & 2 deletions demos/react/src/examples/slickgrid/Example13.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { TextExportService } from '@slickgrid-universal/text-export';
import {
Aggregators,
type Column,
FileType,
Filters,
Formatters,
type GridOption,
Expand Down Expand Up @@ -267,7 +266,7 @@ const Example13: React.FC = () => {
function exportToExcel() {
excelExportService.exportToExcel({
filename: 'Export',
format: FileType.xlsx,
format: 'xlsx',
});
}

Expand Down
3 changes: 1 addition & 2 deletions demos/react/src/examples/slickgrid/Example18.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { TextExportService } from '@slickgrid-universal/text-export';
import {
Aggregators,
type Column,
FileType,
Filters,
Formatters,
type GridOption,
Expand Down Expand Up @@ -339,7 +338,7 @@ const Example18: React.FC = () => {
function exportToExcel() {
excelExportService.exportToExcel({
filename: 'Export',
format: FileType.xlsx,
format: 'xlsx',
});
}

Expand Down
2 changes: 1 addition & 1 deletion demos/react/src/examples/slickgrid/Example27.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ const Example27: React.FC = () => {
// function handleOnGridStateChanged(gridStateChange: GridStateChange) {
// setHasNoExpandCollapseChanged(false);

// if (gridStateChange?.change?.type === GridStateType.treeData) {
// if (gridStateChange?.change?.type === 'treeData') {
// setTreeToggleItems(gridStateChange?.gridState?.treeData?.toggledItems as TreeToggledItem[]);
// }
// }
Expand Down
3 changes: 1 addition & 2 deletions demos/vanilla/src/examples/example02.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
type Column,
Editors,
Filters,
FileType,
Formatters,
type GridOption,
type Grouping,
Expand Down Expand Up @@ -365,7 +364,7 @@ export default class Example02 {
}

exportToExcel() {
this.excelExportService.exportToExcel({ filename: 'export', format: FileType.xlsx });
this.excelExportService.exportToExcel({ filename: 'export', format: 'xlsx' });
}

groupByDuration() {
Expand Down
3 changes: 1 addition & 2 deletions demos/vanilla/src/examples/example03.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
type Column,
type EditCommand,
Editors,
FileType,
Filters,
Formatters,
type GridOption,
Expand Down Expand Up @@ -476,7 +475,7 @@ export default class Example03 {
exportToExcel() {
this.excelExportService.exportToExcel({
filename: 'Export',
format: FileType.xlsx,
format: 'xlsx',
});
}

Expand Down
3 changes: 1 addition & 2 deletions demos/vanilla/src/examples/example05.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
Formatters,
type GridOption,
type GridStateChange,
GridStateType,
type OnSelectedRowsChangedEventArgs,
type TreeToggledItem,
type TreeToggleStateChange,
Expand Down Expand Up @@ -484,7 +483,7 @@ export default class Example05 {
this.hasNoExpandCollapseChanged = false;
const gridStateChange = e.detail;

if (gridStateChange.change?.type === GridStateType.treeData) {
if (gridStateChange.change?.type === 'treeData') {
console.log('Tree Data gridStateChange', gridStateChange.gridState?.treeData);
this.treeToggleItems = gridStateChange.gridState?.treeData?.toggledItems as TreeToggledItem[];
}
Expand Down
5 changes: 2 additions & 3 deletions demos/vanilla/src/examples/example10.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
type GridStateChange,
type Metrics,
OperatorType,
SortDirection,
} from '@slickgrid-universal/common';
import { BindingEventService } from '@slickgrid-universal/binding';
import {
Expand Down Expand Up @@ -248,7 +247,7 @@ export default class Example10 {
sorters: [
// direction can written as 'asc' (uppercase or lowercase) and/or use the SortDirection type
{ columnId: 'name', direction: 'asc' },
{ columnId: 'company', direction: SortDirection.DESC },
{ columnId: 'company', direction: 'DESC' },
],
pagination: { pageNumber: this.isWithCursor ? 1 : 2, pageSize: 20 }, // if cursor based, start at page 1
},
Expand Down Expand Up @@ -426,7 +425,7 @@ export default class Example10 {
this.sgb?.sortService.updateSorting([
// direction can written as 'asc' (uppercase or lowercase) and/or use the SortDirection type
{ columnId: 'name', direction: 'asc' },
{ columnId: 'company', direction: SortDirection.DESC },
{ columnId: 'company', direction: 'DESC' },
]);
window.setTimeout(() => {
this.sgb?.paginationService?.changeItemPerPage(20);
Expand Down
5 changes: 2 additions & 3 deletions demos/vue/src/components/Example12.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { useTranslation } from 'i18next-vue';
import {
type Column,
DelimiterType,
FileType,
Filters,
type Formatter,
Formatters,
Expand Down Expand Up @@ -270,15 +269,15 @@ function dynamicallyAddTitleHeader() {
function exportToExcel() {
excelExportService.exportToExcel({
filename: 'Export',
format: FileType.xlsx,
format: 'xlsx',
});
}

function exportToFile(type = 'csv') {
textExportService.exportToFile({
delimiter: type === 'csv' ? DelimiterType.comma : DelimiterType.tab,
filename: 'myExport',
format: type === 'csv' ? FileType.csv : FileType.txt,
format: type === 'csv' ? 'csv' : 'txt',
});
}

Expand Down
3 changes: 1 addition & 2 deletions demos/vue/src/components/Example13.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
type SlickgridVueInstance,
Aggregators,
type Column,
FileType,
Filters,
Formatters,
GroupTotalFormatters,
Expand Down Expand Up @@ -257,7 +256,7 @@ function expandAllGroups() {
function exportToExcel() {
excelExportService.exportToExcel({
filename: 'Export',
format: FileType.xlsx,
format: 'xlsx',
});
}

Expand Down
3 changes: 1 addition & 2 deletions demos/vue/src/components/Example18.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
type SlickgridVueInstance,
Aggregators,
type Column,
FileType,
Filters,
Formatters,
GroupTotalFormatters,
Expand Down Expand Up @@ -303,7 +302,7 @@ function expandAllGroups() {
function exportToExcel() {
excelExportService.exportToExcel({
filename: 'Export',
format: FileType.xlsx,
format: 'xlsx',
});
}

Expand Down
2 changes: 1 addition & 1 deletion demos/vue/src/components/Example27.vue
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ function handleOnTreeItemToggled(treeToggleExecution: TreeToggleStateChange) {
// function handleOnGridStateChanged(gridStateChange: GridStateChange) {
// hasNoExpandCollapseChanged.value = false;

// if (gridStateChange?.change?.type === GridStateType.treeData) {
// if (gridStateChange?.change?.type === 'treeData') {
// console.log('Tree Data gridStateChange', gridStateChange?.gridState?.treeData);
// treeToggleItems.value = gridStateChange?.gridState?.treeData?.toggledItems as TreeToggledItem[];
// }
Expand Down
2 changes: 1 addition & 1 deletion docs/grid-functionalities/Export-to-Excel.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export class MySample {
exportToFile() {
this.excelExportService.exportToExcel({
filename: 'myExport',
format: FileType.xlsx
format: 'xlsx',
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/grid-functionalities/Export-to-Text-File.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class MySample {
this.textExportService.exportToFile({
delimiter: (type === 'csv') ? DelimiterType.comma : DelimiterType.tab,
filename: 'myExport',
format: (type === 'csv') ? FileType.csv : FileType.txt
format: (type === 'csv') ? 'csv' : 'txt'
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export class MySample {
exportToFile() {
this.excelExportService.exportToExcel({
filename: 'myExport',
format: FileType.xlsx
format: 'xlsx'
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class MySample {
this.textExportService.exportToFile({
delimiter: (type === 'csv') ? DelimiterType.comma : DelimiterType.tab,
filename: 'myExport',
format: (type === 'csv') ? FileType.csv : FileType.txt
format: (type === 'csv') ? 'csv' : 'txt'
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
Metrics,
type MultipleSelectOption,
OperatorType,
SortDirection,
unsubscribeAllObservables,
} from '../../library';

Expand Down Expand Up @@ -229,7 +228,7 @@ export class Example6Component implements OnInit, OnDestroy {
sorters: [
// direction can written as 'asc' (uppercase or lowercase) and/or use the SortDirection type
{ columnId: 'name', direction: 'asc' },
{ columnId: 'company', direction: SortDirection.DESC },
{ columnId: 'company', direction: 'DESC' },
],
pagination: { pageNumber: this.isWithCursor ? 1 : 2, pageSize: 20 }, // if cursor based, start at page 1
},
Expand Down Expand Up @@ -413,7 +412,7 @@ export class Example6Component implements OnInit, OnDestroy {
this.angularGrid.sortService.updateSorting([
// direction can written as 'asc' (uppercase or lowercase) and/or use the SortDirection type
{ columnId: 'name', direction: 'asc' },
{ columnId: 'company', direction: SortDirection.DESC },
{ columnId: 'company', direction: 'DESC' },
]);
setTimeout(() => {
this.angularGrid.paginationService?.changeItemPerPage(20);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
AngularGridInstance,
Column,
DelimiterType,
FileType,
Filters,
Formatter,
Formatters,
Expand Down Expand Up @@ -284,15 +283,15 @@ export class Example12Component implements OnInit, OnDestroy {
exportToExcel() {
this.excelExportService.exportToExcel({
filename: 'Export',
format: FileType.xlsx,
format: 'xlsx',
});
}

exportToFile(type = 'csv') {
this.textExportService.exportToFile({
delimiter: type === 'csv' ? DelimiterType.comma : DelimiterType.tab,
filename: 'myExport',
format: type === 'csv' ? FileType.csv : FileType.txt,
format: type === 'csv' ? 'csv' : 'txt',
});
}

Expand Down
Loading