runeforge 0.0.17 → 0.0.18
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/dist/components/crud/GenericCRUD.svelte +331 -311
- package/dist/components/crud/GenericCRUD.svelte.d.ts +3 -1
- package/dist/components/crud/SearchInput.svelte +53 -0
- package/dist/components/crud/SearchInput.svelte.d.ts +7 -0
- package/dist/components/crud/views/List.svelte +308 -221
- package/dist/components/crud/views/List.svelte.d.ts +3 -1
- package/dist/i18n/en.js +2 -1
- package/dist/i18n/es.js +2 -1
- package/dist/i18n/types.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/types/crud.d.ts +13 -0
- package/package.json +1 -1
package/dist/i18n/es.js
CHANGED
|
@@ -15,6 +15,7 @@ export const es = {
|
|
|
15
15
|
edit: 'Editar',
|
|
16
16
|
delete: 'Eliminar',
|
|
17
17
|
create: 'Crear',
|
|
18
|
+
searchPlaceholder: 'Buscar...',
|
|
18
19
|
save: 'Guardar',
|
|
19
20
|
saveAndContinue: 'Guardar y continuar',
|
|
20
21
|
cancel: 'Cancelar',
|
|
@@ -22,5 +23,5 @@ export const es = {
|
|
|
22
23
|
confirm: 'Confirmar',
|
|
23
24
|
deleteConfirm: (count, actionLabel) => `¿Seguro que querés ${String(actionLabel).toLowerCase()} ${count} elemento${count === 1 ? '' : 's'}?`,
|
|
24
25
|
required: (field) => `${field} es requerido`,
|
|
25
|
-
serverError: 'Error inesperado del servidor.'
|
|
26
|
+
serverError: 'Error inesperado del servidor.'
|
|
26
27
|
};
|
package/dist/i18n/types.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export type { BreadcrumbItem } from './types/breadcrumb.js';
|
|
|
2
2
|
export { AttributeType } from './types/attribute.js';
|
|
3
3
|
export type { AttributeMetadata, InterfaceMetadata, SelectOption, OptionsResolver, FormatterResolver } from './types/attribute.js';
|
|
4
4
|
export type { CellProps, CellComponent, CellFormatter, SortDirection, IndexedRow, DistinctEntry, PaginatedEnvelope, ServerPagination, FilterSnapshot, TableQuery } from './types/table.js';
|
|
5
|
-
export type { ColumnDefinition, FieldDefinition, ActionConfiguration, CustomAction, RowAction } from './types/crud.js';
|
|
5
|
+
export type { ColumnDefinition, FieldDefinition, ActionConfiguration, CustomAction, CustomBulkAction, RowAction, SearchConfiguration } from './types/crud.js';
|
|
6
6
|
export type { RuneforgeConfig } from './config/context.js';
|
|
7
7
|
export { setConfig, getConfig } from './config/context.js';
|
|
8
8
|
export type { CRUDIconSet, IconComponent } from './icons/types.js';
|
|
@@ -39,6 +39,7 @@ export { default as CRUDList } from './components/crud/views/List.svelte';
|
|
|
39
39
|
export { default as CRUDCreate } from './components/crud/views/Create.svelte';
|
|
40
40
|
export { default as CRUDRead } from './components/crud/views/Read.svelte';
|
|
41
41
|
export { default as CRUDUpdate } from './components/crud/views/Update.svelte';
|
|
42
|
+
export { default as SearchInput } from './components/crud/SearchInput.svelte';
|
|
42
43
|
export { AUTO_EXCLUDED } from './components/crud/utils/constants.js';
|
|
43
44
|
export { resolveOptions, resolveFormatter, inferType } from './components/crud/utils/resolution.js';
|
|
44
45
|
export { fieldLabel, initials } from './components/crud/utils/misc.js';
|
package/dist/index.js
CHANGED
|
@@ -36,6 +36,7 @@ export { default as CRUDList } from './components/crud/views/List.svelte';
|
|
|
36
36
|
export { default as CRUDCreate } from './components/crud/views/Create.svelte';
|
|
37
37
|
export { default as CRUDRead } from './components/crud/views/Read.svelte';
|
|
38
38
|
export { default as CRUDUpdate } from './components/crud/views/Update.svelte';
|
|
39
|
+
export { default as SearchInput } from './components/crud/SearchInput.svelte';
|
|
39
40
|
// CRUD utilities
|
|
40
41
|
export { AUTO_EXCLUDED } from './components/crud/utils/constants.js';
|
|
41
42
|
export { resolveOptions, resolveFormatter, inferType } from './components/crud/utils/resolution.js';
|
package/dist/types/crud.d.ts
CHANGED
|
@@ -47,3 +47,16 @@ export interface RowAction<T extends object = Record<string, unknown>> {
|
|
|
47
47
|
condition?: (item: T) => boolean;
|
|
48
48
|
run: (item: T) => void;
|
|
49
49
|
}
|
|
50
|
+
export interface CustomBulkAction<T extends object = Record<string, unknown>> {
|
|
51
|
+
label: string;
|
|
52
|
+
icon: any;
|
|
53
|
+
endpoint: string;
|
|
54
|
+
variant?: string;
|
|
55
|
+
confirm?: boolean;
|
|
56
|
+
condition?: (items: T[]) => boolean;
|
|
57
|
+
}
|
|
58
|
+
export interface SearchConfiguration {
|
|
59
|
+
param?: string;
|
|
60
|
+
placeholder?: string;
|
|
61
|
+
debounceMs?: number;
|
|
62
|
+
}
|