@drax/crud-vue 3.54.0 → 3.56.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.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.54.0",
6
+ "version": "3.56.0",
7
7
  "type": "module",
8
8
  "main": "./src/index.ts",
9
9
  "module": "./src/index.ts",
@@ -27,7 +27,7 @@
27
27
  "@drax/common-front": "^3.54.0",
28
28
  "@drax/crud-front": "^3.54.0",
29
29
  "@drax/crud-share": "^3.54.0",
30
- "@drax/media-vue": "^3.54.0"
30
+ "@drax/media-vue": "^3.56.0"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "pinia": "^3.0.4",
@@ -50,5 +50,5 @@
50
50
  "vue-tsc": "^3.2.4",
51
51
  "vuetify": "^3.11.8"
52
52
  },
53
- "gitHead": "e7b0f29f3f68e352e8accb9d70c66b6f745a3278"
53
+ "gitHead": "762f6a79400883d25999031a8b23a36063f2b251"
54
54
  }
@@ -13,8 +13,10 @@ const buttonConfig = useCrudButtonConfig("createOnTheFly")
13
13
 
14
14
  const dialog = ref(false)
15
15
 
16
- const {entity} = defineProps({
16
+ const {entity, icon, label} = defineProps({
17
17
  entity: {type: Object as PropType<IEntityCrud>, required: true},
18
+ icon: {type: String},
19
+ label: {type: String},
18
20
  })
19
21
 
20
22
  const store = useCrudStore(entity?.name)
@@ -44,7 +46,7 @@ const emit = defineEmits(['created'])
44
46
  <template v-slot:activator="{ props }">
45
47
  <v-btn
46
48
  v-bind="{ ...$attrs, ...props }"
47
- :icon="buttonConfig.icon"
49
+ :icon="label ? undefined : icon || buttonConfig.icon"
48
50
  :id="$attrs.id || 'crud-create-on-the-fly-button'"
49
51
  class="crud-create-on-the-fly-button mr-1"
50
52
  :variant="buttonConfig.variant"
@@ -52,6 +54,14 @@ const emit = defineEmits(['created'])
52
54
  :color="buttonConfig.color"
53
55
  @click="openDialog"
54
56
  >
57
+ <template v-if="label">
58
+ <v-icon
59
+ v-if="icon || buttonConfig.icon"
60
+ :icon="icon || buttonConfig.icon"
61
+ start
62
+ />
63
+ {{ label }}
64
+ </template>
55
65
  </v-btn>
56
66
  </template>
57
67
  {{ t('action.create')}}
package/src/index.ts CHANGED
@@ -21,6 +21,7 @@ import CrudDialogPrevButton from "./components/buttons/CrudDialogPrevButton.vue"
21
21
  import CrudOpenRouteFormButton from "./components/buttons/CrudOpenRouteFormButton.vue";
22
22
  import CrudSavedQueriesButton from "./components/buttons/CrudSavedQueriesButton.vue";
23
23
  import CrudRefreshButton from "./components/buttons/CrudRefreshButton.vue";
24
+ import CrudCreateOnTheFlyButton from "./components/buttons/CrudCreateOnTheFlyButton.vue";
24
25
  import EntityCombobox from "./components/combobox/EntityCombobox.vue";
25
26
  import {useCrudStore} from "./stores/UseCrudStore";
26
27
  import {useEntityStore} from "./stores/UseEntityStore";
@@ -68,6 +69,7 @@ export {
68
69
  CrudOpenRouteFormButton,
69
70
  CrudSavedQueriesButton,
70
71
  CrudRefreshButton,
72
+ CrudCreateOnTheFlyButton,
71
73
  CrudFilters,
72
74
  CrudFiltersAction,
73
75
  CrudFiltersDynamic,