@cauca-911/datagrid 22.2.6-beta1 → 22.2.7
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/README.md
CHANGED
|
@@ -22,6 +22,36 @@ button disappears entirely if the list is empty:
|
|
|
22
22
|
<cauca-data-grid [allowExport]="true" [exportFormats]="['excel']" />
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
### Title row
|
|
26
|
+
|
|
27
|
+
`exportTitle` becomes the first row of the spreadsheet (merged across the
|
|
28
|
+
columns) and is drawn above the table in the PDF. Pass it already translated,
|
|
29
|
+
the same way column labels are passed:
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<cauca-data-grid [allowExport]="true"
|
|
33
|
+
[exportTitle]="'userList.exportTitle' | translate" />
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Exported column headers need nothing extra: they reuse each column's `label`,
|
|
37
|
+
so binding `[label]="'key' | translate"` is already enough. Dates follow
|
|
38
|
+
`LOCALE_ID`, and boolean cells are written as text from the library's own
|
|
39
|
+
`dataGrid.export.true` / `dataGrid.export.false` keys (`Vrai` / `Faux` in
|
|
40
|
+
French).
|
|
41
|
+
|
|
42
|
+
### Custom menu items
|
|
43
|
+
|
|
44
|
+
Project your own entries into the export menu with the `exportItem` attribute.
|
|
45
|
+
They render below the built-in ones, and setting `[exportFormats]="[]"` gives a
|
|
46
|
+
menu of only your items:
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<cauca-data-grid [allowExport]="true">
|
|
50
|
+
<cauca-menu-item exportItem icon="send" label="user.sendToPartner"
|
|
51
|
+
[translateLabel]="true" (buttonClick)="send()" />
|
|
52
|
+
</cauca-data-grid>
|
|
53
|
+
```
|
|
54
|
+
|
|
25
55
|
They are loaded with a dynamic `import()`, so an application that never enables
|
|
26
56
|
export pays nothing for them in its bundle. Skipping the install is only a
|
|
27
57
|
problem the moment a user clicks the button.
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
{
|
|
2
|
-
"dataGrid": {
|
|
3
|
-
"defaultAddButtonLabel": "Add",
|
|
4
|
-
"density": {
|
|
5
|
-
"title": "Density",
|
|
6
|
-
"compact": "Compact",
|
|
7
|
-
"standard": "Standard",
|
|
8
|
-
"comfortable": "Comfortable"
|
|
9
|
-
},
|
|
10
|
-
"filters": "Filters",
|
|
11
|
-
"columns": "Columns",
|
|
12
|
-
"noDataLabel": "No data",
|
|
13
|
-
"errorLoadingDataLabel": "An error has occured while loading data.",
|
|
14
|
-
"keywordsLabel": "Keywords...",
|
|
15
|
-
"columnChooser": {
|
|
16
|
-
"reset": "Reset",
|
|
17
|
-
"showAll": "Show all"
|
|
18
|
-
},
|
|
19
|
-
"export": {
|
|
20
|
-
"title": "Export",
|
|
21
|
-
"excel": "Export to Excel",
|
|
22
|
-
"pdf": "Export to PDF"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"dataGrid": {
|
|
3
|
+
"defaultAddButtonLabel": "Add",
|
|
4
|
+
"density": {
|
|
5
|
+
"title": "Density",
|
|
6
|
+
"compact": "Compact",
|
|
7
|
+
"standard": "Standard",
|
|
8
|
+
"comfortable": "Comfortable"
|
|
9
|
+
},
|
|
10
|
+
"filters": "Filters",
|
|
11
|
+
"columns": "Columns",
|
|
12
|
+
"noDataLabel": "No data",
|
|
13
|
+
"errorLoadingDataLabel": "An error has occured while loading data.",
|
|
14
|
+
"keywordsLabel": "Keywords...",
|
|
15
|
+
"columnChooser": {
|
|
16
|
+
"reset": "Reset",
|
|
17
|
+
"showAll": "Show all"
|
|
18
|
+
},
|
|
19
|
+
"export": {
|
|
20
|
+
"title": "Export",
|
|
21
|
+
"excel": "Export to Excel",
|
|
22
|
+
"pdf": "Export to PDF",
|
|
23
|
+
"true": "True",
|
|
24
|
+
"false": "False"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
{
|
|
2
|
-
"dataGrid": {
|
|
3
|
-
"defaultAddButtonLabel": "Ajouter",
|
|
4
|
-
"density": {
|
|
5
|
-
"title": "Densité",
|
|
6
|
-
"compact": "Compacte",
|
|
7
|
-
"standard": "Normale",
|
|
8
|
-
"comfortable": "Confortable"
|
|
9
|
-
},
|
|
10
|
-
"filters": "Filtres",
|
|
11
|
-
"columns": "Colonnes",
|
|
12
|
-
"noDataLabel": "Aucune donnée",
|
|
13
|
-
"errorLoadingDataLabel": "Une erreur s'est produite lors du chargement des données.",
|
|
14
|
-
"keywordsLabel": "Mots clés...",
|
|
15
|
-
"columnChooser": {
|
|
16
|
-
"reset": "Réinitialiser",
|
|
17
|
-
"showAll": "Tout afficher"
|
|
18
|
-
},
|
|
19
|
-
"export": {
|
|
20
|
-
"title": "Exporter",
|
|
21
|
-
"excel": "Exporter vers Excel",
|
|
22
|
-
"pdf": "Exporter vers PDF"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"dataGrid": {
|
|
3
|
+
"defaultAddButtonLabel": "Ajouter",
|
|
4
|
+
"density": {
|
|
5
|
+
"title": "Densité",
|
|
6
|
+
"compact": "Compacte",
|
|
7
|
+
"standard": "Normale",
|
|
8
|
+
"comfortable": "Confortable"
|
|
9
|
+
},
|
|
10
|
+
"filters": "Filtres",
|
|
11
|
+
"columns": "Colonnes",
|
|
12
|
+
"noDataLabel": "Aucune donnée",
|
|
13
|
+
"errorLoadingDataLabel": "Une erreur s'est produite lors du chargement des données.",
|
|
14
|
+
"keywordsLabel": "Mots clés...",
|
|
15
|
+
"columnChooser": {
|
|
16
|
+
"reset": "Réinitialiser",
|
|
17
|
+
"showAll": "Tout afficher"
|
|
18
|
+
},
|
|
19
|
+
"export": {
|
|
20
|
+
"title": "Exporter",
|
|
21
|
+
"excel": "Exporter vers Excel",
|
|
22
|
+
"pdf": "Exporter vers PDF",
|
|
23
|
+
"true": "Vrai",
|
|
24
|
+
"false": "Faux"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|