Нема описа
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

datatables-bootstrap5.js 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Core libraries
  2. import JSZip from 'jszip';
  3. import pdfMake from 'pdfmake/build/pdfmake';
  4. import pdfFonts from 'pdfmake/build/vfs_fonts';
  5. // DataTables libraries (with related plugins)
  6. import DataTable from 'datatables.net-bs5';
  7. import 'datatables.net-fixedcolumns-bs5';
  8. import 'datatables.net-fixedheader-bs5';
  9. import 'datatables.net-select-bs5';
  10. import 'datatables.net-buttons';
  11. import 'datatables.net-buttons-bs5';
  12. import 'datatables.net-buttons/js/buttons.html5';
  13. import 'datatables.net-buttons/js/buttons.print';
  14. import 'datatables.net-responsive';
  15. import 'datatables.net-responsive-bs5';
  16. import 'datatables.net-rowgroup-bs5';
  17. // This solution related to font issues with pdfMake
  18. pdfMake.fonts = {
  19. Roboto: {
  20. normal: 'https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.66/fonts/Roboto/Roboto-Regular.ttf',
  21. bold: 'https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.66/fonts/Roboto/Roboto-Medium.ttf',
  22. italics: 'https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.66/fonts/Roboto/Roboto-Italic.ttf',
  23. bolditalics: 'https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.66/fonts/Roboto/Roboto-MediumItalic.ttf'
  24. }
  25. };
  26. $.fn.dataTable.ext.buttons.pdfMake = pdfMake;
  27. // Attach libraries to the window object (if needed globally)
  28. try {
  29. window.pdfMake = pdfMake;
  30. window.pdfFonts = pdfFonts;
  31. window.JSZip = JSZip;
  32. } catch (e) {}
  33. window.DataTable = DataTable;
  34. // Export the libraries/modules
  35. export { DataTable, JSZip, pdfMake, pdfFonts };