grav-svelte 0.0.71 → 0.0.73
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.
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
export let loading: boolean = false;
|
|
20
20
|
export let showAddButton: boolean = true;
|
|
21
21
|
export let showImportButton: boolean = true;
|
|
22
|
+
export let showExcelButton: boolean = true;
|
|
23
|
+
export let showPdfButton: boolean = true;
|
|
22
24
|
export let Titulo_Crud: string;
|
|
23
25
|
export let dragEnabled: boolean = false;
|
|
24
26
|
export let orderField: string = "inOrden";
|
|
@@ -145,22 +147,28 @@
|
|
|
145
147
|
/>
|
|
146
148
|
</div>
|
|
147
149
|
|
|
148
|
-
|
|
149
|
-
<
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
150
|
+
{#if showExcelButton || showPdfButton}
|
|
151
|
+
<div class="export-buttons">
|
|
152
|
+
{#if showExcelButton}
|
|
153
|
+
<button
|
|
154
|
+
type="button"
|
|
155
|
+
on:click={() => handleExport("excel")}
|
|
156
|
+
class="export-button excel-button"
|
|
157
|
+
>
|
|
158
|
+
<i class="fas fa-file-excel"></i> EXCEL
|
|
159
|
+
</button>
|
|
160
|
+
{/if}
|
|
161
|
+
{#if showPdfButton}
|
|
162
|
+
<button
|
|
163
|
+
type="button"
|
|
164
|
+
on:click={() => handleExport("pdf")}
|
|
165
|
+
class="export-button pdf-button"
|
|
166
|
+
>
|
|
167
|
+
<i class="far fa-file-pdf"></i> PDF
|
|
168
|
+
</button>
|
|
169
|
+
{/if}
|
|
170
|
+
</div>
|
|
171
|
+
{/if}
|
|
164
172
|
</div>
|
|
165
173
|
|
|
166
174
|
<style>
|
|
@@ -177,6 +177,8 @@ export interface CrudWrapperProps {
|
|
|
177
177
|
loading?: boolean;
|
|
178
178
|
showAddButton?: boolean;
|
|
179
179
|
showImportButton?: boolean;
|
|
180
|
+
showExcelButton?: boolean;
|
|
181
|
+
showPdfButton?: boolean;
|
|
180
182
|
/**
|
|
181
183
|
* Field name that contains the unique ID for each row.
|
|
182
184
|
* Defaults to 'id' if not specified.
|