@vc-shell/framework 1.0.227 → 1.0.228
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/CHANGELOG.md +4 -0
- package/dist/framework.js +2742 -2741
- package/package.json +4 -4
- package/shared/modules/dynamic/factories/base/useDetailsFactory.ts +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/framework",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.228",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/framework.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/dompurify": "^3.0.5",
|
|
62
62
|
"@types/quill": "^2.0.14",
|
|
63
|
-
"@vc-shell/api-client-generator": "^1.0.
|
|
64
|
-
"@vc-shell/config-generator": "^1.0.
|
|
65
|
-
"@vc-shell/ts-config": "^1.0.
|
|
63
|
+
"@vc-shell/api-client-generator": "^1.0.228",
|
|
64
|
+
"@vc-shell/config-generator": "^1.0.228",
|
|
65
|
+
"@vc-shell/ts-config": "^1.0.228",
|
|
66
66
|
"@vitejs/plugin-vue": "^5.0.3",
|
|
67
67
|
"sass": "^1.69.6",
|
|
68
68
|
"shx": "^0.3.4",
|
|
@@ -20,8 +20,7 @@ export const useDetailsFactory = <Item extends { id?: string }>(factoryParams: U
|
|
|
20
20
|
const itemTemp = ref<Item>();
|
|
21
21
|
const isModified = ref(false);
|
|
22
22
|
const isFormValid = useIsFormValid();
|
|
23
|
-
|
|
24
|
-
const isDisabled = computed(() => !isDirty.value || !isFormValid.value);
|
|
23
|
+
const isDisabled = computed(() => !isModified.value || !isFormValid.value);
|
|
25
24
|
|
|
26
25
|
const { loading: itemLoading, action: load } = useAsync<ItemId>(async (args?: ItemId) => {
|
|
27
26
|
item.value = await factoryParams.load(args);
|
|
@@ -32,7 +31,6 @@ export const useDetailsFactory = <Item extends { id?: string }>(factoryParams: U
|
|
|
32
31
|
if (validationState.value.valid) {
|
|
33
32
|
const res = await factoryParams.saveChanges?.(item as Item);
|
|
34
33
|
isModified.value = false;
|
|
35
|
-
isDirty = ref(false);
|
|
36
34
|
|
|
37
35
|
const id = item?.id ?? res?.id;
|
|
38
36
|
|
|
@@ -52,10 +50,13 @@ export const useDetailsFactory = <Item extends { id?: string }>(factoryParams: U
|
|
|
52
50
|
|
|
53
51
|
const validationState = computed(
|
|
54
52
|
(): IValidationState<Item> => ({
|
|
55
|
-
|
|
53
|
+
/**
|
|
54
|
+
* @deprecated `dirty` - use `modified` instead
|
|
55
|
+
*/
|
|
56
|
+
dirty: isModified.value,
|
|
56
57
|
valid: isFormValid.value,
|
|
57
58
|
modified: isModified.value,
|
|
58
|
-
disabled: isDisabled.value
|
|
59
|
+
disabled: isDisabled.value,
|
|
59
60
|
validated: !isDisabled.value && isModified.value,
|
|
60
61
|
cachedValue: itemTemp.value,
|
|
61
62
|
errorBag: errorBag.value,
|
|
@@ -89,7 +90,6 @@ export const useDetailsFactory = <Item extends { id?: string }>(factoryParams: U
|
|
|
89
90
|
|
|
90
91
|
const resetValidationState = () => {
|
|
91
92
|
isModified.value = false;
|
|
92
|
-
isDirty = ref(false);
|
|
93
93
|
};
|
|
94
94
|
|
|
95
95
|
return {
|