@den4ik92/ng2-smart-table 18.2.13 → 19.0.4

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.
Files changed (107) hide show
  1. package/README.md +167 -0
  2. package/fesm2022/den4ik92-ng2-smart-table.mjs +1502 -1581
  3. package/fesm2022/den4ik92-ng2-smart-table.mjs.map +1 -1
  4. package/lib/components/cell/cell-edit-mode/custom-edit.component.d.ts +3 -5
  5. package/lib/components/cell/cell-edit-mode/default-edit.component.d.ts +3 -3
  6. package/lib/components/cell/cell-edit-mode/edit-cell-default.d.ts +2 -3
  7. package/lib/components/cell/cell-edit-mode/edit-cell.component.d.ts +4 -5
  8. package/lib/components/cell/cell-editors/checkbox-editor.component.d.ts +2 -2
  9. package/lib/components/cell/cell-editors/default-editor.d.ts +8 -8
  10. package/lib/components/cell/cell-editors/input-editor.component.d.ts +2 -2
  11. package/lib/components/cell/cell-editors/select-editor.component.d.ts +2 -2
  12. package/lib/components/cell/cell-editors/textarea-editor.component.d.ts +2 -2
  13. package/lib/components/cell/cell-view-mode/custom-view.component.d.ts +1 -1
  14. package/lib/components/cell/cell-view-mode/view-cell.component.d.ts +2 -2
  15. package/lib/components/cell/cell.component.d.ts +8 -8
  16. package/lib/components/filter/custom-filter.component.d.ts +3 -5
  17. package/lib/components/filter/default-filter.component.d.ts +1 -1
  18. package/lib/components/filter/filter-default.d.ts +2 -3
  19. package/lib/components/filter/filter-types/checkbox-filter.component.d.ts +4 -4
  20. package/lib/components/filter/filter-types/default-filter.d.ts +4 -4
  21. package/lib/components/filter/filter-types/input-filter.component.d.ts +4 -4
  22. package/lib/components/filter/filter-types/select-filter.component.d.ts +1 -1
  23. package/lib/components/filter/filter.component.d.ts +2 -2
  24. package/lib/components/pager/pager.component.d.ts +5 -5
  25. package/lib/components/tbody/cells/create-cancel.component.d.ts +4 -4
  26. package/lib/components/tbody/cells/custom.component.d.ts +2 -3
  27. package/lib/components/tbody/cells/edit-delete.component.d.ts +7 -7
  28. package/lib/components/tbody/tbody.component.d.ts +19 -19
  29. package/lib/components/thead/cells/actions-title.component.d.ts +3 -4
  30. package/lib/components/thead/cells/actions.component.d.ts +4 -4
  31. package/lib/components/thead/cells/add-button.component.d.ts +5 -6
  32. package/lib/components/thead/cells/checkbox-select-all.component.d.ts +3 -3
  33. package/lib/components/thead/cells/column-title.component.d.ts +4 -5
  34. package/lib/components/thead/cells/title/title.component.d.ts +8 -8
  35. package/lib/components/thead/rows/thead-filters-row.component.d.ts +4 -4
  36. package/lib/components/thead/rows/thead-form-row.component.d.ts +4 -4
  37. package/lib/components/thead/rows/thead-titles-row.component.d.ts +6 -6
  38. package/lib/components/thead/thead.component.d.ts +7 -7
  39. package/lib/lib/grid.d.ts +20 -11
  40. package/lib/lib/helpers.d.ts +4 -1
  41. package/lib/lib/interfaces/smart-table.models.d.ts +16 -12
  42. package/lib/ng2-smart-table.component.d.ts +20 -21
  43. package/package.json +6 -7
  44. package/public-api.d.ts +0 -1
  45. package/esm2022/den4ik92-ng2-smart-table.mjs +0 -5
  46. package/esm2022/lib/components/cell/cell-edit-mode/custom-edit.component.mjs +0 -44
  47. package/esm2022/lib/components/cell/cell-edit-mode/default-edit.component.mjs +0 -26
  48. package/esm2022/lib/components/cell/cell-edit-mode/edit-cell-default.mjs +0 -35
  49. package/esm2022/lib/components/cell/cell-edit-mode/edit-cell.component.mjs +0 -76
  50. package/esm2022/lib/components/cell/cell-editors/checkbox-editor.component.mjs +0 -40
  51. package/esm2022/lib/components/cell/cell-editors/default-editor.mjs +0 -30
  52. package/esm2022/lib/components/cell/cell-editors/input-editor.component.mjs +0 -37
  53. package/esm2022/lib/components/cell/cell-editors/select-editor.component.mjs +0 -52
  54. package/esm2022/lib/components/cell/cell-editors/textarea-editor.component.mjs +0 -39
  55. package/esm2022/lib/components/cell/cell-view-mode/custom-view.component.mjs +0 -15
  56. package/esm2022/lib/components/cell/cell-view-mode/view-cell.component.mjs +0 -47
  57. package/esm2022/lib/components/cell/cell-view-mode/view-cell.mjs +0 -2
  58. package/esm2022/lib/components/cell/cell.component.mjs +0 -73
  59. package/esm2022/lib/components/cell/cell.module.mjs +0 -75
  60. package/esm2022/lib/components/filter/custom-filter.component.mjs +0 -43
  61. package/esm2022/lib/components/filter/default-filter.component.mjs +0 -73
  62. package/esm2022/lib/components/filter/filter-default.mjs +0 -37
  63. package/esm2022/lib/components/filter/filter-types/checkbox-filter.component.mjs +0 -54
  64. package/esm2022/lib/components/filter/filter-types/default-filter.mjs +0 -36
  65. package/esm2022/lib/components/filter/filter-types/input-filter.component.mjs +0 -53
  66. package/esm2022/lib/components/filter/filter-types/select-filter.component.mjs +0 -58
  67. package/esm2022/lib/components/filter/filter.component.mjs +0 -86
  68. package/esm2022/lib/components/filter/filter.module.mjs +0 -62
  69. package/esm2022/lib/components/pager/pager.component.mjs +0 -241
  70. package/esm2022/lib/components/pager/pager.module.mjs +0 -28
  71. package/esm2022/lib/components/tbody/cells/create-cancel.component.mjs +0 -195
  72. package/esm2022/lib/components/tbody/cells/custom.component.mjs +0 -59
  73. package/esm2022/lib/components/tbody/cells/edit-delete.component.mjs +0 -241
  74. package/esm2022/lib/components/tbody/tbody.component.mjs +0 -95
  75. package/esm2022/lib/components/tbody/tbody.module.mjs +0 -47
  76. package/esm2022/lib/components/thead/cells/actions-title.component.mjs +0 -31
  77. package/esm2022/lib/components/thead/cells/actions.component.mjs +0 -42
  78. package/esm2022/lib/components/thead/cells/add-button.component.mjs +0 -57
  79. package/esm2022/lib/components/thead/cells/checkbox-select-all.component.mjs +0 -25
  80. package/esm2022/lib/components/thead/cells/column-title.component.mjs +0 -34
  81. package/esm2022/lib/components/thead/cells/title/title.component.mjs +0 -87
  82. package/esm2022/lib/components/thead/rows/thead-filters-row.component.mjs +0 -89
  83. package/esm2022/lib/components/thead/rows/thead-form-row.component.mjs +0 -108
  84. package/esm2022/lib/components/thead/rows/thead-titles-row.component.mjs +0 -87
  85. package/esm2022/lib/components/thead/thead.component.mjs +0 -42
  86. package/esm2022/lib/components/thead/thead.module.mjs +0 -75
  87. package/esm2022/lib/lib/data-set/cell.mjs +0 -43
  88. package/esm2022/lib/lib/data-set/column.mjs +0 -74
  89. package/esm2022/lib/lib/data-set/data-set.mjs +0 -96
  90. package/esm2022/lib/lib/data-set/row.mjs +0 -47
  91. package/esm2022/lib/lib/data-source/data-source.mjs +0 -92
  92. package/esm2022/lib/lib/data-source/local/local.data-source.mjs +0 -263
  93. package/esm2022/lib/lib/data-source/local/local.filter.mjs +0 -13
  94. package/esm2022/lib/lib/data-source/local/local.pager.mjs +0 -6
  95. package/esm2022/lib/lib/data-source/local/local.sorter.mjs +0 -19
  96. package/esm2022/lib/lib/grid.mjs +0 -218
  97. package/esm2022/lib/lib/helpers.mjs +0 -84
  98. package/esm2022/lib/lib/interfaces/smart-table.models.mjs +0 -16
  99. package/esm2022/lib/ng2-smart-table.component.mjs +0 -169
  100. package/esm2022/lib/ng2-smart-table.module.mjs +0 -51
  101. package/esm2022/public-api.mjs +0 -12
  102. package/lib/components/cell/cell.module.d.ts +0 -20
  103. package/lib/components/filter/filter.module.d.ts +0 -16
  104. package/lib/components/pager/pager.module.d.ts +0 -9
  105. package/lib/components/tbody/tbody.module.d.ts +0 -13
  106. package/lib/components/thead/thead.module.d.ts +0 -20
  107. package/lib/ng2-smart-table.module.d.ts +0 -14
package/README.md ADDED
@@ -0,0 +1,167 @@
1
+ # Angular Smart Table Component
2
+
3
+ ng2-smart-table component made with :heart: by [Akveo team](http://akveo.com/). Follow us on [Twitter](https://twitter.com/akveo_inc) to get latest news about this component first!
4
+
5
+ ## ⚠ Low Maintenance
6
+ Due to project priority and resource constraints, this project is currently on low maintenance. We recognize that there are a lot of activities around this package. However, we are unable to accommodate the maintenance this project requires.
7
+
8
+ ### Demo
9
+
10
+ <a target="_blank" href="https://akveo.github.io/ng2-smart-table/">Live Demo</a>
11
+
12
+ ![alt tag](projects/demo/src/assets/demo.gif)
13
+
14
+ ## Installation
15
+
16
+ The library is available as npm package, so all you need to do is to run the following command:
17
+
18
+ ```
19
+ npm install --save ng2-smart-table
20
+ ```
21
+
22
+ This command will create a record in your `package.json` file and install the package into the npm modules folder.
23
+
24
+ ## Minimal Setup Example
25
+
26
+ First thing you need to do is to import the ng2-smart-table directives into your component.
27
+
28
+ ```
29
+
30
+ import { Ng2SmartTableModule } from 'ng2-smart-table';
31
+
32
+ ```
33
+
34
+ Then register it by adding to the list of directives of your module:
35
+
36
+ ```
37
+ // ...
38
+
39
+ @NgModule({
40
+ imports: [
41
+ // ...
42
+
43
+ Ng2SmartTableModule,
44
+
45
+ // ...
46
+ ],
47
+ declarations: [ ... ]
48
+ })
49
+ // ...
50
+ ```
51
+
52
+ Now, we need to configure the table and add it into the template. The only <strong>required</strong> setting for the component to start working is a columns configuration.
53
+ Let's register <i>settings</i> property inside of the component where we want to have the table and configure some columns [Settings documentation](https://akveo.github.io/ng2-smart-table/#/documentation):
54
+
55
+ ```
56
+ settings = {
57
+ columns: {
58
+ id: {
59
+ title: 'ID'
60
+ },
61
+ name: {
62
+ title: 'Full Name'
63
+ },
64
+ username: {
65
+ title: 'User Name'
66
+ },
67
+ email: {
68
+ title: 'Email'
69
+ }
70
+ }
71
+ };
72
+ ```
73
+
74
+ Finally let's put the ng2-smart-table component inside of the template:
75
+
76
+ ```
77
+ // ...
78
+
79
+ @Component({
80
+ template: `
81
+ <ng2-smart-table [settings]="settings"></ng2-smart-table>
82
+ `
83
+ })
84
+ // ...
85
+ ```
86
+ At this step you will have a minimal configured table. All functions are available by default and you don't need to configure them anyhow, so now you can add/edit/delete rows, sort or filter the table, etc.
87
+
88
+ Still it seems like something is missing... Right, there is no data in the table by default. To add some, let's create an array property with a list of objects in the component. Please note that object keys are the same as in the columns configuration.
89
+
90
+ ```
91
+ data = [
92
+ {
93
+ id: 1,
94
+ name: "Leanne Graham",
95
+ username: "Bret",
96
+ email: "Sincere@april.biz"
97
+ },
98
+ {
99
+ id: 2,
100
+ name: "Ervin Howell",
101
+ username: "Antonette",
102
+ email: "Shanna@melissa.tv"
103
+ },
104
+
105
+ // ... list of items
106
+
107
+ {
108
+ id: 11,
109
+ name: "Nicholas DuBuque",
110
+ username: "Nicholas.Stanton",
111
+ email: "Rey.Padberg@rosamond.biz"
112
+ }
113
+ ];
114
+ ```
115
+
116
+ And pass the data to the table:
117
+
118
+ ```
119
+ // ...
120
+
121
+ @Component({
122
+ template: `
123
+ <ng2-smart-table [settings]="settings" [source]="data"></ng2-smart-table>
124
+ `
125
+ })
126
+ // ...
127
+ ```
128
+
129
+ Now you have some data in the table.
130
+
131
+ ## Further Documentation
132
+ Installation, customization and other useful articles: https://akveo.github.io/ng2-smart-table/
133
+
134
+ ## UI Bakery
135
+ Try low-code internal tool builder for free
136
+ <a href="https://uibakery.io/?utm_source=github&utm_medium=clicks&utm_campaign=banner"><img src="https://user-images.githubusercontent.com/6151971/125071660-41f84900-e0c2-11eb-882a-0c675eb1e5e3.png"></a>
137
+
138
+ ## How can I support developers?
139
+ - Star our GitHub repo :star:
140
+ - Create pull requests, submit bugs, suggest new features or documentation updates :wrench:
141
+ - Follow us on [Twitter](https://twitter.com/akveo_inc) :feet:
142
+ - Like our page on [Facebook](https://www.facebook.com/akveo/) :thumbsup:
143
+
144
+ ## Can I hire you guys?
145
+ Yes! Visit [our homepage](http://akveo.com/) or simply leave us a note to [contact@akveo.com](mailto:contact@akveo.com). We will be happy to work with you!
146
+
147
+ ## Features
148
+ * Local data source (Server/API LocalDataSource is on its way)
149
+ * Filtering
150
+ * Sorting
151
+ * Pagination
152
+ * Inline Add/Edit/Delete
153
+ * Flexible event model
154
+
155
+ ## License
156
+ [MIT](LICENSE.txt) license.
157
+
158
+ ## Special thanks to our awesome contributors!
159
+
160
+ [<img alt="nnixaa" src="https://avatars0.githubusercontent.com/u/230527?v=3&s=60" width="60">](https://github.com/nnixaa)[<img alt="lexzhukov" src="https://avatars0.githubusercontent.com/u/12192373?v=3&s=60" width="60">](https://github.com/lexzhukov)[<img alt="damnko" src="https://avatars2.githubusercontent.com/u/680205?v=3&s=60" width="60">](https://github.com/damnko)[<img alt="Tibing" src="https://avatars2.githubusercontent.com/u/17410089?v=3&s=60" width="60">](https://github.com/Tibing)[<img alt="Ezeon" src="https://avatars0.githubusercontent.com/u/21973741?v=3&s=60" width="60">](https://github.com/Ezeon)[<img alt="Deilan" src="https://avatars1.githubusercontent.com/u/4777512?v=3&s=60" width="60">](https://github.com/Deilan)[<img alt="hoswey" src="https://avatars0.githubusercontent.com/u/3689445?v=3&s=60" width="60">](https://github.com/hoswey)[<img alt="stacyakveo" src="https://avatars2.githubusercontent.com/u/27723447?v=3&s=60" width="60">](https://github.com/stacyakveo)[<img alt="Akshaymisal5" src="https://avatars3.githubusercontent.com/u/15906551?v=3&s=60" width="60">](https://github.com/Akshaymisal5)[<img alt="geneeblack" src="https://avatars0.githubusercontent.com/u/282525?v=3&s=60" width="60">](https://github.com/geneeblack)[<img alt="vvandoorne" src="https://avatars2.githubusercontent.com/u/26658175?v=3&s=60" width="60">](https://github.com/vvandoorne)[<img alt="ananthhh" src="https://avatars1.githubusercontent.com/u/3583234?v=3&s=60" width="60">](https://github.com/ananthhh)[<img alt="bis-sb" src="https://avatars1.githubusercontent.com/u/22668001?v=3&s=60" width="60">](https://github.com/bis-sb)[<img alt="tadashi-aikawa" src="https://avatars1.githubusercontent.com/u/9500018?v=3&s=60" width="60">](https://github.com/tadashi-aikawa)
161
+
162
+ [<img alt="nureha" src="https://avatars2.githubusercontent.com/u/7064537?v=3&s=60" width="60">](https://github.com/nureha)[<img alt="vlupu10" src="https://avatars1.githubusercontent.com/u/3597512?v=3&s=60" width="60">](https://github.com/vlupu10)[<img alt="zhouhao27" src="https://avatars1.githubusercontent.com/u/8099731?v=3&s=60" width="60">](https://github.com/zhouhao27)[<img alt="hkb1990" src="https://avatars1.githubusercontent.com/u/2637138?v=3&s=60" width="60">](https://github.com/hkb1990)[<img alt="liaosong" src="https://avatars0.githubusercontent.com/u/3927282?v=3&s=60" width="60">](https://github.com/liaosong)[<img alt="ktriek" src="https://avatars2.githubusercontent.com/u/4461059?v=3&s=60" width="60">](https://github.com/ktriek)
163
+
164
+ ### From akveo
165
+
166
+ Enjoy :metal:
167
+ We're always happy to hear your feedback!