@vc-shell/framework 1.0.161 → 1.0.164
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 +27 -0
- package/dist/framework.js +887 -813
- package/dist/shared/modules/dynamic/components/factories.d.ts +1 -1
- package/dist/shared/modules/dynamic/components/factories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/Button.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/Card.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/Checkbox.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/ContentField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/CustomComponent.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/DynamicProperty.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/EditorField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/Fieldset.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/GalleryField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/ImageField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/InputCurrency.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/InputField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/MultivalueField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/RatingField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/SelectField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/StatusField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/SwitchField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/Table.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/TextareaField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/VideoField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/types/index.d.ts +2 -1
- package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/types/models.d.ts +1 -0
- package/dist/shared/modules/dynamic/types/models.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
- package/package.json +4 -4
- package/shared/modules/dynamic/components/factories.ts +2 -0
- package/shared/modules/dynamic/components/fields/Button.ts +3 -0
- package/shared/modules/dynamic/components/fields/Card.ts +3 -0
- package/shared/modules/dynamic/components/fields/Checkbox.ts +3 -0
- package/shared/modules/dynamic/components/fields/ContentField.ts +3 -0
- package/shared/modules/dynamic/components/fields/CustomComponent.ts +13 -3
- package/shared/modules/dynamic/components/fields/DynamicProperty.ts +8 -1
- package/shared/modules/dynamic/components/fields/EditorField.ts +3 -0
- package/shared/modules/dynamic/components/fields/Fieldset.ts +2 -1
- package/shared/modules/dynamic/components/fields/GalleryField.ts +3 -0
- package/shared/modules/dynamic/components/fields/ImageField.ts +3 -0
- package/shared/modules/dynamic/components/fields/InputCurrency.ts +3 -0
- package/shared/modules/dynamic/components/fields/InputField.ts +3 -0
- package/shared/modules/dynamic/components/fields/MultivalueField.ts +3 -0
- package/shared/modules/dynamic/components/fields/RatingField.ts +3 -0
- package/shared/modules/dynamic/components/fields/SelectField.ts +3 -0
- package/shared/modules/dynamic/components/fields/StatusField.ts +10 -1
- package/shared/modules/dynamic/components/fields/SwitchField.ts +3 -0
- package/shared/modules/dynamic/components/fields/Table.ts +1 -3
- package/shared/modules/dynamic/components/fields/TextareaField.ts +3 -0
- package/shared/modules/dynamic/components/fields/VideoField.ts +3 -0
- package/shared/modules/dynamic/helpers/nodeBuilder.ts +1 -1
- package/shared/modules/dynamic/types/index.ts +2 -4
- package/shared/modules/dynamic/types/models.ts +1 -0
- package/ui/components/molecules/vc-editor/vc-editor.vue +9 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-editor.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/molecules/vc-editor/vc-editor.vue.ts"],"names":[],"mappings":"AAGA,OAAO,0CAA0C,CAAC;AAKlD,MAAM,WAAW,KAAK;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,KAAK;IACpB,CAAC,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;CACtF;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"vc-editor.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/molecules/vc-editor/vc-editor.vue.ts"],"names":[],"mappings":"AAGA,OAAO,0CAA0C,CAAC;AAKlD,MAAM,WAAW,KAAK;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,KAAK;IACpB,CAAC,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;CACtF;;;;;;;;;;AAuPD,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.164",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/framework.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"whatwg-fetch": "^3.6.19"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@vc-shell/api-client-generator": "^1.0.
|
|
57
|
-
"@vc-shell/config-generator": "^1.0.
|
|
58
|
-
"@vc-shell/ts-config": "^1.0.
|
|
56
|
+
"@vc-shell/api-client-generator": "^1.0.164",
|
|
57
|
+
"@vc-shell/config-generator": "^1.0.164",
|
|
58
|
+
"@vc-shell/ts-config": "^1.0.164",
|
|
59
59
|
"@vitejs/plugin-vue": "^5.0.3",
|
|
60
60
|
"sass": "^1.69.6",
|
|
61
61
|
"typescript": "^5.3.3",
|
|
@@ -52,6 +52,7 @@ export const ControlBaseProps = ({
|
|
|
52
52
|
name = undefined,
|
|
53
53
|
tooltip = undefined,
|
|
54
54
|
key = undefined,
|
|
55
|
+
classNames = undefined,
|
|
55
56
|
...rest
|
|
56
57
|
}: IControlBaseProps): IControlBaseProps => ({
|
|
57
58
|
key,
|
|
@@ -62,6 +63,7 @@ export const ControlBaseProps = ({
|
|
|
62
63
|
required,
|
|
63
64
|
name,
|
|
64
65
|
tooltip,
|
|
66
|
+
classNames,
|
|
65
67
|
...rest,
|
|
66
68
|
});
|
|
67
69
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CustomComponentSchema } from "./../../types";
|
|
2
2
|
import { ExtractPropTypes, resolveComponent, h } from "vue";
|
|
3
3
|
import componentProps from "./props";
|
|
4
|
+
import { unrefNested } from "../../helpers/unrefNested";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
name: "CustomComponentRenderer",
|
|
@@ -10,9 +11,18 @@ export default {
|
|
|
10
11
|
const component = resolveComponent(props.element?.name);
|
|
11
12
|
|
|
12
13
|
return typeof component === "object"
|
|
13
|
-
? h(
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
? h(
|
|
15
|
+
component,
|
|
16
|
+
Object.assign(
|
|
17
|
+
{},
|
|
18
|
+
{
|
|
19
|
+
context: props.bladeContext,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
class: unrefNested(props.baseProps).classNames ?? "",
|
|
23
|
+
},
|
|
24
|
+
),
|
|
25
|
+
)
|
|
16
26
|
: null;
|
|
17
27
|
};
|
|
18
28
|
},
|
|
@@ -122,7 +122,14 @@ export default {
|
|
|
122
122
|
|
|
123
123
|
return () => {
|
|
124
124
|
return properties && properties.length
|
|
125
|
-
? properties?.map((field) =>
|
|
125
|
+
? properties?.map((field) =>
|
|
126
|
+
h(
|
|
127
|
+
field.component as Component,
|
|
128
|
+
Object.assign(unrefNested(field.props), {
|
|
129
|
+
class: unrefNested(props.baseProps).classNames ?? "",
|
|
130
|
+
}),
|
|
131
|
+
),
|
|
132
|
+
)
|
|
126
133
|
: null;
|
|
127
134
|
};
|
|
128
135
|
},
|
|
@@ -3,6 +3,7 @@ import componentProps from "./props";
|
|
|
3
3
|
import * as _ from "lodash-es";
|
|
4
4
|
import { VcButton, VcCol, VcRow } from "../../../../../ui/components";
|
|
5
5
|
import { FieldsetSchema } from "../../types";
|
|
6
|
+
import { unrefNested } from "../../helpers/unrefNested";
|
|
6
7
|
|
|
7
8
|
export default {
|
|
8
9
|
name: "Fieldset",
|
|
@@ -19,7 +20,7 @@ export default {
|
|
|
19
20
|
return h(
|
|
20
21
|
"div",
|
|
21
22
|
{
|
|
22
|
-
class:
|
|
23
|
+
class: `tw-flex tw-row tw-relative ${unrefNested(props.baseProps).classNames ?? ""}`,
|
|
23
24
|
key: `fieldset-${index}`,
|
|
24
25
|
},
|
|
25
26
|
[
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useI18n } from "vue-i18n";
|
|
1
2
|
import { Component, ExtractPropTypes, computed, h, unref } from "vue";
|
|
2
3
|
import componentProps from "./props";
|
|
3
4
|
import { StatusSchema } from "../../types";
|
|
@@ -9,6 +10,8 @@ export default {
|
|
|
9
10
|
name: "StatusField",
|
|
10
11
|
props: componentProps,
|
|
11
12
|
setup(props: ExtractPropTypes<typeof componentProps> & { element: StatusSchema }) {
|
|
13
|
+
const { t } = useI18n({ useScope: "global" });
|
|
14
|
+
|
|
12
15
|
return () => {
|
|
13
16
|
const slotContent = computed(() => {
|
|
14
17
|
if (props.element.content && typeof props.element.content === "string") {
|
|
@@ -33,6 +36,9 @@ export default {
|
|
|
33
36
|
extend: props.element.extend,
|
|
34
37
|
},
|
|
35
38
|
unrefNested(props.baseProps),
|
|
39
|
+
{
|
|
40
|
+
class: unrefNested(props.baseProps).classNames ?? "",
|
|
41
|
+
},
|
|
36
42
|
),
|
|
37
43
|
slots: {
|
|
38
44
|
default: () => {
|
|
@@ -43,7 +49,10 @@ export default {
|
|
|
43
49
|
variant: props.element.iconVariant,
|
|
44
50
|
class: "tw-mr-3",
|
|
45
51
|
}),
|
|
46
|
-
h("div", [
|
|
52
|
+
h("div", [
|
|
53
|
+
h("div", { class: "tw-font-bold" }, computed(() => t(props.element.title ?? "")).value),
|
|
54
|
+
h("div", slotContent.value),
|
|
55
|
+
]),
|
|
47
56
|
]);
|
|
48
57
|
},
|
|
49
58
|
},
|
|
@@ -27,9 +27,7 @@ export default {
|
|
|
27
27
|
columns: props.element.columns?.map((col) => ({ ...col, title: computed(() => t(col.title)) })),
|
|
28
28
|
items: unrefNested(props.baseProps).modelValue ?? [],
|
|
29
29
|
stateKey: props.element.id,
|
|
30
|
-
class: {
|
|
31
|
-
"!tw-flex-auto": true,
|
|
32
|
-
},
|
|
30
|
+
class: `!tw-flex-auto ${unrefNested(props.baseProps).classNames ?? ""}`,
|
|
33
31
|
},
|
|
34
32
|
unrefNested(props.baseProps),
|
|
35
33
|
),
|
|
@@ -118,7 +118,7 @@ function nodeBuilder<
|
|
|
118
118
|
"onUpdate:modelValue": onUpdateModelValue,
|
|
119
119
|
tooltip: computed(() => (tooltip ? t(tooltip) : undefined)),
|
|
120
120
|
multilanguage,
|
|
121
|
-
|
|
121
|
+
classNames:
|
|
122
122
|
"horizontalSeparator" in controlSchema && controlSchema.horizontalSeparator
|
|
123
123
|
? "tw-border-b tw-border-solid tw-border-b-[#e5e5e5] tw-mb-[5px] tw-pb-[21px]"
|
|
124
124
|
: "",
|
|
@@ -138,7 +138,6 @@ export interface SettingsBase {
|
|
|
138
138
|
* Collapsed blade width in percentage
|
|
139
139
|
* @default "50%"
|
|
140
140
|
*/
|
|
141
|
-
// TODO Add to documentation
|
|
142
141
|
width?: `${number}%`;
|
|
143
142
|
}
|
|
144
143
|
|
|
@@ -427,7 +426,6 @@ export interface VideoSchema
|
|
|
427
426
|
* Data field schema interface.
|
|
428
427
|
* @interface
|
|
429
428
|
*/
|
|
430
|
-
// TODO update documentation
|
|
431
429
|
export interface FieldSchema
|
|
432
430
|
extends Pick<SchemaBase, "id" | "property" | "label" | "visibility" | "tooltip" | "horizontalSeparator"> {
|
|
433
431
|
/**
|
|
@@ -437,7 +435,7 @@ export interface FieldSchema
|
|
|
437
435
|
component: "vc-field";
|
|
438
436
|
/**
|
|
439
437
|
* Field variant.
|
|
440
|
-
* @type {"
|
|
438
|
+
* @type {"date-ago" | "date" | "link" | "text" | "email"}
|
|
441
439
|
*/
|
|
442
440
|
variant?: ComponentProps<typeof VcField>["type"];
|
|
443
441
|
/**
|
|
@@ -454,6 +452,7 @@ export interface FieldSchema
|
|
|
454
452
|
/**
|
|
455
453
|
* Field columns aspect ratio.
|
|
456
454
|
* @description Uses CSS flex-grow property.
|
|
455
|
+
* @default [1,1]
|
|
457
456
|
* @type {[number, number]}
|
|
458
457
|
*/
|
|
459
458
|
aspectRatio?: [number, number];
|
|
@@ -769,7 +768,6 @@ export interface FieldsetSchema
|
|
|
769
768
|
* Switch schema interface.
|
|
770
769
|
* @interface
|
|
771
770
|
*/
|
|
772
|
-
// TODO add to documentation
|
|
773
771
|
export interface SwitchSchema extends Omit<SchemaBase, "placeholder" | "multilanguage"> {
|
|
774
772
|
/**
|
|
775
773
|
* Component type for switch.
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
<!-- Editor field -->
|
|
28
28
|
<QuillEditor
|
|
29
29
|
:key="`${disabled}`"
|
|
30
|
+
ref="quillRef"
|
|
30
31
|
v-model:content="content"
|
|
31
32
|
class="quill-editor tw-border tw-border-solid tw-border-[color:var(--editor-border-color)] tw-rounded-b-[var(--editor-border-radius)] tw-h-[200px]"
|
|
32
33
|
:class="{ 'tw-bg-[#fafafa] tw-text-[#424242] tw-cursor-default': disabled }"
|
|
@@ -50,9 +51,9 @@
|
|
|
50
51
|
</template>
|
|
51
52
|
<!-- eslint-disable @typescript-eslint/no-explicit-any -->
|
|
52
53
|
<script lang="ts" setup>
|
|
53
|
-
import { QuillEditor } from "@vueup/vue-quill";
|
|
54
|
+
import { QuillEditor, Quill } from "@vueup/vue-quill";
|
|
54
55
|
import "@vueup/vue-quill/dist/vue-quill.snow.css";
|
|
55
|
-
import { ref, unref, watch, onMounted, onUpdated } from "vue";
|
|
56
|
+
import { ref, unref, watch, onMounted, onUpdated, Ref } from "vue";
|
|
56
57
|
import ImageUploader from "quill-image-uploader";
|
|
57
58
|
import { VcLabel, VcHint } from "./../../";
|
|
58
59
|
|
|
@@ -82,6 +83,8 @@ defineSlots<{
|
|
|
82
83
|
}>();
|
|
83
84
|
|
|
84
85
|
const content = ref();
|
|
86
|
+
const quillRef = ref<Quill | null>(null);
|
|
87
|
+
|
|
85
88
|
const toolbar = {
|
|
86
89
|
container: [
|
|
87
90
|
{ header: 1 },
|
|
@@ -131,6 +134,10 @@ onUpdated(() => {
|
|
|
131
134
|
watch(
|
|
132
135
|
() => props.modelValue,
|
|
133
136
|
(value) => {
|
|
137
|
+
if (value === "") {
|
|
138
|
+
quillRef.value?.setText(value);
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
134
141
|
content.value = unref(value);
|
|
135
142
|
},
|
|
136
143
|
{ immediate: true },
|