Skip to content

Commit bc05afa

Browse files
authored
Merge pull request #147 from ghiscoding/chore/biome1.3
chore(deps): update Biome to v2.3.0
2 parents a122498 + f502635 commit bc05afa

File tree

3 files changed

+85
-85
lines changed

3 files changed

+85
-85
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
},
5656
"packageManager": "pnpm@10.10.0",
5757
"devDependencies": {
58-
"@biomejs/biome": "^2.2.6",
58+
"@biomejs/biome": "^2.3.0",
5959
"@lerna-lite/cli": "^4.9.1",
6060
"@lerna-lite/publish": "^4.9.1",
6161
"@types/node": "^24.9.0",

packages/demo/src/examples/example-standalone-iife.html

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -70,61 +70,61 @@ <h5>Standalone JS (IIFE)</h5>
7070
<script src="https://cdn.jsdelivr.net/npm/excel-builder-vanilla@3.0.1/dist/excel-builder.iife.js"></script>
7171

7272
<script>
73-
function downloader(options) {
74-
// when using IE/Edge, then use different download call
75-
if (typeof navigator.msSaveOrOpenBlob === 'function') {
76-
navigator.msSaveOrOpenBlob(options.blob, options.filename);
77-
} else {
78-
// this trick will generate a temp <a /> tag
79-
// the code will then trigger a hidden click for it to start downloading
80-
const link = document.createElement('a');
81-
const url = URL.createObjectURL(options.blob);
73+
function downloader(options) {
74+
// when using IE/Edge, then use different download call
75+
if (typeof navigator.msSaveOrOpenBlob === 'function') {
76+
navigator.msSaveOrOpenBlob(options.blob, options.filename);
77+
} else {
78+
// this trick will generate a temp <a /> tag
79+
// the code will then trigger a hidden click for it to start downloading
80+
const link = document.createElement('a');
81+
const url = URL.createObjectURL(options.blob);
8282

83-
if (link && document) {
84-
link.textContent = 'download';
85-
link.href = url;
86-
link.setAttribute('download', options.filename);
83+
if (link && document) {
84+
link.textContent = 'download';
85+
link.href = url;
86+
link.setAttribute('download', options.filename);
8787

88-
// set the visibility to hidden so there is no effect on your web-layout
89-
link.style.visibility = 'hidden';
88+
// set the visibility to hidden so there is no effect on your web-layout
89+
link.style.visibility = 'hidden';
9090

91-
// this part will append the anchor tag, trigger a click (for download to start) and finally remove the tag once completed
92-
document.body.appendChild(link);
93-
link.click();
94-
document.body.removeChild(link);
95-
}
91+
// this part will append the anchor tag, trigger a click (for download to start) and finally remove the tag once completed
92+
document.body.appendChild(link);
93+
link.click();
94+
document.body.removeChild(link);
9695
}
9796
}
97+
}
9898

99-
function exportExcel() {
100-
const originalData = [
101-
['Artist', 'Album', 'Price'],
102-
['Buckethead', 'Albino Slug', 8.99],
103-
['Buckethead', 'Electric Tears', 13.99],
104-
['Buckethead', 'Colma', 11.34],
105-
['Crystal Method', 'Vegas', 10.54],
106-
['Crystal Method', 'Tweekend', 10.64],
107-
['Crystal Method', 'Divided By Night', 8.99],
108-
];
109-
const artistWorkbook = new window.ExcelBuilder.Workbook();
110-
const albumList = artistWorkbook.createWorksheet({ name: 'Artists' });
111-
albumList.setData(originalData);
112-
artistWorkbook.addWorksheet(albumList);
99+
function exportExcel() {
100+
const originalData = [
101+
['Artist', 'Album', 'Price'],
102+
['Buckethead', 'Albino Slug', 8.99],
103+
['Buckethead', 'Electric Tears', 13.99],
104+
['Buckethead', 'Colma', 11.34],
105+
['Crystal Method', 'Vegas', 10.54],
106+
['Crystal Method', 'Tweekend', 10.64],
107+
['Crystal Method', 'Divided By Night', 8.99],
108+
];
109+
const artistWorkbook = new window.ExcelBuilder.Workbook();
110+
const albumList = artistWorkbook.createWorksheet({ name: 'Artists' });
111+
albumList.setData(originalData);
112+
artistWorkbook.addWorksheet(albumList);
113113

114-
new window.ExcelBuilder.createExcelFile(artistWorkbook, { type: 'blob' }).then((excelBlob) => {
115-
const downloadOptions = {
116-
filename: 'Artist WB.xlsx',
117-
format: 'xlsx',
118-
};
114+
new window.ExcelBuilder.createExcelFile(artistWorkbook, { type: 'blob' }).then(excelBlob => {
115+
const downloadOptions = {
116+
filename: 'Artist WB.xlsx',
117+
format: 'xlsx',
118+
};
119119

120-
// start downloading but add the Blob property only on the start download not on the event itself
121-
downloader({ ...downloadOptions, blob: excelBlob, data: albumList.data });
122-
});
123-
}
124-
125-
document.querySelector('button#export').addEventListener('click', () => {
126-
exportExcel();
120+
// start downloading but add the Blob property only on the start download not on the event itself
121+
downloader({ ...downloadOptions, blob: excelBlob, data: albumList.data });
127122
});
123+
}
124+
125+
document.querySelector('button#export').addEventListener('click', () => {
126+
exportExcel();
127+
});
128128
</script>
129129
</body>
130130
</html>

pnpm-lock.yaml

Lines changed: 38 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)