@voicenter-team/voicenter-ui-plus 3.4.2 → 3.4.4
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/README.md +502 -502
- package/library/assets/assets/sass/main.css +1 -1
- package/library/assets/components/VcFileUploader/VcFileUploaderArea.css +1 -0
- package/library/assets/components/VcFileUploader/{VcFileUploader.css → VcFileUploaderSimple.css} +1 -1
- package/library/assets/components/VcJsonSchema/Components/JsonSchemaEditor.css +1 -1
- package/library/assets/components/VcLoading/Loaders/Circles.css +1 -1
- package/library/assets/components/VcLoading/Loaders/DotSpinner.css +1 -1
- package/library/assets/components/VcLoading/Loaders/LdsSpinner.css +1 -1
- package/library/assets/components/VcLoading/Loaders/LoadIcon.css +1 -1
- package/library/assets/components/VcLoading/Loaders/Stretch.css +1 -1
- package/library/assets/components/VcLoading/VcLoading.css +1 -1
- package/library/assets/components/VcMdEditor/ParameterNode.css +1 -1
- package/library/assets/components/VcSkeletonLoader/Loaders/Card.css +1 -1
- package/library/assets/components/VcSkeletonLoader/Loaders/Circle.css +1 -1
- package/library/assets/components/VcSkeletonLoader/Loaders/Row.css +1 -1
- package/library/assets/components/VcSkeletonLoader/Loaders/Square.css +1 -1
- package/library/assets/components/VcSkeletonLoader/Loaders/Text.css +1 -1
- package/library/components/VcFileUploader/VcFileUploader.vue.mjs +87 -5
- package/library/components/VcFileUploader/VcFileUploader.vue2.mjs +1 -381
- package/library/components/VcFileUploader/VcFileUploaderArea.vue.mjs +338 -0
- package/library/components/VcFileUploader/VcFileUploaderArea.vue3.mjs +5 -0
- package/library/components/VcFileUploader/VcFileUploaderSimple.vue.mjs +7 -0
- package/library/components/VcFileUploader/VcFileUploaderSimple.vue2.mjs +200 -0
- package/library/components/VcFileUploader/VcSimpleUploaderAction.vue.mjs +62 -0
- package/library/components/VcFileUploader/VcSimpleUploaderAction.vue2.mjs +4 -0
- package/library/components/VcFileUploader/VcSimpleUploaderFileList.vue.mjs +75 -0
- package/library/components/VcFileUploader/VcSimpleUploaderFileList.vue2.mjs +4 -0
- package/library/components/VcJsonSchema/Components/JsonSchemaEditor.vue.mjs +1 -1
- package/library/components/VcLoading/Loaders/Circles.vue.mjs +1 -1
- package/library/components/VcLoading/Loaders/DotSpinner.vue.mjs +1 -1
- package/library/components/VcLoading/Loaders/DotSpinner.vue2.mjs +2 -2
- package/library/components/VcLoading/Loaders/LdsSpinner.vue.mjs +1 -1
- package/library/components/VcLoading/Loaders/LoadIcon.vue.mjs +1 -1
- package/library/components/VcLoading/Loaders/Stretch.vue.mjs +1 -1
- package/library/components/VcLoading/Loaders/Stretch.vue2.mjs +1 -1
- package/library/components/VcLoading/VcLoading.vue.mjs +1 -1
- package/library/components/VcMdEditor/ParameterNode.vue.mjs +1 -1
- package/library/components/VcRadioTabs/UiComponents/VcRadioTabsNav.vue.mjs +33 -25
- package/library/components/VcRadioTabs/UiComponents/VcRadioTabsNavHint.vue.mjs +31 -0
- package/library/components/VcRadioTabs/UiComponents/VcRadioTabsNavHint.vue2.mjs +4 -0
- package/library/components/VcSkeletonLoader/Loaders/Card.vue.mjs +1 -1
- package/library/components/VcSkeletonLoader/Loaders/Circle.vue.mjs +1 -1
- package/library/components/VcSkeletonLoader/Loaders/Row.vue.mjs +1 -1
- package/library/components/VcSkeletonLoader/Loaders/Square.vue.mjs +1 -1
- package/library/components/VcSkeletonLoader/Loaders/Text.vue.mjs +1 -1
- package/library/composables/input/useFileUploader.mjs +163 -0
- package/library/composables/option/useOptionMethods.mjs +14 -0
- package/library/index.mjs +151 -146
- package/library/index.mjs.br +0 -0
- package/library/index.mjs.gz +0 -0
- package/library/localization/index.mjs.gz +0 -0
- package/library/localization/locales/en.json.mjs +2 -0
- package/library/plugin-components.gen.mjs +157 -152
- package/library/plugin.mjs +149 -144
- package/library/plugin.mjs.br +0 -0
- package/library/plugin.mjs.gz +0 -0
- package/library/style.css +17 -15
- package/library/style.css.br +0 -0
- package/library/style.css.gz +0 -0
- package/library/theme/index.mjs.gz +0 -0
- package/library/types/components/VcFileUploader/VcFileUploader.vue.d.ts +29 -139
- package/library/types/components/VcFileUploader/VcFileUploaderArea.vue.d.ts +122 -0
- package/library/types/components/VcFileUploader/VcFileUploaderSimple.vue.d.ts +127 -0
- package/library/types/components/VcFileUploader/VcSimpleUploaderAction.vue.d.ts +38 -0
- package/library/types/components/VcFileUploader/VcSimpleUploaderFileList.vue.d.ts +41 -0
- package/library/types/components/VcRadioTabs/UiComponents/VcRadioTabsNavHint.vue.d.ts +36 -0
- package/library/types/components/exports.d.ts +5 -1
- package/library/types/components.gen.d.ts +2 -0
- package/library/types/composables/input/useFileUploader.d.ts +82 -0
- package/library/types/composables/option/useOptionMethods.d.ts +9 -8
- package/library/types/localization/locales/en.json.d.ts +164 -162
- package/library/types/theme/themes.json.d.ts +227 -227
- package/library/types/types/OptionAndConfig.types.d.ts +4 -0
- package/library/utils/jsonSchema/index.mjs.gz +0 -0
- package/package.json +185 -185
- package/src/theme/index.ts +101 -101
- package/src/theme/tailwindScheme.js +37 -37
- package/src/theme/theme.types.ts +31 -31
- package/src/theme/themeMerge.ts +40 -40
- package/src/theme/themes.json +227 -227
- package/tailwind.config.d.ts +5 -5
- package/tailwind.config.js +192 -192
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList, renderSlot, createVNode } from "vue";
|
|
2
|
+
import _sfc_main$2 from "../VcTag/VcTag.vue.mjs";
|
|
3
|
+
import '../../assets/components/VcDelimitedList/VcDelimitedList.css';import '../../assets/components/VcTag/VcTag.css';/* empty css */
|
|
4
|
+
import _sfc_main$1 from "../VcDelimitedList/VcDelimitedList.vue.mjs";
|
|
5
|
+
/* empty css */
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "VcSimpleUploaderFileList",
|
|
8
|
+
props: {
|
|
9
|
+
items: {},
|
|
10
|
+
maxLength: {},
|
|
11
|
+
tagMaxContentWidth: {},
|
|
12
|
+
tagIcon: {}
|
|
13
|
+
},
|
|
14
|
+
emits: ["on-close"],
|
|
15
|
+
setup(__props, { emit: __emit }) {
|
|
16
|
+
const emit = __emit;
|
|
17
|
+
function onTagClose(itemId) {
|
|
18
|
+
emit("on-close", itemId);
|
|
19
|
+
}
|
|
20
|
+
return (_ctx, _cache) => {
|
|
21
|
+
return openBlock(), createBlock(_sfc_main$1, {
|
|
22
|
+
list: __props.items,
|
|
23
|
+
limit: __props.maxLength,
|
|
24
|
+
trigger: "hover",
|
|
25
|
+
"popover-max-width": "400",
|
|
26
|
+
separator: ""
|
|
27
|
+
}, {
|
|
28
|
+
"list-item": withCtx(({ item }) => [
|
|
29
|
+
renderSlot(_ctx.$slots, "tag-item", {
|
|
30
|
+
data: item,
|
|
31
|
+
close: onTagClose
|
|
32
|
+
}, () => [
|
|
33
|
+
createVNode(_sfc_main$2, {
|
|
34
|
+
label: item.name,
|
|
35
|
+
"max-content": __props.tagMaxContentWidth,
|
|
36
|
+
icon: __props.tagIcon,
|
|
37
|
+
closable: "",
|
|
38
|
+
onOnClose: ($event) => onTagClose(item.id)
|
|
39
|
+
}, null, 8, ["label", "max-content", "icon", "onOnClose"])
|
|
40
|
+
])
|
|
41
|
+
]),
|
|
42
|
+
reference: withCtx(({ listLength }) => [
|
|
43
|
+
createVNode(_sfc_main$2, {
|
|
44
|
+
label: `+ ${listLength}`
|
|
45
|
+
}, null, 8, ["label"])
|
|
46
|
+
]),
|
|
47
|
+
"other-content": withCtx(({ list }) => [
|
|
48
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(list, (item, index) => {
|
|
49
|
+
return openBlock(), createElementBlock("div", {
|
|
50
|
+
key: index,
|
|
51
|
+
class: "flex items-center justify-start p-2"
|
|
52
|
+
}, [
|
|
53
|
+
renderSlot(_ctx.$slots, "tag-item-other", {
|
|
54
|
+
data: item,
|
|
55
|
+
close: onTagClose
|
|
56
|
+
}, () => [
|
|
57
|
+
createVNode(_sfc_main$2, {
|
|
58
|
+
label: item.name,
|
|
59
|
+
icon: __props.tagIcon,
|
|
60
|
+
"max-content": __props.tagMaxContentWidth,
|
|
61
|
+
closable: "",
|
|
62
|
+
onOnClose: ($event) => onTagClose(item.id)
|
|
63
|
+
}, null, 8, ["label", "icon", "max-content", "onOnClose"])
|
|
64
|
+
])
|
|
65
|
+
]);
|
|
66
|
+
}), 128))
|
|
67
|
+
]),
|
|
68
|
+
_: 3
|
|
69
|
+
}, 8, ["list", "limit"]);
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
export {
|
|
74
|
+
_sfc_main as default
|
|
75
|
+
};
|
|
@@ -62,7 +62,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
62
|
emits: ["update:modelValue", "update:required", "update:propertyType", "remove:property", "change:propertyName"],
|
|
63
63
|
setup(__props, { emit: __emit }) {
|
|
64
64
|
useCssVars((_ctx) => ({
|
|
65
|
-
"
|
|
65
|
+
"v43cda119": spacingRow.value
|
|
66
66
|
}));
|
|
67
67
|
const SCHEMA_TYPE_NAMES = ["string", "number", "integer", "object", "array", "boolean", "null"];
|
|
68
68
|
function asObjectSchema(def) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./Circles.vue2.mjs";
|
|
2
2
|
import '../../../assets/components/VcLoading/Loaders/Circles.css';/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const Circles = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const Circles = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bc3b25df"]]);
|
|
5
5
|
export {
|
|
6
6
|
Circles as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./DotSpinner.vue2.mjs";
|
|
2
2
|
import '../../../assets/components/VcLoading/Loaders/DotSpinner.css';/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const DotSpinner = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const DotSpinner = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a028f481"]]);
|
|
5
5
|
export {
|
|
6
6
|
DotSpinner as default
|
|
7
7
|
};
|
|
@@ -10,7 +10,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10
10
|
},
|
|
11
11
|
setup(__props) {
|
|
12
12
|
useCssVars((_ctx) => ({
|
|
13
|
-
"
|
|
13
|
+
"v32d2045b": styles.value.size
|
|
14
14
|
}));
|
|
15
15
|
const props = __props;
|
|
16
16
|
const styles = computed(() => {
|
|
@@ -23,7 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
return openBlock(), createElementBlock("div", {
|
|
24
24
|
class: normalizeClass([`text-${__props.color}`, "vc-spinner--dots"])
|
|
25
25
|
}, [..._cache[0] || (_cache[0] = [
|
|
26
|
-
createStaticVNode('<div class="dot-spin" data-v-
|
|
26
|
+
createStaticVNode('<div class="dot-spin" data-v-a028f481></div><div class="dot-spin" data-v-a028f481></div><div class="dot-spin" data-v-a028f481></div><div class="dot-spin" data-v-a028f481></div><div class="dot-spin" data-v-a028f481></div><div class="dot-spin" data-v-a028f481></div><div class="dot-spin" data-v-a028f481></div><div class="dot-spin" data-v-a028f481></div>', 8)
|
|
27
27
|
])], 2);
|
|
28
28
|
};
|
|
29
29
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./LdsSpinner.vue2.mjs";
|
|
2
2
|
import '../../../assets/components/VcLoading/Loaders/LdsSpinner.css';/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const LdsSpinner = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const LdsSpinner = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c7a94f4b"]]);
|
|
5
5
|
export {
|
|
6
6
|
LdsSpinner as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./LoadIcon.vue2.mjs";
|
|
2
2
|
import '../../../assets/components/VcLoading/Loaders/LoadIcon.css';/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const LoadIcon = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const LoadIcon = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-45e46b82"]]);
|
|
5
5
|
export {
|
|
6
6
|
LoadIcon as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./Stretch.vue2.mjs";
|
|
2
2
|
import '../../../assets/components/VcLoading/Loaders/Stretch.css';/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const Stretch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const Stretch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7a8dc57a"]]);
|
|
5
5
|
export {
|
|
6
6
|
Stretch as default
|
|
7
7
|
};
|
|
@@ -22,7 +22,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
22
|
style: normalizeStyle(styles.value),
|
|
23
23
|
class: normalizeClass([`text-${__props.color}`, "vc-spinner--stretch"])
|
|
24
24
|
}, [..._cache[0] || (_cache[0] = [
|
|
25
|
-
createStaticVNode('<div class="rect rect-1" data-v-
|
|
25
|
+
createStaticVNode('<div class="rect rect-1" data-v-7a8dc57a></div><div class="rect rect-2" data-v-7a8dc57a></div><div class="rect rect-3" data-v-7a8dc57a></div><div class="rect rect-4" data-v-7a8dc57a></div><div class="rect rect-5" data-v-7a8dc57a></div>', 5)
|
|
26
26
|
])], 6);
|
|
27
27
|
};
|
|
28
28
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./VcLoading.vue2.mjs";
|
|
2
2
|
import '../../assets/components/VcLoading/VcLoading.css';/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const VcLoading = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const VcLoading = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-77d691e3"]]);
|
|
5
5
|
export {
|
|
6
6
|
VcLoading as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./ParameterNode.vue2.mjs";
|
|
2
2
|
import '../../assets/components/VcMdEditor/ParameterNode.css';/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const ParameterNode = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const ParameterNode = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-09bacfc2"]]);
|
|
5
5
|
export {
|
|
6
6
|
ParameterNode as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import '../../../assets/components/VcRadioTabs/UiComponents/VcRadioTabsNav.css';
|
|
2
|
-
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, Fragment, renderList,
|
|
2
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createBlock, withCtx, createElementVNode, withKeys, renderSlot, normalizeStyle, createVNode, toDisplayString } from "vue";
|
|
3
3
|
import { convertToUnit } from "../../../utils/helpers.mjs";
|
|
4
4
|
import useOptionMethods from "../../../composables/option/useOptionMethods.mjs";
|
|
5
|
-
import _sfc_main$
|
|
5
|
+
import _sfc_main$2 from "../../VcIcon/VcIcon.vue.mjs";
|
|
6
6
|
import '../../../assets/components/VcIcon/VcIcon.css';/* empty css */
|
|
7
|
+
import _sfc_main$1 from "./VcRadioTabsNavHint.vue.mjs";
|
|
7
8
|
const _hoisted_1 = ["tabindex", "onClick", "onKeyup"];
|
|
8
9
|
const _hoisted_2 = { class: "radio-tab-nav-name" };
|
|
9
10
|
const DEFAULT_GAP_CLASSES = "gap-x-2 sm:gap-x-3 md:gap-x-6 lg:gap-x-12";
|
|
@@ -48,32 +49,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
48
49
|
class: normalizeClass([`justify-${__props.position} ${__props.headerClasses}`, "vc-radio-tabs-nav"])
|
|
49
50
|
}, [
|
|
50
51
|
(openBlock(true), createElementBlock(Fragment, null, renderList(optionsMapped.value, (option, index) => {
|
|
51
|
-
return openBlock(),
|
|
52
|
+
return openBlock(), createBlock(_sfc_main$1, {
|
|
52
53
|
key: `tab-${index}`,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}, borderPositionClass.value], "vc-radio-tabs-nav__item"]),
|
|
57
|
-
tabindex: option.disabled ? -1 : 0,
|
|
58
|
-
onClick: ($event) => onClick(option, index),
|
|
59
|
-
onKeyup: withKeys(($event) => onClick(option, index), ["enter"])
|
|
60
|
-
}, [
|
|
61
|
-
renderSlot(_ctx.$slots, "tab-item", {
|
|
62
|
-
option,
|
|
63
|
-
index
|
|
64
|
-
}, () => [
|
|
54
|
+
hint: option.disabledHint
|
|
55
|
+
}, {
|
|
56
|
+
default: withCtx(() => [
|
|
65
57
|
createElementVNode("div", {
|
|
66
|
-
class: normalizeClass([
|
|
67
|
-
|
|
58
|
+
class: normalizeClass([[{
|
|
59
|
+
"is--active": isActiveTab(option),
|
|
60
|
+
"is--disabled": option.disabled
|
|
61
|
+
}, borderPositionClass.value], "vc-radio-tabs-nav__item"]),
|
|
62
|
+
tabindex: option.disabled ? -1 : 0,
|
|
63
|
+
onClick: ($event) => onClick(option, index),
|
|
64
|
+
onKeyup: withKeys(($event) => onClick(option, index), ["enter"])
|
|
68
65
|
}, [
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
66
|
+
renderSlot(_ctx.$slots, "tab-item", {
|
|
67
|
+
option,
|
|
68
|
+
index
|
|
69
|
+
}, () => [
|
|
70
|
+
createElementVNode("div", {
|
|
71
|
+
class: normalizeClass([__props.tabItemClasses, "vc-radio-tabs-nav__item-content"]),
|
|
72
|
+
style: normalizeStyle(contentWidthStyle.value)
|
|
73
|
+
}, [
|
|
74
|
+
createVNode(_sfc_main$2, {
|
|
75
|
+
icon: option.icon,
|
|
76
|
+
class: "radio-tab-nav-icon icon-base"
|
|
77
|
+
}, null, 8, ["icon"]),
|
|
78
|
+
createElementVNode("span", _hoisted_2, toDisplayString(option.label), 1)
|
|
79
|
+
], 6)
|
|
80
|
+
])
|
|
81
|
+
], 42, _hoisted_1)
|
|
82
|
+
]),
|
|
83
|
+
_: 2
|
|
84
|
+
}, 1032, ["hint"]);
|
|
77
85
|
}), 128))
|
|
78
86
|
], 2);
|
|
79
87
|
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createBlock, withCtx, createElementVNode, toDisplayString, renderSlot } from "vue";
|
|
2
|
+
import _sfc_main$1 from "../../VcPopover/VcPopover.vue.mjs";
|
|
3
|
+
import '../../../assets/components/VcPopover/VcPopover.css';/* empty css */
|
|
4
|
+
const _hoisted_1 = { class: "vc-radio-tabs-nav__disabled-hint break-normal p-2 text-xs" };
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "VcRadioTabsNavHint",
|
|
7
|
+
props: {
|
|
8
|
+
hint: { default: void 0 }
|
|
9
|
+
},
|
|
10
|
+
setup(__props) {
|
|
11
|
+
return (_ctx, _cache) => {
|
|
12
|
+
return __props.hint ? (openBlock(), createBlock(_sfc_main$1, {
|
|
13
|
+
key: 0,
|
|
14
|
+
trigger: "hover",
|
|
15
|
+
placement: "top",
|
|
16
|
+
teleported: ""
|
|
17
|
+
}, {
|
|
18
|
+
reference: withCtx(() => [
|
|
19
|
+
renderSlot(_ctx.$slots, "default")
|
|
20
|
+
]),
|
|
21
|
+
default: withCtx(() => [
|
|
22
|
+
createElementVNode("div", _hoisted_1, toDisplayString(__props.hint), 1)
|
|
23
|
+
]),
|
|
24
|
+
_: 3
|
|
25
|
+
})) : renderSlot(_ctx.$slots, "default", { key: 1 });
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
export {
|
|
30
|
+
_sfc_main as default
|
|
31
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./Card.vue2.mjs";
|
|
2
2
|
import '../../../assets/components/VcSkeletonLoader/Loaders/Card.css';/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const Card = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const Card = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-93d2f041"]]);
|
|
5
5
|
export {
|
|
6
6
|
Card as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./Circle.vue2.mjs";
|
|
2
2
|
import '../../../assets/components/VcSkeletonLoader/Loaders/Circle.css';/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const Circle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const Circle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cd879b6a"]]);
|
|
5
5
|
export {
|
|
6
6
|
Circle as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./Row.vue2.mjs";
|
|
2
2
|
import '../../../assets/components/VcSkeletonLoader/Loaders/Row.css';/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const Row = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const Row = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cfdd382d"]]);
|
|
5
5
|
export {
|
|
6
6
|
Row as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./Square.vue2.mjs";
|
|
2
2
|
import '../../../assets/components/VcSkeletonLoader/Loaders/Square.css';/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const Square = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const Square = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-fbf8d22a"]]);
|
|
5
5
|
export {
|
|
6
6
|
Square as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./Text.vue2.mjs";
|
|
2
2
|
import '../../../assets/components/VcSkeletonLoader/Loaders/Text.css';/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7cb2b774"]]);
|
|
5
5
|
export {
|
|
6
6
|
Text as default
|
|
7
7
|
};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { ref, computed, watch } from "vue";
|
|
2
|
+
import { getFileSize } from "../../utils/helpers.mjs";
|
|
3
|
+
import { tVU } from "../../localization/index.mjs";
|
|
4
|
+
function useFileUploader(props, emit) {
|
|
5
|
+
const items = ref([]);
|
|
6
|
+
const innerErrorText = ref("");
|
|
7
|
+
const errorText = computed(() => innerErrorText.value || props.error || "");
|
|
8
|
+
function parseFiles(files) {
|
|
9
|
+
let _files = Array.from(files);
|
|
10
|
+
if (_files.length && props.maxLength && _files.length > props.maxLength) {
|
|
11
|
+
_files = _files.slice(0, props.maxLength);
|
|
12
|
+
}
|
|
13
|
+
items.value = _files.map((item, index) => {
|
|
14
|
+
item.id = index;
|
|
15
|
+
return item;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function toFileUploaded(file) {
|
|
19
|
+
return Object.assign(file, { File: file });
|
|
20
|
+
}
|
|
21
|
+
function fromBase64Result(item) {
|
|
22
|
+
const blob = new File([], item.name, {
|
|
23
|
+
lastModified: item.lastModified,
|
|
24
|
+
type: item.type
|
|
25
|
+
});
|
|
26
|
+
return Object.assign(blob, {
|
|
27
|
+
id: item.id,
|
|
28
|
+
File: item.File
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function convertFilesToBase64(file, id) {
|
|
32
|
+
return new Promise((resolve) => {
|
|
33
|
+
const reader = new FileReader();
|
|
34
|
+
reader.readAsDataURL(file);
|
|
35
|
+
reader.onload = () => {
|
|
36
|
+
resolve({
|
|
37
|
+
id,
|
|
38
|
+
lastModified: file.lastModified,
|
|
39
|
+
name: file.name,
|
|
40
|
+
size: file.size,
|
|
41
|
+
type: file.type,
|
|
42
|
+
File: reader.result
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
async function getFilesInBase64(files) {
|
|
48
|
+
const _arr = [];
|
|
49
|
+
let id = 0;
|
|
50
|
+
for (const file of files) {
|
|
51
|
+
const contents = await convertFilesToBase64(file, id);
|
|
52
|
+
_arr.push(contents);
|
|
53
|
+
id++;
|
|
54
|
+
}
|
|
55
|
+
return _arr;
|
|
56
|
+
}
|
|
57
|
+
function processFilesLength(files) {
|
|
58
|
+
if (props.multiple && props.maxLength && files.length > props.maxLength) {
|
|
59
|
+
innerErrorText.value = tVU.t("voicenterUi.uploader.some.file.were.concat.files.limit");
|
|
60
|
+
return files.slice(0, props.maxLength);
|
|
61
|
+
}
|
|
62
|
+
return files;
|
|
63
|
+
}
|
|
64
|
+
function processFileSize(files) {
|
|
65
|
+
if (props.multiple) {
|
|
66
|
+
const filesSizeSum = files.map((file) => file.size).reduce((sizeSum, a) => sizeSum + a, 0);
|
|
67
|
+
if (props.fileListSizeLimit && filesSizeSum > props.fileListSizeLimit) {
|
|
68
|
+
const sizeToExceed = getFileSize(props.fileListSizeLimit);
|
|
69
|
+
innerErrorText.value = tVU.t("voicenterUi.uploader.file.size.sum.should.not.exceed", {
|
|
70
|
+
value: sizeToExceed[0],
|
|
71
|
+
measure: sizeToExceed[1]
|
|
72
|
+
});
|
|
73
|
+
return [];
|
|
74
|
+
}
|
|
75
|
+
const _fileSizeLimit = props.fileSizeLimit;
|
|
76
|
+
if (_fileSizeLimit) {
|
|
77
|
+
files = files.filter((file) => {
|
|
78
|
+
if (file.size > _fileSizeLimit) {
|
|
79
|
+
innerErrorText.value = tVU.t("voicenterUi.uploader.some.files.were.concat.size.limit");
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
return true;
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
return files;
|
|
86
|
+
} else {
|
|
87
|
+
if (!props.fileSizeLimit) return files;
|
|
88
|
+
const limitSize = getFileSize(props.fileSizeLimit);
|
|
89
|
+
const file = files[0];
|
|
90
|
+
if (file && file.size > props.fileSizeLimit) {
|
|
91
|
+
const fileSize = getFileSize(file.size);
|
|
92
|
+
innerErrorText.value = tVU.t("voicenterUi.uploader.file.size.is.but.limit.is", {
|
|
93
|
+
fileSize: fileSize[0],
|
|
94
|
+
fileMeasure: fileSize[1],
|
|
95
|
+
limitSize: limitSize[0],
|
|
96
|
+
limitMeasure: limitSize[1]
|
|
97
|
+
});
|
|
98
|
+
return [];
|
|
99
|
+
}
|
|
100
|
+
return files;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
async function getFileArray(inputFiles) {
|
|
104
|
+
let files = [];
|
|
105
|
+
files = processFilesLength(inputFiles);
|
|
106
|
+
files = processFileSize(files);
|
|
107
|
+
if (props.fileType === "base64") {
|
|
108
|
+
return await getFilesInBase64(files);
|
|
109
|
+
}
|
|
110
|
+
return files;
|
|
111
|
+
}
|
|
112
|
+
async function processFiles(rawFiles) {
|
|
113
|
+
innerErrorText.value = "";
|
|
114
|
+
if (!rawFiles.length) return;
|
|
115
|
+
const inputFiles = rawFiles.filter(Boolean).map(toFileUploaded);
|
|
116
|
+
const files = await getFileArray(inputFiles);
|
|
117
|
+
const out = files.map((item) => {
|
|
118
|
+
if (item instanceof File) {
|
|
119
|
+
return toFileUploaded(item);
|
|
120
|
+
}
|
|
121
|
+
return fromBase64Result(item);
|
|
122
|
+
});
|
|
123
|
+
emit("input", out);
|
|
124
|
+
emit("update:modelValue", out);
|
|
125
|
+
}
|
|
126
|
+
function onTagClose(index) {
|
|
127
|
+
innerErrorText.value = "";
|
|
128
|
+
const files = items.value.filter((item) => item.id !== index);
|
|
129
|
+
emit("input", files);
|
|
130
|
+
emit("update:modelValue", files);
|
|
131
|
+
}
|
|
132
|
+
function onClear() {
|
|
133
|
+
items.value = [];
|
|
134
|
+
emit("input", []);
|
|
135
|
+
emit("update:modelValue", []);
|
|
136
|
+
}
|
|
137
|
+
watch(
|
|
138
|
+
() => props.modelValue,
|
|
139
|
+
(val) => {
|
|
140
|
+
if (val) parseFiles(val);
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
watch(
|
|
144
|
+
() => props.files,
|
|
145
|
+
(val) => {
|
|
146
|
+
if (val) parseFiles(val);
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
immediate: true
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
return {
|
|
153
|
+
items,
|
|
154
|
+
errorText,
|
|
155
|
+
parseFiles,
|
|
156
|
+
processFiles,
|
|
157
|
+
onTagClose,
|
|
158
|
+
onClear
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
export {
|
|
162
|
+
useFileUploader as default
|
|
163
|
+
};
|
|
@@ -57,6 +57,17 @@ function useOptionMethods() {
|
|
|
57
57
|
}
|
|
58
58
|
return false;
|
|
59
59
|
}
|
|
60
|
+
function optionDisabledHint(option, config) {
|
|
61
|
+
if (isOptionObjectValueType(option) && config !== void 0 && "disabledHintKey" in config) {
|
|
62
|
+
const key = config.disabledHintKey;
|
|
63
|
+
if (key === void 0 || !optionDisabled(option, config)) {
|
|
64
|
+
return void 0;
|
|
65
|
+
}
|
|
66
|
+
const value = getValueByPath(option, key);
|
|
67
|
+
return typeof value === "string" && value !== "" ? value : void 0;
|
|
68
|
+
}
|
|
69
|
+
return void 0;
|
|
70
|
+
}
|
|
60
71
|
function optionIconColorHex(option, config) {
|
|
61
72
|
if (isOptionObjectValueType(option) && config !== void 0 && "iconColorHex" in config) {
|
|
62
73
|
const key = config.iconColorHex;
|
|
@@ -116,6 +127,7 @@ function useOptionMethods() {
|
|
|
116
127
|
const value = optionValue(item, config);
|
|
117
128
|
const label = optionLabel(item, config);
|
|
118
129
|
const disabled = optionDisabled(item, config);
|
|
130
|
+
const disabledHint = optionDisabledHint(item, config);
|
|
119
131
|
const icon = optionIcon(item, config);
|
|
120
132
|
const iconStyle = optionIconStyle(item, config);
|
|
121
133
|
const color = optionColor(item, config);
|
|
@@ -126,6 +138,7 @@ function useOptionMethods() {
|
|
|
126
138
|
iconStyle,
|
|
127
139
|
label,
|
|
128
140
|
disabled,
|
|
141
|
+
disabledHint,
|
|
129
142
|
color,
|
|
130
143
|
key: String(value)
|
|
131
144
|
};
|
|
@@ -160,6 +173,7 @@ function useOptionMethods() {
|
|
|
160
173
|
optionLabel,
|
|
161
174
|
optionIcon,
|
|
162
175
|
optionDisabled,
|
|
176
|
+
optionDisabledHint,
|
|
163
177
|
optionIconColorHex,
|
|
164
178
|
optionClass,
|
|
165
179
|
optionStyle,
|