@vc-shell/framework 1.0.228 → 1.0.230
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 +18 -0
- package/core/types/index.ts +1 -0
- package/dist/core/types/index.d.ts +1 -0
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/framework.js +6183 -6182
- package/dist/shared/modules/dynamic/components/SchemaRender.d.ts +15 -12
- 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/helpers/nodeBuilder.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +1 -0
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts +1 -0
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/types/index.d.ts +28 -13
- package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.stories.d.ts +21 -21
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts +3 -3
- package/dist/ui/components/molecules/vc-select/vc-select.stories.d.ts +30 -30
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts +3 -3
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts +3 -3
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts +1 -1
- package/package.json +4 -4
- package/shared/modules/dynamic/components/SchemaRender.ts +8 -0
- package/shared/modules/dynamic/components/fields/InputCurrency.ts +6 -2
- package/shared/modules/dynamic/helpers/nodeBuilder.ts +11 -0
- package/shared/modules/dynamic/types/index.ts +33 -13
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +1 -1
|
@@ -14,12 +14,12 @@ declare const _default: <T extends {
|
|
|
14
14
|
max?: number | undefined;
|
|
15
15
|
regex?: string | undefined;
|
|
16
16
|
} | undefined;
|
|
17
|
-
property: T;
|
|
18
17
|
"onUpdate:model-value"?: ((data: {
|
|
19
18
|
readonly value: any;
|
|
20
19
|
readonly dictionary?: any[] | undefined;
|
|
21
20
|
readonly locale?: string | undefined;
|
|
22
21
|
}) => any) | undefined;
|
|
22
|
+
property: T;
|
|
23
23
|
multivalue?: boolean | undefined;
|
|
24
24
|
optionsGetter: (propertyId: string, keyword?: string, locale?: string) => Promise<any[] | undefined> | any[] | undefined;
|
|
25
25
|
valueType: string;
|
|
@@ -52,12 +52,12 @@ declare const _default: <T extends {
|
|
|
52
52
|
max?: number | undefined;
|
|
53
53
|
regex?: string | undefined;
|
|
54
54
|
} | undefined;
|
|
55
|
-
property: T;
|
|
56
55
|
"onUpdate:model-value"?: ((data: {
|
|
57
56
|
readonly value: any;
|
|
58
57
|
readonly dictionary?: any[] | undefined;
|
|
59
58
|
readonly locale?: string | undefined;
|
|
60
59
|
}) => any) | undefined;
|
|
60
|
+
property: T;
|
|
61
61
|
multivalue?: boolean | undefined;
|
|
62
62
|
optionsGetter: (propertyId: string, keyword?: string, locale?: string) => Promise<any[] | undefined> | any[] | undefined;
|
|
63
63
|
valueType: string;
|
|
@@ -94,12 +94,12 @@ declare const _default: <T extends {
|
|
|
94
94
|
max?: number | undefined;
|
|
95
95
|
regex?: string | undefined;
|
|
96
96
|
} | undefined;
|
|
97
|
-
property: T;
|
|
98
97
|
"onUpdate:model-value"?: ((data: {
|
|
99
98
|
readonly value: any;
|
|
100
99
|
readonly dictionary?: any[] | undefined;
|
|
101
100
|
readonly locale?: string | undefined;
|
|
102
101
|
}) => any) | undefined;
|
|
102
|
+
property: T;
|
|
103
103
|
multivalue?: boolean | undefined;
|
|
104
104
|
optionsGetter: (propertyId: string, keyword?: string, locale?: string) => Promise<any[] | undefined> | any[] | undefined;
|
|
105
105
|
valueType: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-dynamic-property.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.ts"],"names":[],"mappings":";;;;;UA6bU,MAAM;gBAZA,GAAG;cAML,OAAO
|
|
1
|
+
{"version":3,"file":"vc-dynamic-property.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.ts"],"names":[],"mappings":";;;;;UA6bU,MAAM;gBAZA,GAAG;cAML,OAAO;;;;;;;;;;wBA3X4B,GAAG;;;;cAoXtC,CAAC;;mBAEI,CACb,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,MAAM,KACZ,QAAQ,GAAG,EAAE,GAAG,SAAS,CAAC,GAAG,GAAG,EAAE,GAAG,SAAS;eAKxC,MAAM;;;;;;;;;WAuBd,GAAG;;;wBAtZuC,GAAG;;;;yCAqZpC,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,KAAG,IAAI;;;cApB/C,MAAM;oBAZA,GAAG;kBAML,OAAO;;;;;;;;;;4BA3X4B,GAAG;;;;kBAoXtC,CAAC;;uBAEI,CACb,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,MAAM,KACZ,QAAQ,GAAG,EAAE,GAAG,SAAS,CAAC,GAAG,GAAG,EAAE,GAAG,SAAS;mBAKxC,MAAM;;;;;;;;;oBAsBL,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;wBAtZuC,GAAG;;;;;;;;;;kBAiY1C,MAAM;wBAZA,GAAG;sBAML,OAAO;;;;;;;;;;gCA3X4B,GAAG;;;;sBAoXtC,CAAC;;2BAEI,CACb,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,MAAM,KACZ,QAAQ,GAAG,EAAE,GAAG,SAAS,CAAC,GAAG,GAAG,EAAE,GAAG,SAAS;uBAKxC,MAAM;;;;;;;;;wBAsBL,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;eAClD,GAAG;;;4BAtZuC,GAAG;;;;;;AAnDpD,wBA8c2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -17,8 +17,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
17
17
|
}>>> & {
|
|
18
18
|
onClose?: (() => any) | undefined;
|
|
19
19
|
}, {
|
|
20
|
-
index: number;
|
|
21
20
|
images: ICommonAsset[];
|
|
21
|
+
index: number;
|
|
22
22
|
}, {}>;
|
|
23
23
|
export default _default;
|
|
24
24
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/framework",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.230",
|
|
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.230",
|
|
64
|
+
"@vc-shell/config-generator": "^1.0.230",
|
|
65
|
+
"@vc-shell/ts-config": "^1.0.230",
|
|
66
66
|
"@vitejs/plugin-vue": "^5.0.3",
|
|
67
67
|
"sass": "^1.69.6",
|
|
68
68
|
"shx": "^0.3.4",
|
|
@@ -19,6 +19,7 @@ import { visibilityHandler } from "../helpers/visibilityHandler";
|
|
|
19
19
|
import { toValue } from "@vueuse/core";
|
|
20
20
|
import { safeIn } from "../helpers/safeIn";
|
|
21
21
|
import { unrefNested } from "../helpers/unrefNested";
|
|
22
|
+
import { usePermissions } from "../../../../core/composables";
|
|
22
23
|
|
|
23
24
|
const schemeRenderProps = {
|
|
24
25
|
context: {
|
|
@@ -48,6 +49,7 @@ export default defineComponent({
|
|
|
48
49
|
setup(props: ExtractPropTypes<typeof schemeRenderProps>, ctx) {
|
|
49
50
|
const { currentLocale } = toRefs(props);
|
|
50
51
|
const internalFormData = reactive({});
|
|
52
|
+
const { hasAccess } = usePermissions();
|
|
51
53
|
|
|
52
54
|
watch(
|
|
53
55
|
() => props.modelValue,
|
|
@@ -70,6 +72,12 @@ export default defineComponent({
|
|
|
70
72
|
"div",
|
|
71
73
|
{ class: "tw-flex tw-flex-col tw-gap-4" },
|
|
72
74
|
props.uiSchema.reduce((arr, field): VNode[] => {
|
|
75
|
+
console.log(field.id, field.permissions, hasAccess(field.permissions));
|
|
76
|
+
|
|
77
|
+
if (safeIn("permissions", field) && !hasAccess(field.permissions)) {
|
|
78
|
+
return arr;
|
|
79
|
+
}
|
|
80
|
+
|
|
73
81
|
if (
|
|
74
82
|
safeIn("visibility", field) &&
|
|
75
83
|
field.visibility?.method &&
|
|
@@ -15,8 +15,11 @@ export default {
|
|
|
15
15
|
setup(props: ExtractPropTypes<typeof componentProps> & { element: InputCurrencySchema }) {
|
|
16
16
|
return () => {
|
|
17
17
|
const options =
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
(safeIn("options", props.element) &&
|
|
19
|
+
props.element.options &&
|
|
20
|
+
(toValue(getModel(props.element.options, props.fieldContext ?? {})) ||
|
|
21
|
+
toValue(unref(props.bladeContext.scope)?.[props.element.options]))) ??
|
|
22
|
+
undefined;
|
|
20
23
|
|
|
21
24
|
const contextProperty =
|
|
22
25
|
safeIn("optionProperty", props.element) &&
|
|
@@ -34,6 +37,7 @@ export default {
|
|
|
34
37
|
{},
|
|
35
38
|
{
|
|
36
39
|
option: toValue(scopedProperty ?? contextProperty),
|
|
40
|
+
currencyDisplay: props.element.currencyDisplay,
|
|
37
41
|
optionLabel: props.element.optionLabel,
|
|
38
42
|
optionValue: props.element.optionValue,
|
|
39
43
|
options,
|
|
@@ -12,6 +12,9 @@ import { i18n } from "./../../../../core/plugins/i18n";
|
|
|
12
12
|
import { visibilityHandler } from "./visibilityHandler";
|
|
13
13
|
import { toRefs } from "@vueuse/core";
|
|
14
14
|
import { unrefNested } from "./unrefNested";
|
|
15
|
+
import { usePermissions } from "../../../../core/composables";
|
|
16
|
+
|
|
17
|
+
const { hasAccess } = usePermissions();
|
|
15
18
|
|
|
16
19
|
function disabledHandler(
|
|
17
20
|
disabled: { method?: string } | boolean,
|
|
@@ -165,6 +168,10 @@ function nodeBuilder<
|
|
|
165
168
|
if (toValue(model) && Array.isArray(toValue(model))) {
|
|
166
169
|
return toValue(model).map((modelItem: ToRefs<{ [x: string]: unknown; id: string }>) => {
|
|
167
170
|
return controlSchema.fields.reduce((arr, fieldItem) => {
|
|
171
|
+
if (safeIn("permissions", fieldItem) && !hasAccess(fieldItem.permissions)) {
|
|
172
|
+
return arr;
|
|
173
|
+
}
|
|
174
|
+
|
|
168
175
|
if (
|
|
169
176
|
safeIn("visibility", fieldItem) &&
|
|
170
177
|
fieldItem.visibility?.method &&
|
|
@@ -190,6 +197,10 @@ function nodeBuilder<
|
|
|
190
197
|
|
|
191
198
|
return [
|
|
192
199
|
controlSchema.fields.reduce((arr, field) => {
|
|
200
|
+
if (safeIn("permissions", field) && !hasAccess(field.permissions)) {
|
|
201
|
+
return arr;
|
|
202
|
+
}
|
|
203
|
+
|
|
193
204
|
if (
|
|
194
205
|
safeIn("visibility", field) &&
|
|
195
206
|
field.visibility?.method &&
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
} from "./../../../../ui/components";
|
|
14
14
|
import { ITableColumns, IValidationRules, MenuItemConfig } from "../../../../core/types";
|
|
15
15
|
import type { ComponentProps } from "./../../../utilities/vueUtils";
|
|
16
|
+
import VcInputCurrency from "../../../../ui/components/molecules/vc-input-currency/vc-input-currency.vue";
|
|
16
17
|
|
|
17
18
|
export type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
18
19
|
|
|
@@ -65,6 +66,11 @@ export type ToolbarSchema = {
|
|
|
65
66
|
title?: string;
|
|
66
67
|
icon?: string;
|
|
67
68
|
method: string;
|
|
69
|
+
/**
|
|
70
|
+
* Permissions for the toolbar button. If the user does not have the required permissions, the toolbar button will not be displayed.
|
|
71
|
+
* @type {string | string[]}
|
|
72
|
+
*/
|
|
73
|
+
permissions?: string | string[];
|
|
68
74
|
};
|
|
69
75
|
|
|
70
76
|
export interface SettingsBase {
|
|
@@ -277,6 +283,11 @@ export interface SchemaBase {
|
|
|
277
283
|
* Adds horizontal separator after component.
|
|
278
284
|
*/
|
|
279
285
|
horizontalSeparator?: boolean;
|
|
286
|
+
/**
|
|
287
|
+
* Permissions for the component. If the user does not have the required permissions, the component will not be displayed.
|
|
288
|
+
* @type {string | string[]}
|
|
289
|
+
*/
|
|
290
|
+
permissions?: string | string[];
|
|
280
291
|
}
|
|
281
292
|
|
|
282
293
|
/**
|
|
@@ -477,7 +488,8 @@ export interface InputSchema extends SchemaBase {
|
|
|
477
488
|
* Video schema interface.
|
|
478
489
|
* @interface
|
|
479
490
|
*/
|
|
480
|
-
export interface VideoSchema
|
|
491
|
+
export interface VideoSchema
|
|
492
|
+
extends Pick<SchemaBase, "id" | "property" | "label" | "visibility" | "tooltip" | "permissions"> {
|
|
481
493
|
/**
|
|
482
494
|
* Component type for video.
|
|
483
495
|
* @type {"vc-video"}
|
|
@@ -490,7 +502,10 @@ export interface VideoSchema extends Pick<SchemaBase, "id" | "property" | "label
|
|
|
490
502
|
* @interface
|
|
491
503
|
*/
|
|
492
504
|
export interface FieldSchema
|
|
493
|
-
extends Pick<
|
|
505
|
+
extends Pick<
|
|
506
|
+
SchemaBase,
|
|
507
|
+
"id" | "property" | "label" | "visibility" | "tooltip" | "horizontalSeparator" | "permissions"
|
|
508
|
+
> {
|
|
494
509
|
/**
|
|
495
510
|
* Component type for field.
|
|
496
511
|
* @type {"vc-field"}
|
|
@@ -525,7 +540,7 @@ export interface FieldSchema
|
|
|
525
540
|
* Image schema interface.
|
|
526
541
|
* @interface
|
|
527
542
|
*/
|
|
528
|
-
export interface ImageSchema extends Pick<SchemaBase, "id" | "property" | "visibility"> {
|
|
543
|
+
export interface ImageSchema extends Pick<SchemaBase, "id" | "property" | "visibility" | "permissions"> {
|
|
529
544
|
/**
|
|
530
545
|
* Component type for image.
|
|
531
546
|
* @type {"vc-image"}
|
|
@@ -562,7 +577,7 @@ export interface ImageSchema extends Pick<SchemaBase, "id" | "property" | "visib
|
|
|
562
577
|
* Status schema interface.
|
|
563
578
|
* @interface
|
|
564
579
|
*/
|
|
565
|
-
export interface StatusSchema extends Pick<SchemaBase, "id" | "visibility" | "horizontalSeparator"> {
|
|
580
|
+
export interface StatusSchema extends Pick<SchemaBase, "id" | "visibility" | "horizontalSeparator" | "permissions"> {
|
|
566
581
|
/**
|
|
567
582
|
* Component type for status.
|
|
568
583
|
* @type {"vc-status"}
|
|
@@ -630,7 +645,7 @@ export interface InputCurrencySchema extends Omit<SchemaBase, "multilanguage"> {
|
|
|
630
645
|
* List of currency options to be displayed in the dropdown.
|
|
631
646
|
* @description Array should be defined in the blade `scope`.
|
|
632
647
|
*/
|
|
633
|
-
options
|
|
648
|
+
options?: string;
|
|
634
649
|
/**
|
|
635
650
|
* Name of property that holds currency value.
|
|
636
651
|
* @type {string}
|
|
@@ -657,6 +672,10 @@ export interface InputCurrencySchema extends Omit<SchemaBase, "multilanguage"> {
|
|
|
657
672
|
* Text below control.
|
|
658
673
|
*/
|
|
659
674
|
hint?: string;
|
|
675
|
+
/**
|
|
676
|
+
* How to show the currency.
|
|
677
|
+
*/
|
|
678
|
+
currencyDisplay?: ComponentProps<typeof VcInputCurrency>["currencyDisplay"];
|
|
660
679
|
}
|
|
661
680
|
|
|
662
681
|
/**
|
|
@@ -686,7 +705,7 @@ export interface EditorSchema extends Omit<SchemaBase, "onBlur"> {
|
|
|
686
705
|
* @interface
|
|
687
706
|
*/
|
|
688
707
|
export interface DynamicPropertiesSchema
|
|
689
|
-
extends Pick<SchemaBase, "id" | "disabled" | "property" | "visibility" | "horizontalSeparator"> {
|
|
708
|
+
extends Pick<SchemaBase, "id" | "disabled" | "property" | "visibility" | "horizontalSeparator" | "permissions"> {
|
|
690
709
|
/**
|
|
691
710
|
* The component type for dynamic properties.
|
|
692
711
|
* @type {"vc-dynamic-properties"}
|
|
@@ -745,7 +764,8 @@ export interface GallerySchema
|
|
|
745
764
|
* Interface for a card schema.
|
|
746
765
|
* @interface
|
|
747
766
|
*/
|
|
748
|
-
export interface CardSchema
|
|
767
|
+
export interface CardSchema
|
|
768
|
+
extends RequiredBy<Pick<SchemaBase, "id" | "label" | "visibility" | "permissions">, "label"> {
|
|
749
769
|
/**
|
|
750
770
|
* Component type for the card.
|
|
751
771
|
* @type {"vc-card"}
|
|
@@ -784,7 +804,7 @@ export interface CardSchema extends RequiredBy<Pick<SchemaBase, "id" | "label" |
|
|
|
784
804
|
variant?: ComponentProps<typeof VcCard>["variant"];
|
|
785
805
|
}
|
|
786
806
|
|
|
787
|
-
export interface WidgetsSchema extends Pick<SchemaBase, "id" | "horizontalSeparator"> {
|
|
807
|
+
export interface WidgetsSchema extends Pick<SchemaBase, "id" | "horizontalSeparator" | "permissions"> {
|
|
788
808
|
component: "vc-widgets";
|
|
789
809
|
children: string[];
|
|
790
810
|
}
|
|
@@ -842,7 +862,7 @@ export interface RadioButtonSchema extends Omit<SchemaBase, "multilanguage" | "p
|
|
|
842
862
|
* Fieldset schema interface.
|
|
843
863
|
* @interface
|
|
844
864
|
*/
|
|
845
|
-
export interface FieldsetSchema extends Pick<SchemaBase, "id" | "visibility" | "horizontalSeparator"> {
|
|
865
|
+
export interface FieldsetSchema extends Pick<SchemaBase, "id" | "visibility" | "horizontalSeparator" | "permissions"> {
|
|
846
866
|
/**
|
|
847
867
|
* Component type for the fieldset.
|
|
848
868
|
* @type {"vc-fieldset"}
|
|
@@ -896,7 +916,7 @@ export interface SwitchSchema extends Omit<SchemaBase, "placeholder" | "multilan
|
|
|
896
916
|
}
|
|
897
917
|
|
|
898
918
|
export type TableSchema = Omit<ListContentSchema, "filter"> &
|
|
899
|
-
Pick<SchemaBase, "id" | "property" | "visibility"> & {
|
|
919
|
+
Pick<SchemaBase, "id" | "property" | "visibility" | "permissions"> & {
|
|
900
920
|
/**
|
|
901
921
|
* Configuration for the add new row button in the table.
|
|
902
922
|
* Used when table is in editing mode.
|
|
@@ -923,7 +943,7 @@ export type TableSchema = Omit<ListContentSchema, "filter"> &
|
|
|
923
943
|
* Button schema interface.
|
|
924
944
|
* @interface
|
|
925
945
|
*/
|
|
926
|
-
export interface ButtonSchema extends Pick<SchemaBase, "id" | "disabled" | "visibility"> {
|
|
946
|
+
export interface ButtonSchema extends Pick<SchemaBase, "id" | "disabled" | "visibility" | "permissions"> {
|
|
927
947
|
/**
|
|
928
948
|
* Component type.
|
|
929
949
|
* @type {"vc-button"}
|
|
@@ -981,7 +1001,7 @@ export interface ButtonSchema extends Pick<SchemaBase, "id" | "disabled" | "visi
|
|
|
981
1001
|
* Custom component schema interface.
|
|
982
1002
|
* @interface
|
|
983
1003
|
*/
|
|
984
|
-
export interface CustomComponentSchema extends Pick<SchemaBase, "id" | "visibility"> {
|
|
1004
|
+
export interface CustomComponentSchema extends Pick<SchemaBase, "id" | "visibility" | "permissions"> {
|
|
985
1005
|
/**
|
|
986
1006
|
* Component type for custom component.
|
|
987
1007
|
* @type {vc-custom}
|
|
@@ -1000,7 +1020,7 @@ export interface CustomComponentSchema extends Pick<SchemaBase, "id" | "visibili
|
|
|
1000
1020
|
export interface RatingSchema
|
|
1001
1021
|
extends Pick<
|
|
1002
1022
|
SchemaBase,
|
|
1003
|
-
"id" | "visibility" | "label" | "property" | "tooltip" | "horizontalSeparator" | "placeholder"
|
|
1023
|
+
"id" | "visibility" | "label" | "property" | "tooltip" | "horizontalSeparator" | "placeholder" | "permissions"
|
|
1004
1024
|
> {
|
|
1005
1025
|
/**
|
|
1006
1026
|
* Component type for rating.
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
:key="item.id"
|
|
11
11
|
>
|
|
12
12
|
<VcBladeToolbarButton
|
|
13
|
-
v-if="item.isVisible === undefined || item.isVisible"
|
|
13
|
+
v-if="$hasAccess(item.permissions) && (item.isVisible === undefined || item.isVisible)"
|
|
14
14
|
:is-expanded="isExpanded"
|
|
15
15
|
:icon="item.icon"
|
|
16
16
|
:title="unref(item.title)"
|