@vc-shell/framework 1.0.147 → 1.0.149
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 +21 -0
- package/core/composables/index.ts +1 -1
- package/core/composables/useLanguages/index.ts +52 -0
- package/core/plugins/i18n/index.ts +1 -1
- package/core/plugins/modularity/index.ts +10 -1
- package/core/plugins/validation/index.ts +0 -11
- package/core/plugins/validation/rules.ts +7 -6
- package/dist/core/composables/index.d.ts +1 -1
- package/dist/core/composables/index.d.ts.map +1 -1
- package/dist/core/composables/useLanguages/index.d.ts +12 -0
- package/dist/core/composables/useLanguages/index.d.ts.map +1 -0
- package/dist/core/plugins/modularity/index.d.ts.map +1 -1
- package/dist/core/plugins/validation/index.d.ts +0 -3
- package/dist/core/plugins/validation/index.d.ts.map +1 -1
- package/dist/core/plugins/validation/rules.d.ts +1 -1
- package/dist/core/plugins/validation/rules.d.ts.map +1 -1
- package/dist/framework.js +11732 -10993
- package/dist/index.css +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/shared/components/app-switcher/composables/useAppSwitcher/index.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.d.ts +0 -12
- package/dist/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts +6 -3
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/plugin.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/types/index.d.ts +6 -8
- package/dist/shared/components/blade-navigation/types/index.d.ts.map +1 -1
- package/dist/shared/components/language-selector/language-selector.vue.d.ts.map +1 -1
- package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/SchemaRender.d.ts +3 -3
- package/dist/shared/modules/dynamic/components/fields/Button.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/Card.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/Checkbox.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/ContentField.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/DynamicProperty.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/EditorField.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/Fieldset.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/GalleryField.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/ImageField.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/InputCurrency.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/InputField.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/MultivalueField.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/SelectField.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/StatusField.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/TextareaField.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/VideoField.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/fields/props.d.ts +1 -1
- package/dist/shared/modules/dynamic/factories/types/index.d.ts +1 -1
- package/dist/shared/modules/dynamic/factories/types/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/helpers/nodeBuilder.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/helpers/override.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +3 -1
- 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 +2 -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 +13 -4
- package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/package.json +6 -5
- package/shared/components/app-switcher/composables/useAppSwitcher/index.ts +2 -1
- package/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +12 -26
- package/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.ts +18 -11
- package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +231 -337
- package/shared/components/blade-navigation/plugin.ts +2 -1
- package/shared/components/blade-navigation/types/index.ts +5 -11
- package/shared/components/language-selector/language-selector.vue +12 -10
- package/shared/components/notification-dropdown/notification-dropdown.vue +1 -1
- package/shared/components/user-dropdown-button/user-dropdown-button.vue +55 -40
- package/shared/modules/dynamic/factories/types/index.ts +1 -1
- package/shared/modules/dynamic/helpers/nodeBuilder.ts +6 -3
- package/shared/modules/dynamic/helpers/override.ts +29 -11
- package/shared/modules/dynamic/index.ts +1 -0
- package/shared/modules/dynamic/pages/dynamic-blade-form.vue +47 -17
- package/shared/modules/dynamic/pages/dynamic-blade-list.vue +11 -1
- package/shared/modules/dynamic/types/index.ts +13 -4
- package/ui/components/atoms/vc-label/vc-label.vue +18 -19
- package/ui/components/molecules/vc-multivalue/vc-multivalue.vue +1 -0
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +5 -19
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +1 -1
- package/ui/components/organisms/vc-app/vc-app.vue +2 -8
- package/core/composables/useI18n/index.ts +0 -7
- package/dist/core/composables/useI18n/index.d.ts +0 -3
- package/dist/core/composables/useI18n/index.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-app-bar.vue.d.ts","sourceRoot":"","sources":["../../../../../../../ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAI/D,MAAM,WAAW,KAAK;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,KAAK;IACpB,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IAC5B,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAChC,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAClC,CAAC,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;CACpD;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"vc-app-bar.vue.d.ts","sourceRoot":"","sources":["../../../../../../../ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAI/D,MAAM,WAAW,KAAK;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,KAAK;IACpB,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IAC5B,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAChC,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAClC,CAAC,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;CACpD;;;;;;;;;;;;;;;AA2OD,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-app.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-app/vc-app.vue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vc-app.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-app/vc-app.vue.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,KAAK;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4aD,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/framework",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.149",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/framework.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -38,13 +38,14 @@
|
|
|
38
38
|
"@vueuse/integrations": "^10.7.1",
|
|
39
39
|
"ace-builds": "^1.32.2",
|
|
40
40
|
"core-js": "^3.35.0",
|
|
41
|
+
"iso-639-1": "^3.1.0",
|
|
41
42
|
"moment": "^2.30.1",
|
|
42
43
|
"normalize.css": "^8.0.1",
|
|
43
44
|
"quill": "^1.3.7",
|
|
44
45
|
"quill-image-uploader": "^1.3.0",
|
|
45
46
|
"swiper": "^6.8.4",
|
|
46
47
|
"vee-validate": "^4.12.4",
|
|
47
|
-
"vue": "^3.4.
|
|
48
|
+
"vue": "^3.4.14",
|
|
48
49
|
"vue-currency-input": "^3.0.5",
|
|
49
50
|
"vue-i18n": "^9.8.0",
|
|
50
51
|
"vue-router": "^4.2.5",
|
|
@@ -52,9 +53,9 @@
|
|
|
52
53
|
"whatwg-fetch": "^3.6.19"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
|
-
"@vc-shell/api-client-generator": "^1.0.
|
|
56
|
-
"@vc-shell/config-generator": "^1.0.
|
|
57
|
-
"@vc-shell/ts-config": "^1.0.
|
|
56
|
+
"@vc-shell/api-client-generator": "^1.0.149",
|
|
57
|
+
"@vc-shell/config-generator": "^1.0.149",
|
|
58
|
+
"@vc-shell/ts-config": "^1.0.149",
|
|
58
59
|
"@vitejs/plugin-vue": "^5.0.3",
|
|
59
60
|
"sass": "^1.69.6",
|
|
60
61
|
"typescript": "^5.3.3",
|
|
@@ -2,6 +2,7 @@ import { computed, Ref, ref } from "vue";
|
|
|
2
2
|
import { AppDescriptor, AppsClient } from "../../../../../core/api/platform";
|
|
3
3
|
import { usePermissions } from "../../../../../core/composables";
|
|
4
4
|
import { notification } from "./../../../notifications";
|
|
5
|
+
import { i18n } from "../../../../../core/plugins";
|
|
5
6
|
|
|
6
7
|
interface IUseAppSwitcher {
|
|
7
8
|
readonly appsList: Ref<AppDescriptor[]>;
|
|
@@ -37,7 +38,7 @@ export function useAppSwitcher(): IUseAppSwitcher {
|
|
|
37
38
|
window.location.href = window.location.origin + app.relativeUrl;
|
|
38
39
|
}
|
|
39
40
|
} else {
|
|
40
|
-
notification.error("
|
|
41
|
+
notification.error(i18n.global.t("PERMISSION_MESSAGES.ACCESS_RESTRICTED"), {
|
|
41
42
|
timeout: 3000,
|
|
42
43
|
});
|
|
43
44
|
}
|
package/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue
CHANGED
|
@@ -1,32 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="tw-w-full tw-overflow-hidden tw-flex tw-grow tw-basis-0 tw-relative">
|
|
3
3
|
<ErrorInterceptor
|
|
4
|
-
v-for="(
|
|
4
|
+
v-for="(bladeVNode, index) in blades"
|
|
5
5
|
v-slot="{ error, reset }"
|
|
6
|
-
:key="
|
|
6
|
+
:key="index"
|
|
7
7
|
capture
|
|
8
8
|
>
|
|
9
|
-
<router-view
|
|
10
|
-
v-show="index >= quantity - ($isMobile.value ? 1 : 2)"
|
|
11
|
-
v-slot="{ Component }"
|
|
12
|
-
:key="key"
|
|
13
|
-
:name="key"
|
|
14
|
-
>
|
|
9
|
+
<router-view v-show="index >= quantity - ($isMobile.value ? 1 : 2)">
|
|
15
10
|
<VcBladeView
|
|
16
|
-
v-slot="{
|
|
17
|
-
:key="
|
|
18
|
-
:blade="
|
|
19
|
-
:name="key"
|
|
20
|
-
:idx="index"
|
|
11
|
+
v-slot="{ Component }"
|
|
12
|
+
:key="bladeVNode.type?.name || `blade_${index}`"
|
|
13
|
+
:blade="bladeVNode"
|
|
21
14
|
>
|
|
22
15
|
<component
|
|
23
|
-
:is="
|
|
16
|
+
:is="Component"
|
|
24
17
|
:ref="refs.set"
|
|
25
|
-
:key="blade.props.navigation?.uniqueRouteKey ?? 0"
|
|
26
18
|
:error="error"
|
|
27
19
|
:closable="index >= 1"
|
|
28
|
-
:expandable="
|
|
29
|
-
:expanded="index ===
|
|
20
|
+
:expandable="quantity > 1"
|
|
21
|
+
:expanded="index === quantity - 1"
|
|
30
22
|
@close:blade="closeBlade(index)"
|
|
31
23
|
@parent:call="onParentCall(refs[index - 1], $event)"
|
|
32
24
|
@vue:before-unmount="reset"
|
|
@@ -40,22 +32,16 @@
|
|
|
40
32
|
|
|
41
33
|
<script lang="ts" setup>
|
|
42
34
|
import { computed } from "vue";
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
35
|
+
import { RouterView } from "vue-router";
|
|
36
|
+
import { useBladeNavigation } from "./../../../../../shared";
|
|
45
37
|
import { ErrorInterceptor } from "./../../../error-interceptor";
|
|
46
38
|
import { VcBladeView } from "./../vc-blade-view/vc-blade-view";
|
|
47
39
|
import { useTemplateRefsList } from "@vueuse/core";
|
|
48
40
|
|
|
49
41
|
const { blades, closeBlade, onParentCall } = useBladeNavigation();
|
|
50
42
|
|
|
51
|
-
const router = useRouter();
|
|
52
|
-
|
|
53
43
|
const quantity = computed(() => {
|
|
54
|
-
return
|
|
55
|
-
(router.currentRoute.value.matched[1]?.components &&
|
|
56
|
-
Object.keys(router.currentRoute.value.matched[1].components).length) ||
|
|
57
|
-
0
|
|
58
|
-
);
|
|
44
|
+
return blades.value.length || 0;
|
|
59
45
|
});
|
|
60
46
|
|
|
61
47
|
const refs = useTemplateRefsList<HTMLDivElement>();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Slot, defineComponent, h, provide, ref, VNode, PropType, Component } from "vue";
|
|
1
|
+
import { Slot, defineComponent, h, provide, ref, VNode, PropType, Component, watch } from "vue";
|
|
2
2
|
import { navigationViewLocation } from "./../../injectionKeys";
|
|
3
|
-
import { BladeVNode } from "../../types";
|
|
3
|
+
import { BladeVNode, CoreBladeExposed } from "../../types";
|
|
4
|
+
import { toRef } from "@vueuse/core";
|
|
4
5
|
|
|
5
6
|
export const VcBladeView = defineComponent({
|
|
6
7
|
name: "BladeView",
|
|
@@ -9,17 +10,22 @@ export const VcBladeView = defineComponent({
|
|
|
9
10
|
blade: {
|
|
10
11
|
type: Object as PropType<BladeVNode>,
|
|
11
12
|
},
|
|
12
|
-
name: {
|
|
13
|
-
type: String,
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
idx: {
|
|
17
|
-
type: Number,
|
|
18
|
-
},
|
|
19
13
|
},
|
|
20
14
|
setup(props, { attrs, slots }) {
|
|
21
15
|
provide(navigationViewLocation, props.blade!);
|
|
22
16
|
|
|
17
|
+
const viewRef = ref<CoreBladeExposed>();
|
|
18
|
+
|
|
19
|
+
watch(
|
|
20
|
+
() => [viewRef.value, props.blade] as const,
|
|
21
|
+
([instance, blade]) => {
|
|
22
|
+
if (blade && blade.props?.navigation) {
|
|
23
|
+
blade.props.navigation.instance = toRef(instance);
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{ flush: "post" },
|
|
27
|
+
);
|
|
28
|
+
|
|
23
29
|
return () => {
|
|
24
30
|
/**
|
|
25
31
|
* Callback function onClose, which is passed while opening blade, called when a BladeVNode is unmounted.
|
|
@@ -59,6 +65,7 @@ export const VcBladeView = defineComponent({
|
|
|
59
65
|
const component = h(
|
|
60
66
|
props.blade as Component,
|
|
61
67
|
Object.assign({}, attrs, {
|
|
68
|
+
ref: viewRef,
|
|
62
69
|
onVnodeUnmounted,
|
|
63
70
|
onVnodeMounted,
|
|
64
71
|
"onExpand:blade": onExpand,
|
|
@@ -67,14 +74,14 @@ export const VcBladeView = defineComponent({
|
|
|
67
74
|
}),
|
|
68
75
|
);
|
|
69
76
|
|
|
70
|
-
return normalizeSlot(slots.default, {
|
|
77
|
+
return normalizeSlot(slots.default, { Component: component });
|
|
71
78
|
}
|
|
72
79
|
return null;
|
|
73
80
|
};
|
|
74
81
|
},
|
|
75
82
|
});
|
|
76
83
|
|
|
77
|
-
function normalizeSlot(slot: Slot | undefined, data: {
|
|
84
|
+
function normalizeSlot(slot: Slot | undefined, data: { Component: VNode }) {
|
|
78
85
|
if (!slot) return null;
|
|
79
86
|
const slotContent = slot(data);
|
|
80
87
|
return slotContent.length === 1 ? slotContent[0] : slotContent;
|