@drax/crud-vue 0.8.4 → 0.8.6

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": "0.8.4",
6
+ "version": "0.8.6",
7
7
  "type": "module",
8
8
  "main": "./src/index.ts",
9
9
  "module": "./src/index.ts",
@@ -26,7 +26,7 @@
26
26
  "dependencies": {
27
27
  "@drax/common-front": "^0.8.3",
28
28
  "@drax/crud-front": "^0.8.3",
29
- "@drax/crud-share": "^0.8.3",
29
+ "@drax/crud-share": "^0.8.5",
30
30
  "@drax/media-vue": "^0.8.3"
31
31
  },
32
32
  "peerDependencies": {
@@ -64,5 +64,5 @@
64
64
  "vue-tsc": "^2.0.11",
65
65
  "vuetify": "^3.7.1"
66
66
  },
67
- "gitHead": "f3415ce60cc6bf6353605ab692afa309c0ab4f43"
67
+ "gitHead": "79384008896aa7228c451b260e398a7990a2c5a6"
68
68
  }
@@ -75,7 +75,14 @@ onBeforeMount(() => {
75
75
  :readonly="operation === 'delete'"
76
76
  @submit="onSubmit"
77
77
  @cancel="onCancel"
78
- />
78
+ >
79
+
80
+ <template v-for="ifield in entity.fields" :key="ifield.name" v-slot:[`field.${ifield.name}`]="{field}">
81
+ <slot :name="`field.${ifield.name}`" v-bind="{field}">
82
+ </slot>
83
+ </template>
84
+
85
+ </crud-form>
79
86
  </slot>
80
87
 
81
88
  </crud-dialog>
@@ -21,8 +21,8 @@ const {entity, multiple} = defineProps({
21
21
  label: {type: String},
22
22
  itemValue: {type: [String], default: '_id'},
23
23
  itemTitle: {type: [String], default: 'name'},
24
- rules: {type: Array as PropType<any>, default: []},
25
- errorMessages: {type: Array as PropType<string[]>, default: []},
24
+ rules: {type: Array as PropType<any>, default: () => []},
25
+ errorMessages: {type: Array as PropType<string[]>, default: () => []},
26
26
  hideDetails: {type: Boolean, default: false},
27
27
  singleLine: {type: Boolean, default: false},
28
28
  density: {type: String as PropType<'comfortable' | 'compact' | 'default'>, default: 'default'},
@@ -93,18 +93,21 @@ const {
93
93
  :lg="field.lg ? field.lg : 12"
94
94
  :xl="field.xl ? field.xl : 12"
95
95
  >
96
- <crud-form-field
97
- :field="field"
98
- :entity="entity"
99
- v-model="valueModel[field.name]"
100
- :clearable="false"
101
- :readonly="readonly"
102
- :variant="variant"
103
- :prepend-inner-icon="field?.prependInnerIcon"
104
- :prepend-icon="field?.prependIcon"
105
- :append-icon="field?.appendIcon"
106
- :append-inner-icon="field?.appendInnerIcon"
107
- />
96
+ <slot :name="`field.${field.name}`" v-bind="{field}">
97
+ <crud-form-field
98
+ :field="field"
99
+ :entity="entity"
100
+ v-model="valueModel[field.name]"
101
+ :clearable="false"
102
+ :readonly="readonly"
103
+ :variant="variant"
104
+ :prepend-inner-icon="field?.prependInnerIcon"
105
+ :prepend-icon="field?.prependIcon"
106
+ :append-icon="field?.appendIcon"
107
+ :append-inner-icon="field?.appendInnerIcon"
108
+ />
109
+ </slot>
110
+
108
111
  </v-col>
109
112
  </v-row>
110
113
  </v-card-text>
package/src/index.ts CHANGED
@@ -6,6 +6,7 @@ import CrudFormList from "./components/CrudFormList.vue";
6
6
  import CrudList from "./components/CrudList.vue";
7
7
  import CrudNotify from "./components/CrudNotify.vue";
8
8
  import CrudSearch from "./components/CrudSearch.vue";
9
+ import CrudAutocomplete from "./components/CrudAutocomplete.vue";
9
10
  import {useCrudStore} from "./stores/UseCrudStore";
10
11
  import {useCrud} from "./composables/UseCrud";
11
12
  import {useFormUtils} from "./composables/UseFormUtils";
@@ -21,6 +22,7 @@ export {
21
22
  CrudList,
22
23
  CrudNotify,
23
24
  CrudSearch,
25
+ CrudAutocomplete,
24
26
  useCrud,
25
27
  useFormUtils,
26
28
  useCrudStore,