@drax/crud-vue 2.0.2 → 2.0.5

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": "2.0.2",
6
+ "version": "2.0.5",
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": "^2.0.1",
28
28
  "@drax/crud-front": "^2.0.0",
29
29
  "@drax/crud-share": "^2.0.2",
30
- "@drax/media-vue": "^2.0.2"
30
+ "@drax/media-vue": "^2.0.3"
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": "4ae64cc2ae14f3cc4d768a97689b2ff597e3401d"
53
+ "gitHead": "931e009c53493f4a14a79fd0d214bd0ad51b251a"
54
54
  }
@@ -252,6 +252,11 @@ export function useCrud(entity: IEntityCrud) {
252
252
  openDialog()
253
253
  }
254
254
 
255
+ function prepareEdit(item: object) {
256
+ store.setForm(cast(cloneItem(item)))
257
+ store.setOperation("edit")
258
+ }
259
+
255
260
  function cloneItem(item: object): object {
256
261
  try {
257
262
  return JSON.parse(JSON.stringify(item))
@@ -398,7 +403,8 @@ export function useCrud(entity: IEntityCrud) {
398
403
  operation, dialog, form, notify, error, message, formValid,
399
404
  loading, itemsPerPage, page, sortBy, search, totalItems, items,
400
405
  prepareFilters, filters, clearFilters, applyFilters,
401
- exportFiles, exportLoading, exportListVisible, exportError
406
+ exportFiles, exportLoading, exportListVisible, exportError,
407
+ cloneItem, cast, prepareEdit
402
408
  }
403
409
 
404
410
  }