@vc-shell/framework 1.0.187 → 1.0.188

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.
@@ -1 +1 @@
1
- {"version":3,"file":"useDetailsFactory.d.ts","sourceRoot":"","sources":["../../../../../../shared/modules/dynamic/factories/base/useDetailsFactory.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAoB,UAAU,EAAE,MAAM,UAAU,CAAC;AAGrE,MAAM,WAAW,uBAAuB,CAAC,IAAI;IAC3C,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC;IACnD,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,KAAK,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACtD,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,iBAAiB,0HAwE7B,CAAC"}
1
+ {"version":3,"file":"useDetailsFactory.d.ts","sourceRoot":"","sources":["../../../../../../shared/modules/dynamic/factories/base/useDetailsFactory.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAoB,UAAU,EAAE,MAAM,UAAU,CAAC;AAGrE,MAAM,WAAW,uBAAuB,CAAC,IAAI;IAC3C,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC;IACnD,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,KAAK,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACtD,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,iBAAiB,0HAyE7B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vc-shell/framework",
3
- "version": "1.0.187",
3
+ "version": "1.0.188",
4
4
  "type": "module",
5
5
  "main": "./dist/framework.js",
6
6
  "types": "./dist/index.d.ts",
@@ -55,9 +55,9 @@
55
55
  "whatwg-fetch": "^3.6.19"
56
56
  },
57
57
  "devDependencies": {
58
- "@vc-shell/api-client-generator": "^1.0.187",
59
- "@vc-shell/config-generator": "^1.0.187",
60
- "@vc-shell/ts-config": "^1.0.187",
58
+ "@vc-shell/api-client-generator": "^1.0.188",
59
+ "@vc-shell/config-generator": "^1.0.188",
60
+ "@vc-shell/ts-config": "^1.0.188",
61
61
  "@vitejs/plugin-vue": "^5.0.3",
62
62
  "sass": "^1.69.6",
63
63
  "shx": "^0.3.4",
@@ -1,4 +1,4 @@
1
- import { ComputedRef, MaybeRef, computed, ref, watch } from "vue";
1
+ import { ComputedRef, MaybeRef, Ref, computed, ref, watch } from "vue";
2
2
  import * as _ from "lodash-es";
3
3
  import { useForm, useIsFormDirty, useIsFormValid } from "vee-validate";
4
4
  import { useAsync, useLoading } from "../../../../../core/composables";
@@ -20,7 +20,7 @@ export const useDetailsFactory = <Item>(factoryParams: UseDetailsFactoryParams<I
20
20
  const itemTemp = ref<Item>();
21
21
  const isModified = ref(false);
22
22
  const isFormValid = useIsFormValid();
23
- const isDirty = useIsFormDirty();
23
+ let isDirty: Ref<boolean> = useIsFormDirty();
24
24
  const isDisabled = computed(() => !isDirty.value || !isFormValid.value);
25
25
 
26
26
  const { loading: itemLoading, action: load } = useAsync<ItemId>(async (args?: ItemId) => {
@@ -32,6 +32,7 @@ export const useDetailsFactory = <Item>(factoryParams: UseDetailsFactoryParams<I
32
32
  if (validationState.value.valid) {
33
33
  await factoryParams.saveChanges?.(item as Item);
34
34
  isModified.value = false;
35
+ isDirty = ref(false);
35
36
  } else throw new Error("Form is not valid");
36
37
  });
37
38