flameresttable 1.0.26 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flameresttable",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "main": "./src/plugin.ts",
5
5
  "repository": {
6
6
  "type": "git",
@@ -307,4 +307,25 @@ export default class FlameTable<T> {
307
307
  return result;
308
308
  }
309
309
 
310
+ /**
311
+ * Выгрузить существующие колонки в CSV
312
+ * @param filename
313
+ * @param arr
314
+ */
315
+ public exportSelectedToCSV(filename: string = "table.csv", arr: any = null) {
316
+
317
+ arr = arr ?? this.getSelectedRows();
318
+
319
+ const array = [Object.keys(arr[0])].concat(arr);
320
+ const csv = array.map(row => Object.values(row).map(val => `"${val}"`).join(';')).join('\n');
321
+
322
+ const csvData = new Blob([csv], { type: 'text/csv' });
323
+ const csvURL = URL.createObjectURL(csvData);
324
+ const link = document.createElement('a');
325
+ link.href = csvURL;
326
+ link.download = filename;
327
+ link.click();
328
+
329
+ }
330
+
310
331
  }
@@ -451,7 +451,7 @@ export default defineComponent({
451
451
  color: rgb(55, 53, 47);
452
452
  font-size: 14px;
453
453
  line-height: 16.8px;
454
- font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
454
+ font-family: "Roboto", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
455
455
  border: 1px solid rgb(233, 233, 231);
456
456
  }
457
457