grav-svelte 0.0.82 → 0.0.83
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.
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
export let showImportButton: boolean = true;
|
|
22
22
|
export let showExcelButton: boolean = true;
|
|
23
23
|
export let showPdfButton: boolean = true;
|
|
24
|
+
export let showSettingsButton: boolean = false;
|
|
24
25
|
export let showMostrandoInput: boolean = true;
|
|
25
26
|
export let Titulo_Crud: string;
|
|
26
27
|
export let dragEnabled: boolean = false;
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
export let onFilter: (filters: FiltrosI[]) => void;
|
|
36
37
|
export let onAdd: () => void;
|
|
37
38
|
export let onImport: (() => void) | undefined = undefined;
|
|
39
|
+
export let onSettings: (() => void) | undefined = undefined;
|
|
38
40
|
export let onReorder: (reorderedItems: any[]) => void = () => {};
|
|
39
41
|
export let onCellUpdate: ((id: number | string, campo: string, newValue: any) => Promise<void> | void) | undefined = undefined;
|
|
40
42
|
|
|
@@ -52,6 +54,12 @@
|
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
56
|
|
|
57
|
+
function handleSettings() {
|
|
58
|
+
if (onSettings) {
|
|
59
|
+
onSettings();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
55
63
|
interface PageChangeEvent {
|
|
56
64
|
detail: {
|
|
57
65
|
page: number;
|
|
@@ -149,26 +157,39 @@
|
|
|
149
157
|
/>
|
|
150
158
|
</div>
|
|
151
159
|
|
|
152
|
-
{#if showExcelButton || showPdfButton}
|
|
160
|
+
{#if showSettingsButton || showExcelButton || showPdfButton}
|
|
153
161
|
<div class="export-buttons">
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
162
|
+
<div class="buttons-left">
|
|
163
|
+
{#if showSettingsButton}
|
|
164
|
+
<button
|
|
165
|
+
type="button"
|
|
166
|
+
on:click={handleSettings}
|
|
167
|
+
class="export-button settings-button"
|
|
168
|
+
>
|
|
169
|
+
<i class="fas fa-cog"></i>
|
|
170
|
+
</button>
|
|
171
|
+
{/if}
|
|
172
|
+
</div>
|
|
173
|
+
<div class="buttons-right">
|
|
174
|
+
{#if showExcelButton}
|
|
175
|
+
<button
|
|
176
|
+
type="button"
|
|
177
|
+
on:click={() => handleExport("excel")}
|
|
178
|
+
class="export-button excel-button"
|
|
179
|
+
>
|
|
180
|
+
<i class="fas fa-file-excel"></i> EXCEL
|
|
181
|
+
</button>
|
|
182
|
+
{/if}
|
|
183
|
+
{#if showPdfButton}
|
|
184
|
+
<button
|
|
185
|
+
type="button"
|
|
186
|
+
on:click={() => handleExport("pdf")}
|
|
187
|
+
class="export-button pdf-button"
|
|
188
|
+
>
|
|
189
|
+
<i class="far fa-file-pdf"></i> PDF
|
|
190
|
+
</button>
|
|
191
|
+
{/if}
|
|
192
|
+
</div>
|
|
172
193
|
</div>
|
|
173
194
|
{/if}
|
|
174
195
|
</div>
|
|
@@ -193,7 +214,13 @@
|
|
|
193
214
|
display: flex;
|
|
194
215
|
gap: 1rem;
|
|
195
216
|
margin-top: 1rem;
|
|
196
|
-
justify-content:
|
|
217
|
+
justify-content: space-between;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.buttons-left,
|
|
221
|
+
.buttons-right {
|
|
222
|
+
display: flex;
|
|
223
|
+
gap: 1rem;
|
|
197
224
|
}
|
|
198
225
|
|
|
199
226
|
.export-button {
|
|
@@ -15,6 +15,7 @@ declare const __propDef: {
|
|
|
15
15
|
showImportButton?: boolean;
|
|
16
16
|
showExcelButton?: boolean;
|
|
17
17
|
showPdfButton?: boolean;
|
|
18
|
+
showSettingsButton?: boolean;
|
|
18
19
|
showMostrandoInput?: boolean;
|
|
19
20
|
Titulo_Crud: string;
|
|
20
21
|
dragEnabled?: boolean;
|
|
@@ -27,6 +28,7 @@ declare const __propDef: {
|
|
|
27
28
|
onFilter: (filters: FiltrosI[]) => void;
|
|
28
29
|
onAdd: () => void;
|
|
29
30
|
onImport?: (() => void) | undefined;
|
|
31
|
+
onSettings?: (() => void) | undefined;
|
|
30
32
|
onReorder?: (reorderedItems: any[]) => void;
|
|
31
33
|
onCellUpdate?: ((id: number | string, campo: string, newValue: any) => Promise<void> | void) | undefined;
|
|
32
34
|
};
|