@groupteknology/vuno 0.3.0 → 0.6.0

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 (41) hide show
  1. package/README.md +174 -2
  2. package/dist/module.json +1 -1
  3. package/dist/runtime/app/components/Cell/CellBadge.d.vue.ts +5 -0
  4. package/dist/runtime/app/components/Cell/CellBadge.vue +24 -0
  5. package/dist/runtime/app/components/Cell/CellBadge.vue.d.ts +5 -0
  6. package/dist/runtime/app/components/Cell/CellBoolean.d.vue.ts +5 -0
  7. package/dist/runtime/app/components/Cell/CellBoolean.vue +21 -0
  8. package/dist/runtime/app/components/Cell/CellBoolean.vue.d.ts +5 -0
  9. package/dist/runtime/app/components/Cell/CellCurrency.d.vue.ts +5 -0
  10. package/dist/runtime/app/components/Cell/CellCurrency.vue +14 -0
  11. package/dist/runtime/app/components/Cell/CellCurrency.vue.d.ts +5 -0
  12. package/dist/runtime/app/components/Cell/CellDate.d.vue.ts +5 -0
  13. package/dist/runtime/app/components/Cell/CellDate.vue +19 -0
  14. package/dist/runtime/app/components/Cell/CellDate.vue.d.ts +5 -0
  15. package/dist/runtime/app/components/Cell/CellImage.d.vue.ts +5 -0
  16. package/dist/runtime/app/components/Cell/CellImage.vue +22 -0
  17. package/dist/runtime/app/components/Cell/CellImage.vue.d.ts +5 -0
  18. package/dist/runtime/app/components/Cell/CellNumber.d.vue.ts +5 -0
  19. package/dist/runtime/app/components/Cell/CellNumber.vue +15 -0
  20. package/dist/runtime/app/components/Cell/CellNumber.vue.d.ts +5 -0
  21. package/dist/runtime/app/components/Cell/CellText.d.vue.ts +5 -0
  22. package/dist/runtime/app/components/Cell/CellText.vue +13 -0
  23. package/dist/runtime/app/components/Cell/CellText.vue.d.ts +5 -0
  24. package/dist/runtime/app/components/Field/FieldSwitch.d.vue.ts +5 -0
  25. package/dist/runtime/app/components/Field/FieldSwitch.vue +27 -0
  26. package/dist/runtime/app/components/Field/FieldSwitch.vue.d.ts +5 -0
  27. package/dist/runtime/app/components/Form/FormField.vue +18 -16
  28. package/dist/runtime/app/components/Form/FormModal.d.vue.ts +6 -0
  29. package/dist/runtime/app/components/Form/FormModal.vue +47 -46
  30. package/dist/runtime/app/components/Form/FormModal.vue.d.ts +6 -0
  31. package/dist/runtime/app/components/Table/Table.vue +273 -264
  32. package/dist/runtime/app/components/Table/TableCell.vue +24 -73
  33. package/dist/runtime/app/composables/useVunoCrud.js +9 -1
  34. package/dist/runtime/app/theme/index.js +18 -1
  35. package/dist/runtime/app/types/crud.d.ts +17 -1
  36. package/dist/runtime/app/types/field.d.ts +8 -1
  37. package/dist/runtime/app/types/table.d.ts +80 -13
  38. package/dist/runtime/app/types/theme.d.ts +6 -0
  39. package/dist/runtime/app/utils/column.d.ts +9 -0
  40. package/dist/runtime/app/utils/column.js +5 -0
  41. package/package.json +1 -1
@@ -33,50 +33,51 @@ function onSubmit(event) {
33
33
  </script>
34
34
 
35
35
  <template>
36
- <UModal
37
- v-model:open="open"
38
- :description="props.description"
39
- :dismissible="!props.loading"
40
- scrollable
41
- :title="props.title"
42
- :ui="modalUi"
43
- >
44
- <slot name="trigger" />
45
-
46
- <template #body>
47
- <Form
48
- :id="formId"
49
- ref="form"
50
- v-model:state="state"
51
- :definition="props.definition"
52
- :schema="props.schema"
53
- :ui="props.formUi"
54
- @submit="onSubmit"
55
- />
56
- </template>
57
-
58
- <template #footer>
59
- <slot
60
- :close="close"
61
- :dirty="form?.dirty ?? false"
62
- :loading="props.loading ?? false"
63
- name="footer"
64
- :reset="() => form?.reset?.()"
65
- >
66
- <UButton
67
- color="neutral"
68
- :disabled="props.loading"
69
- :label="messages.cancel"
70
- variant="ghost"
71
- @click="close"
72
- />
73
- <UButton
74
- :form="formId"
75
- :label="messages.save"
76
- :loading="props.loading"
77
- type="submit"
78
- />
79
- </slot>
80
- </template>
81
- </UModal>
36
+ <UModal
37
+ v-model:open="open"
38
+ :description="props.description"
39
+ :dismissible="!props.loading"
40
+ scrollable
41
+ :title="props.title"
42
+ :ui="modalUi"
43
+ >
44
+ <slot name="trigger" />
45
+
46
+ <template #body>
47
+ <Form
48
+ :id="formId"
49
+ ref="form"
50
+ v-model:state="state"
51
+ :definition="props.definition"
52
+ :schema="props.schema"
53
+ :ui="props.formUi"
54
+ @submit="onSubmit"
55
+ />
56
+ </template>
57
+
58
+ <template #footer>
59
+ <slot
60
+ :close="close"
61
+ :dirty="form?.dirty ?? false"
62
+ :formId="formId"
63
+ :loading="props.loading ?? false"
64
+ name="footer"
65
+ :reset="() => form?.reset?.()"
66
+ >
67
+ <UButton
68
+ color="neutral"
69
+ :disabled="props.loading"
70
+ :label="messages.cancel"
71
+ variant="ghost"
72
+ @click="close"
73
+ />
74
+ <UButton
75
+ :form="formId"
76
+ :label="messages.save"
77
+ :loading="props.loading"
78
+ type="submit"
79
+ />
80
+ </slot>
81
+ </template>
82
+ </UModal>
82
83
  </template>
@@ -32,8 +32,14 @@ declare const __VLS_export: <TState extends VunoFormState>(__VLS_props: NonNulla
32
32
  expose: (exposed: {}) => void;
33
33
  attrs: any;
34
34
  slots: {
35
+ /**
36
+ * `formId` es imprescindible, no un extra: el pie del modal vive fuera
37
+ * del `<form>`, así que un botón propio solo puede enviarlo con
38
+ * `:form="formId"`. Sin exponerlo, cualquier pie a medida queda mudo.
39
+ */
35
40
  footer?: (props: {
36
41
  dirty: boolean;
42
+ formId: string;
37
43
  loading: boolean;
38
44
  close: () => void;
39
45
  reset: () => void;