@vc-shell/framework 1.0.262 → 1.0.264
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 +13 -0
- package/dist/framework.js +10893 -10896
- package/dist/index.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/package.json +4 -4
- package/ui/components/atoms/vc-widget/vc-widget.vue +2 -2
- package/ui/components/molecules/vc-editor/vc-editor.vue +4 -4
- package/ui/components/organisms/vc-blade/vc-blade.vue +1 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-blade.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-blade/vc-blade.vue.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AASvD,MAAM,WAAW,KAAK;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,aAAa,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,KAAK;IACpB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;IACxB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;CAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"vc-blade.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms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E1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AACxD,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.264",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/framework.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/dompurify": "^3.0.5",
|
|
63
63
|
"@types/quill": "^2.0.14",
|
|
64
|
-
"@vc-shell/api-client-generator": "^1.0.
|
|
65
|
-
"@vc-shell/config-generator": "^1.0.
|
|
66
|
-
"@vc-shell/ts-config": "^1.0.
|
|
64
|
+
"@vc-shell/api-client-generator": "^1.0.264",
|
|
65
|
+
"@vc-shell/config-generator": "^1.0.264",
|
|
66
|
+
"@vc-shell/ts-config": "^1.0.264",
|
|
67
67
|
"@vitejs/plugin-vue": "^5.0.3",
|
|
68
68
|
"cypress-signalr-mock": "^1.5.0",
|
|
69
69
|
"sass": "^1.69.6",
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
<div
|
|
10
10
|
class="vc-widget tw-relative tw-shrink-0 tw-py-4 tw-px-2"
|
|
11
11
|
:class="{
|
|
12
|
-
'tw-w-[120px]': isExpanded,
|
|
12
|
+
'tw-w-[120px] tw-h-[120px]': isExpanded,
|
|
13
13
|
'vc-widget_disabled': disabled,
|
|
14
|
-
'tw-w-[50px]': !isExpanded,
|
|
14
|
+
'tw-w-[50px] tw-h-[50px]': !isExpanded,
|
|
15
15
|
'tw-w-[100px]': $isMobile.value,
|
|
16
16
|
}"
|
|
17
17
|
@click="onClick"
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
import { QuillEditor } from "@vueup/vue-quill";
|
|
57
57
|
import "@vueup/vue-quill/dist/vue-quill.snow.css";
|
|
58
58
|
import { ref, unref, onMounted, onUpdated, getCurrentInstance, Ref } from "vue";
|
|
59
|
+
import DOMPurify from "dompurify";
|
|
59
60
|
import ImageUploader from "quill-image-uploader";
|
|
60
61
|
import { VcLabel, VcHint } from "../..";
|
|
61
62
|
|
|
@@ -78,7 +79,6 @@ export interface Emits {
|
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
const props = defineProps<Props>();
|
|
81
|
-
|
|
82
82
|
const emit = defineEmits<Emits>();
|
|
83
83
|
const uid = getCurrentInstance()?.uid;
|
|
84
84
|
const id = `editor-${uid}`;
|
|
@@ -87,7 +87,6 @@ defineSlots<{
|
|
|
87
87
|
error?: (props: any) => any;
|
|
88
88
|
}>();
|
|
89
89
|
|
|
90
|
-
// const content = ref();
|
|
91
90
|
const quillRef = ref(null) as Ref<typeof QuillEditor | null>;
|
|
92
91
|
const quill = ref();
|
|
93
92
|
|
|
@@ -147,7 +146,7 @@ onUpdated(() => {
|
|
|
147
146
|
function initializeQuill() {
|
|
148
147
|
quill.value = quillRef.value?.getQuill();
|
|
149
148
|
if (props.modelValue) {
|
|
150
|
-
quill.value.root.innerHTML = unref(props.modelValue);
|
|
149
|
+
quill.value.root.innerHTML = DOMPurify.sanitize(unref(props.modelValue));
|
|
151
150
|
}
|
|
152
151
|
|
|
153
152
|
quill.value.on("text-change", onTextChange);
|
|
@@ -171,7 +170,8 @@ function onTextChange() {
|
|
|
171
170
|
if (quill.value.root.innerHTML === "<p><br></p>") {
|
|
172
171
|
emit("update:modelValue", "");
|
|
173
172
|
} else {
|
|
174
|
-
|
|
173
|
+
const sanitizedContent = DOMPurify.sanitize(quill.value.root.innerHTML);
|
|
174
|
+
emit("update:modelValue", sanitizedContent);
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
}
|
|
@@ -78,9 +78,7 @@
|
|
|
78
78
|
'tw-flex-col': $isMobile.value,
|
|
79
79
|
}"
|
|
80
80
|
>
|
|
81
|
-
<
|
|
82
|
-
<slot></slot>
|
|
83
|
-
</div>
|
|
81
|
+
<slot></slot>
|
|
84
82
|
|
|
85
83
|
<div
|
|
86
84
|
v-show="$slots['widgets'] && !isWidgetContainerEmpty"
|
|
@@ -195,29 +193,15 @@ const checkEmpty = (el: HTMLElement) => {
|
|
|
195
193
|
isWidgetContainerEmpty.value = isEmpty;
|
|
196
194
|
};
|
|
197
195
|
|
|
198
|
-
const equalHeight = (el: HTMLElement) => {
|
|
199
|
-
const widgets = el.children;
|
|
200
|
-
if (!widgets) return;
|
|
201
|
-
const maxHeightArr = Array.from(widgets).map((widget: Element) => (widget as HTMLElement).clientHeight);
|
|
202
|
-
const maxHeight = maxHeightArr.length ? Math.max(...maxHeightArr) : 0;
|
|
203
|
-
|
|
204
|
-
Array.from(widgets).forEach((widget: Element) => {
|
|
205
|
-
const widgetElement = widget as HTMLElement;
|
|
206
|
-
widgetElement.style.height = maxHeight !== 0 ? `${maxHeight}px` : "auto";
|
|
207
|
-
});
|
|
208
|
-
};
|
|
209
|
-
|
|
210
196
|
onMounted(() => {
|
|
211
197
|
if (widgetsRef.value) {
|
|
212
198
|
checkEmpty(widgetsContainerRef.value);
|
|
213
|
-
equalHeight(widgetsContainerRef.value);
|
|
214
199
|
}
|
|
215
200
|
});
|
|
216
201
|
|
|
217
202
|
onUpdated(() => {
|
|
218
203
|
if (widgetsRef.value) {
|
|
219
204
|
checkEmpty(widgetsContainerRef.value);
|
|
220
|
-
equalHeight(widgetsContainerRef.value);
|
|
221
205
|
}
|
|
222
206
|
});
|
|
223
207
|
|