akveo / ng2-smart-table

Angular Smart Data Table component
https://akveo.github.io/ng2-smart-table/
MIT License
1.63k stars 879 forks source link

Public components not visible in migration from 1.4.0 to 1.5.0 #1097

Open jopperknopper opened 5 years ago

jopperknopper commented 5 years ago

I rely heavily on Smart Table and I need to be able to import and use these components:

import {Ng2SmartTableComponent} from "ng2-smart-table/lib/ng2-smart-table.component";

import {CellComponent} from "ng2-smart-table/lib/components/cell/cell.component";

import {DataSource} from "ng2-smart-table/lib/lib/data-source/data-source"; -The DataSource because I have created my own data source.

Are these classes not avaliable because you have a new build system?

I am also missing the css file in the new build, I am guessing that it is available somewhere else?

I have been forced to an older version for now, where there are problem with the /deep/ keyword in the ng2-smart-table.component.scss file which i manually have to edit.

I would really like to have those classes available.

Best Regards!

/Jesper

Originally posted by @jopperknopper in https://github.com/akveo/ng2-smart-table/issues/1055#issuecomment-544998385

SnakyBeaky commented 4 years ago

I've been using Ng2SmartTableComponent as well up until 1.5.0.

Quick hack to make it work again:

Replace your Ng2SmartTableComponent import with:

import { ɵbo as Ng2SmartTableComponent } from 'ng2-smart-table';

The generated bundle index uses those weird characters (ɵbo) but it can be renamed with the as back to Ng2SmartTableComponent

chriss5 commented 4 years ago

In 1.6.0 the workaround of SnakyBeaky is no longer necessary (and causes an error). ɵbo now is the export name of the class Row. However, for me import { Ng2SmartTableComponent } from 'ng2-smart-table'; works again with 1.6.0. In Commit 8a4f0bba47cb70fe1e98d48f98047b1e6f361b1a they added an export * from './lib/ng2-smart-table.component'; to public-api.ts

jopperknopper commented 4 years ago

That is great news, I hope all classes I need is available so that I can upgrade peacefully. I will give it a try and see how it goes :-)