@vc-shell/framework 1.0.316 → 1.0.317
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 +9 -0
- package/dist/{azuread-BEDyfp-B.js → azuread-CzkVV9sc.js} +2 -2
- package/dist/{external-provider-DcC1zWEO.js → external-provider-CPsTBAfq.js} +1 -1
- package/dist/{external-provider.vue_vue_type_script_setup_true_lang-hFbmyZWT.js → external-provider.vue_vue_type_script_setup_true_lang-CDpDapgk.js} +1 -1
- package/dist/external-providers-DXvj7iZI.js +4 -0
- package/dist/framework.js +1 -1
- package/dist/{index-6F462Mrq.js → index-BBFraQ5T.js} +1 -1
- package/dist/{index-BbfER0VL.js → index-BH1SWYuT.js} +1 -1
- package/dist/{index-Dv2ufjAS.js → index-B_-PsIBV.js} +1 -1
- package/dist/{index-COuMdMeQ.js → index-Bq1JV4YO.js} +1 -1
- package/dist/{index-AMbx22gV.js → index-BuvUtKmW.js} +1 -1
- package/dist/{index-DnZAnO6v.js → index-ByZzd7pM.js} +1 -1
- package/dist/{index-CZdHpD3e.js → index-CVz5_LNN.js} +1 -1
- package/dist/{index-BCwBSU0q.js → index-Cg9ANNT7.js} +3849 -3843
- package/dist/{index-Dgg3HMbU.js → index-DBsWYmzw.js} +1 -1
- package/dist/{index-BJ_5CrUU.js → index-DT1yjDi6.js} +1 -1
- package/dist/{index-z96MJ7sA.js → index-DXj7lY_8.js} +1 -1
- package/dist/{index-BGTS5Q7U.js → index-DZ9WtXgZ.js} +1 -1
- package/dist/{index-BKlPQn8r.js → index-DdHIKwAZ.js} +1 -1
- package/dist/{index-DGBgF-kf.js → index-DgPCJvJl.js} +1 -1
- package/dist/{index-pU2xkDC8.js → index-Dn0aZ23J.js} +1 -1
- package/dist/{index-CSSjUHre.js → index-VHgRkdCh.js} +1 -1
- package/dist/{index-VTtDxdEo.js → index-Z8V8A_9d.js} +1 -1
- package/dist/shared/modules/dynamic/components/SchemaRender.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/Button.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/Button.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/Card.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/Card.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/Checkbox.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/Checkbox.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/ContentField.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/ContentField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/CustomComponent.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/CustomComponent.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/DynamicProperty.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/DynamicProperty.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/EditorField.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/EditorField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/Fieldset.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/Fieldset.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/GalleryField.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/GalleryField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/ImageField.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/ImageField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/InputCurrency.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/InputCurrency.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/InputField.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/InputField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/MultivalueField.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/MultivalueField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/RadioButtonGroup.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/RadioButtonGroup.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/RatingField.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/RatingField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/SelectField.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/SelectField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/StatusField.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/StatusField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/SwitchField.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/SwitchField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/Table.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/Table.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/TextareaField.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/TextareaField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/VideoField.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/VideoField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/props.d.ts +1 -0
- package/dist/shared/modules/dynamic/components/fields/props.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/Button.stories.d.ts +3 -0
- package/dist/shared/modules/dynamic/components/fields/storybook/Button.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/Card.stories.d.ts +3 -0
- package/dist/shared/modules/dynamic/components/fields/storybook/Card.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/Checkbox.stories.d.ts +3 -0
- package/dist/shared/modules/dynamic/components/fields/storybook/Checkbox.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/ContentField.stories.d.ts +3 -0
- package/dist/shared/modules/dynamic/components/fields/storybook/ContentField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/EditorField.stories.d.ts +3 -0
- package/dist/shared/modules/dynamic/components/fields/storybook/EditorField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/Fieldset.stories.d.ts +3 -0
- package/dist/shared/modules/dynamic/components/fields/storybook/Fieldset.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/GalleryField.stories.d.ts +3 -0
- package/dist/shared/modules/dynamic/components/fields/storybook/GalleryField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/ImageField.stories.d.ts +3 -0
- package/dist/shared/modules/dynamic/components/fields/storybook/ImageField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/InputCurrency.stories.d.ts +3 -0
- package/dist/shared/modules/dynamic/components/fields/storybook/InputCurrency.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/InputField.stories.d.ts +3 -0
- package/dist/shared/modules/dynamic/components/fields/storybook/InputField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/MultivalueField.stories.d.ts +3 -0
- package/dist/shared/modules/dynamic/components/fields/storybook/MultivalueField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/RadioButtonGroup.stories.d.ts +3 -0
- package/dist/shared/modules/dynamic/components/fields/storybook/RadioButtonGroup.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/RatingField.stories.d.ts +3 -0
- package/dist/shared/modules/dynamic/components/fields/storybook/RatingField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/SelectField.stories.d.ts +3 -0
- package/dist/shared/modules/dynamic/components/fields/storybook/SelectField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/StatusField.stories.d.ts +3 -0
- package/dist/shared/modules/dynamic/components/fields/storybook/StatusField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/TextareaField.stories.d.ts +3 -0
- package/dist/shared/modules/dynamic/components/fields/storybook/TextareaField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/VideoField.stories.d.ts +3 -0
- package/dist/shared/modules/dynamic/components/fields/storybook/VideoField.stories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/pages/DynamicRender.d.ts +3 -0
- package/dist/shared/modules/dynamic/components/fields/storybook/pages/DynamicRender.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/factories/types/index.d.ts +1 -0
- package/dist/shared/modules/dynamic/factories/types/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/helpers/methodHandler.d.ts +4 -0
- package/dist/shared/modules/dynamic/helpers/methodHandler.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +2 -0
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/types/index.d.ts +7 -0
- package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/shared/modules/dynamic/components/SchemaRender.ts +9 -5
- package/shared/modules/dynamic/components/fields/DynamicProperty.ts +3 -0
- package/shared/modules/dynamic/components/fields/InputField.ts +9 -1
- package/shared/modules/dynamic/factories/types/index.ts +1 -0
- package/shared/modules/dynamic/helpers/{visibilityHandler.ts → methodHandler.ts} +2 -2
- package/shared/modules/dynamic/helpers/nodeBuilder.ts +3 -3
- package/shared/modules/dynamic/types/index.ts +7 -0
- package/dist/external-providers-ooV6TgBS.js +0 -4
- package/dist/shared/modules/dynamic/helpers/visibilityHandler.d.ts +0 -4
- package/dist/shared/modules/dynamic/helpers/visibilityHandler.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/framework",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.317",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/framework.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/dompurify": "^3.0.5",
|
|
62
|
-
"@vc-shell/api-client-generator": "^1.0.
|
|
63
|
-
"@vc-shell/config-generator": "^1.0.
|
|
64
|
-
"@vc-shell/ts-config": "^1.0.
|
|
62
|
+
"@vc-shell/api-client-generator": "^1.0.317",
|
|
63
|
+
"@vc-shell/config-generator": "^1.0.317",
|
|
64
|
+
"@vc-shell/ts-config": "^1.0.317",
|
|
65
65
|
"@vitejs/plugin-vue": "5.0.3",
|
|
66
66
|
"cypress-signalr-mock": "^1.5.0",
|
|
67
67
|
"sass": "^1.69.6",
|
|
@@ -15,7 +15,7 @@ import { ControlSchema } from "../types";
|
|
|
15
15
|
import * as _ from "lodash-es";
|
|
16
16
|
import { DetailsBladeContext } from "../factories/types";
|
|
17
17
|
import { nodeBuilder } from "../helpers/nodeBuilder";
|
|
18
|
-
import {
|
|
18
|
+
import { methodHandler } from "../helpers/methodHandler";
|
|
19
19
|
import { toValue } from "@vueuse/core";
|
|
20
20
|
import { safeIn } from "../helpers/safeIn";
|
|
21
21
|
import { unrefNested } from "../helpers/unrefNested";
|
|
@@ -53,14 +53,18 @@ export default defineComponent({
|
|
|
53
53
|
|
|
54
54
|
watch(
|
|
55
55
|
() => props.modelValue,
|
|
56
|
-
(newVal) => {
|
|
57
|
-
|
|
56
|
+
(newVal): void => {
|
|
57
|
+
if (!_.isEqual(internalFormData, toRefs(newVal))) {
|
|
58
|
+
Object.assign(internalFormData, toRefs(newVal));
|
|
59
|
+
}
|
|
58
60
|
},
|
|
59
61
|
{ deep: true, immediate: true },
|
|
60
62
|
);
|
|
61
63
|
|
|
62
64
|
function updateFormData(newVal: ToRefs<unknown>) {
|
|
63
|
-
|
|
65
|
+
if (!_.isEqual(toRefs(newVal), internalFormData)) {
|
|
66
|
+
ctx.emit("update:modelValue", unrefNested(newVal));
|
|
67
|
+
}
|
|
64
68
|
}
|
|
65
69
|
|
|
66
70
|
return () =>
|
|
@@ -75,7 +79,7 @@ export default defineComponent({
|
|
|
75
79
|
if (
|
|
76
80
|
safeIn("visibility", field) &&
|
|
77
81
|
field.visibility?.method &&
|
|
78
|
-
!
|
|
82
|
+
!methodHandler(toValue(props.context?.scope)?.[field.visibility.method], props.context, field)
|
|
79
83
|
) {
|
|
80
84
|
return arr;
|
|
81
85
|
}
|
|
@@ -71,6 +71,8 @@ export default {
|
|
|
71
71
|
exclude: props.element?.exclude,
|
|
72
72
|
});
|
|
73
73
|
|
|
74
|
+
const initialProps = _.cloneDeep(dynamicProps.value);
|
|
75
|
+
|
|
74
76
|
const properties: UnwrapNestedRefs<IDynamicProperties[]> = reactiveComputed(() => {
|
|
75
77
|
return (dynamicProps.value || [])?.map((prop) =>
|
|
76
78
|
DynamicProperties({
|
|
@@ -99,6 +101,7 @@ export default {
|
|
|
99
101
|
value: args.value,
|
|
100
102
|
dictionary: args.dictionary,
|
|
101
103
|
locale: args.locale,
|
|
104
|
+
initialProp: _.cloneDeep(initialProps?.find((x) => x.id === prop.id)),
|
|
102
105
|
});
|
|
103
106
|
if (props.fieldContext) {
|
|
104
107
|
setModel({ context: props.fieldContext, property: props.element.property, value: internalModel.value });
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { ExtractPropTypes, h, VNode, Component } from "vue";
|
|
1
|
+
import { ExtractPropTypes, h, VNode, Component, toValue } from "vue";
|
|
2
2
|
import { InputField } from "../factories";
|
|
3
3
|
import componentProps from "./props";
|
|
4
4
|
import ValidationField from "./ValidationField";
|
|
5
5
|
import { InputSchema, ControlSchema } from "../../types";
|
|
6
6
|
import { nodeBuilder } from "../../helpers/nodeBuilder";
|
|
7
7
|
import { unrefNested } from "../../helpers/unrefNested";
|
|
8
|
+
import { methodHandler } from "../../helpers/methodHandler";
|
|
8
9
|
|
|
9
10
|
const slotsMap = {
|
|
10
11
|
append: "append",
|
|
@@ -27,6 +28,13 @@ export default {
|
|
|
27
28
|
clearable: props.element.clearable || false,
|
|
28
29
|
maxlength: props.element.maxlength,
|
|
29
30
|
datePickerOptions: props.element.datePickerOptions,
|
|
31
|
+
loading: props.element.loading?.method
|
|
32
|
+
? methodHandler(
|
|
33
|
+
toValue(props.bladeContext?.scope)?.[props.element.loading?.method],
|
|
34
|
+
props.fieldContext,
|
|
35
|
+
props.element,
|
|
36
|
+
)
|
|
37
|
+
: false,
|
|
30
38
|
},
|
|
31
39
|
unrefNested(props.baseProps),
|
|
32
40
|
{
|
|
@@ -167,6 +167,7 @@ export interface DetailsBaseBladeScope<Item = Record<string, any>> extends BaseB
|
|
|
167
167
|
value: string | Record<string, any>[];
|
|
168
168
|
dictionary?: Record<string, any>[];
|
|
169
169
|
locale?: string;
|
|
170
|
+
initialProp?: Record<string, any>;
|
|
170
171
|
}) => void;
|
|
171
172
|
};
|
|
172
173
|
assetsHandler?: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ControlSchema } from "
|
|
1
|
+
import { ControlSchema } from "../types/index";
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
3
|
import { ComputedRef, toValue } from "vue";
|
|
4
4
|
|
|
5
|
-
export const
|
|
5
|
+
export const methodHandler = (
|
|
6
6
|
visibility:
|
|
7
7
|
| ComputedRef<boolean | undefined>
|
|
8
8
|
| ((schema: ControlSchema, fieldContext: Record<string, any> | undefined) => boolean)
|
|
@@ -9,7 +9,7 @@ import { unwrapInterpolation } from "./unwrapInterpolation";
|
|
|
9
9
|
import { DetailsBladeContext } from "../factories";
|
|
10
10
|
import { safeIn } from "./safeIn";
|
|
11
11
|
import { i18n } from "./../../../../core/plugins/i18n";
|
|
12
|
-
import {
|
|
12
|
+
import { methodHandler } from "./methodHandler";
|
|
13
13
|
import { toRefs } from "@vueuse/core";
|
|
14
14
|
import { unrefNested } from "./unrefNested";
|
|
15
15
|
import { usePermissions } from "../../../../core/composables";
|
|
@@ -176,7 +176,7 @@ function nodeBuilder<
|
|
|
176
176
|
if (
|
|
177
177
|
safeIn("visibility", fieldItem) &&
|
|
178
178
|
fieldItem.visibility?.method &&
|
|
179
|
-
!
|
|
179
|
+
!methodHandler(bladeContext.scope?.[fieldItem.visibility?.method], modelItem, fieldItem)
|
|
180
180
|
) {
|
|
181
181
|
return arr;
|
|
182
182
|
}
|
|
@@ -205,7 +205,7 @@ function nodeBuilder<
|
|
|
205
205
|
if (
|
|
206
206
|
safeIn("visibility", field) &&
|
|
207
207
|
field.visibility?.method &&
|
|
208
|
-
!
|
|
208
|
+
!methodHandler(bladeContext.scope?.[field.visibility?.method], internalContext, field)
|
|
209
209
|
) {
|
|
210
210
|
return arr;
|
|
211
211
|
}
|
|
@@ -495,6 +495,13 @@ export interface InputSchema extends SchemaBase {
|
|
|
495
495
|
* Datepicker options.
|
|
496
496
|
*/
|
|
497
497
|
datePickerOptions?: ComponentProps<typeof VcInput>["datePickerOptions"];
|
|
498
|
+
/**
|
|
499
|
+
* Whether the input is in loading state or not.
|
|
500
|
+
* @type {boolean}
|
|
501
|
+
*/
|
|
502
|
+
loading?: {
|
|
503
|
+
method: string;
|
|
504
|
+
};
|
|
498
505
|
}
|
|
499
506
|
|
|
500
507
|
/**
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ControlSchema } from "./../types/index";
|
|
2
|
-
import { ComputedRef } from "vue";
|
|
3
|
-
export declare const visibilityHandler: (visibility: ComputedRef<boolean | undefined> | ((schema: ControlSchema, fieldContext: Record<string, any> | undefined) => boolean) | undefined, fieldContext: Record<string, any> | undefined, schema: ControlSchema) => boolean | undefined;
|
|
4
|
-
//# sourceMappingURL=visibilityHandler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"visibilityHandler.d.ts","sourceRoot":"","sources":["../../../../../shared/modules/dynamic/helpers/visibilityHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAW,MAAM,KAAK,CAAC;AAE3C,eAAO,MAAM,iBAAiB,4DAGd,aAAa,gBAAgB,OAAO,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,KAAK,OAAO,6BAExE,OAAO,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,UACrC,aAAa,wBAWtB,CAAC"}
|