@voicenter-team/voicenter-ui-plus 4.0.0-beta.5 → 4.0.0-beta.6
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 +116 -57
- package/library/assets/assets/sass/main.css +1 -1
- package/library/assets/components/VcAgentRun/UiComponents/VcAgentRunRow.css +1 -1
- package/library/assets/components/VcAgentRun/VcAgentRunCard.css +1 -1
- package/library/assets/components/VcAgentRun/VcAgentRunGroup.css +1 -1
- package/library/assets/components/VcApprovalCard/VcApprovalCard.css +1 -1
- package/library/assets/components/VcAskUserCard/VcAskUserCard.css +1 -1
- package/library/assets/components/VcAutocomplete/VcAutocomplete.css +1 -1
- package/library/assets/components/VcButton/VcButton.css +1 -1
- package/library/assets/components/VcButton/VcButtonIcon.css +1 -1
- package/library/assets/components/VcButton/VcToggleButton.css +1 -1
- package/library/assets/components/VcChatComposer/VcChatComposer.css +1 -1
- package/library/assets/components/VcCheckbox/VcCheckbox.css +1 -1
- package/library/assets/components/VcCodeBlock/VcCodeBlock.css +1 -1
- package/library/assets/components/VcCollapse/VcCollapseItem.css +1 -1
- package/library/assets/components/VcColorPicker/VcColorPicker.css +1 -1
- package/library/assets/components/VcDatePicker/VcDatePicker.css +1 -1
- package/library/assets/components/VcDatePickerPanel/VcDatePickerPanel.css +1 -1
- package/library/assets/components/VcDropdown/VcDropdownItem.css +1 -1
- package/library/assets/components/VcEmojiPicker/VcEmojiPicker.css +1 -1
- package/library/assets/components/VcExtendedDatetimeRangePicker/VcExtendedDatetimeRangePicker.css +1 -1
- package/library/assets/components/VcExtendedDatetimeRangePicker/VcExtendedDatetimeRangePickerQuickOptionsSelection.css +1 -1
- package/library/assets/components/VcFileUploader/VcFileItem.css +1 -1
- package/library/assets/components/VcFileUploader/VcFileUploaderArea.css +1 -1
- package/library/assets/components/VcFileUploader/VcFileUploaderSimple.css +1 -1
- package/library/assets/components/VcForm/UiComponents/VcInputLabel.css +1 -1
- package/library/assets/components/VcHyperLink/VcHyperLink.css +1 -1
- package/library/assets/components/VcImageUploader/VcImageUploader.css +1 -1
- package/library/assets/components/VcInput/VcInput.css +1 -1
- package/library/assets/components/VcInputNumber/VcInputNumber.css +1 -1
- package/library/assets/components/VcJsonSchema/Components/JsonCodeMirror.css +1 -1
- package/library/assets/components/VcJsonViewer/UiComponents/VcJsonViewerAuto.css +1 -1
- package/library/assets/components/VcJsonViewer/UiComponents/VcJsonViewerCards.css +1 -1
- package/library/assets/components/VcJsonViewer/UiComponents/VcJsonViewerKey.css +1 -1
- package/library/assets/components/VcJsonViewer/UiComponents/VcJsonViewerState.css +1 -1
- package/library/assets/components/VcJsonViewer/UiComponents/VcJsonViewerValue.css +1 -1
- package/library/assets/components/VcJsonViewer/VcJsonViewer.css +1 -1
- package/library/assets/components/VcLightbox/VcLightbox.css +1 -1
- package/library/assets/components/VcMdEditor/ParameterNode.css +1 -1
- package/library/assets/components/VcMdEditor/VcMdEditorContent.css +1 -1
- package/library/assets/components/VcMessage/VcMessage.css +1 -1
- package/library/assets/components/VcMessage/reactions/VcMessageReactionBar.css +1 -1
- package/library/assets/components/VcOtpInput/VcOtpInput.css +1 -1
- package/library/assets/components/VcPdfViewer/VcPdfDocumentViewerFooter.css +1 -1
- package/library/assets/components/VcRadio/VcRadio.css +1 -1
- package/library/assets/components/VcRadioButtons/VcRadioButtonsGroup.css +1 -1
- package/library/assets/components/VcRadioTabs/UiComponents/VcRadioTabsNav.css +1 -1
- package/library/assets/components/VcRadioTabs/VcRadioTabs.css +1 -1
- package/library/assets/components/VcSegmented/VcSegmented.css +1 -1
- package/library/assets/components/VcSelect/VcSelect.css +1 -1
- package/library/assets/components/VcSelect/VcSelectOption.css +1 -1
- package/library/assets/components/VcSipFlow/VcSipFlow.css +1 -1
- package/library/assets/components/VcSoundplayer/VcPlayerPlaybackRate.css +1 -1
- package/library/assets/components/VcSoundplayer/VcSoundPlayerMarker.css +1 -1
- package/library/assets/components/VcSplitButton/VcSplitButton.css +1 -1
- package/library/assets/components/VcSwitch/VcSwitch.css +1 -1
- package/library/assets/components/VcTable/VcTable.css +1 -1
- package/library/assets/components/VcTabs/VcTabNav.css +1 -1
- package/library/assets/components/VcTag/VcTag.css +1 -1
- package/library/assets/components/VcTagInput/VcTagInput.css +1 -1
- package/library/assets/components/VcToolCall/VcToolCall.css +1 -1
- package/library/assets/components/VcTour/VcTour.css +1 -1
- package/library/assets/components/VcTransfer/VcTransfer.css +1 -1
- package/library/assets/components/VcTree/VcTreeSelect.css +1 -1
- package/library/assets/components/VcVerticalTabs/VcVerticalTabs.css +1 -1
- package/library/assets/components/VcVerticalTabs/VerticalTabNav.css +1 -1
- package/library/assets/entity/components/Tabs/VcEntityEditableTabs.css +1 -1
- package/library/assets/node_modules/element-plus/theme-chalk/src/tree.css +1 -1
- package/library/components/VcDatePicker/VcDatePicker.vue.mjs +1 -1
- package/library/components/VcExcelUploader/VcExcelFileProcessLoader.vue.mjs +1 -1
- package/library/components/VcExcelUploader/VcExcelFileUploadBlock.vue.mjs +1 -1
- package/library/components/VcExcelUploader/VcFileImportErrorsCard.vue.mjs +2 -2
- package/library/components/VcExcelUploader/VcFileImportParseResultBlock.vue.mjs +4 -4
- package/library/components/VcExcelUploader/VcFileImportResultBindDataTable.vue.mjs +0 -1
- package/library/components/VcExtendedDatetimeRangePicker/VcExtendedDatetimeRangePicker.vue.mjs +2 -2
- package/library/components/VcHtmlEditor/VcHtmlEditor.vue.mjs +1 -1
- package/library/components/VcIconPicker/VcIconPicker.vue.mjs +2 -2
- package/library/components/VcImageUploader/VcImageUploader.vue.mjs +4 -4
- package/library/components/VcJsonViewer/UiComponents/VcJsonViewerSections.vue.mjs +9 -4
- package/library/components/VcMdEditor/ParameterNode.vue.mjs +1 -1
- package/library/components/VcMdEditor/ParameterNode.vue2.mjs +1 -1
- package/library/components/VcMdEditor/VcMdEditor.vue.mjs +1 -1
- package/library/components/VcPdfViewer/VcPdfDocumentCard.vue.mjs +3 -3
- package/library/components/VcPdfViewer/VcPdfDocumentViewerFooter.vue.mjs +2 -2
- package/library/components/VcPdfViewer/VcPdfDocumentViewerToolbar.vue.mjs +4 -4
- package/library/components/VcSegmented/VcSegmented.vue.mjs +88 -41
- package/library/components/VcSelect/VcInfiniteScrollSelect.vue.mjs +1 -1
- package/library/components/VcSipFlow/VcSipFlow.vue.mjs +1 -3
- package/library/components/VcSoundplayer/VcPlayerPlayStopButton.vue.mjs +4 -4
- package/library/components/VcSoundplayer/VcPlayerPlaybackRate.vue.mjs +1 -1
- package/library/components/VcSoundplayer/VcPlayerPlaybackRatePopup.vue.mjs +2 -2
- package/library/components/VcSoundplayer/VcPlayerSkipButtons.vue.mjs +2 -2
- package/library/components/VcSoundplayer/VcSoundPlayer.vue.mjs +2 -2
- package/library/components/VcSoundplayer/VcSoundPlayerMarker.vue.mjs +1 -1
- package/library/components/VcSoundplayer/VcSoundVolume.vue.mjs +2 -2
- package/library/components/VcSoundplayer/player.options.mjs +2 -2
- package/library/components/VcTable/VcTable.vue.mjs +5 -8
- package/library/components/VcTabs/VcTabNav.vue.mjs +45 -32
- package/library/components/VcTabs/VcTabPane.vue.mjs +12 -3
- package/library/components/VcTour/VcTour.vue.mjs +104 -16
- package/library/components/VcTree/VcTree.vue.mjs +1 -1
- package/library/components/VcTree/VcTreeSelect.vue.mjs +1 -1
- package/library/components/VcWizard/VcSummaryProgress.vue.mjs +1 -1
- package/library/components/VcWizard/VcSummaryStep.vue.mjs +3 -3
- package/library/components/VcWizard/VcWizard.vue.mjs +2 -16
- package/library/entity/components/Form/VcEntityVerticalEditForm.vue.mjs +6 -10
- package/library/entity/components/Table/VcEntityListTable.vue.mjs +1 -2
- package/library/entity/components/Tabs/VcEntityEditableTabs.vue.mjs +51 -7
- package/library/font/index.mjs +1 -1
- package/library/index.mjs +200 -206
- package/library/index.mjs.br +0 -0
- package/library/index.mjs.gz +0 -0
- package/library/plugin-components.gen.mjs +198 -204
- package/library/plugin.mjs +198 -204
- package/library/plugin.mjs.br +0 -0
- package/library/plugin.mjs.gz +0 -0
- package/library/style.css +67 -71
- package/library/style.css.br +0 -0
- package/library/style.css.gz +0 -0
- package/library/theme/index.mjs +1 -1
- package/library/theme/index.mjs.br +0 -0
- package/library/theme/index.mjs.gz +0 -0
- package/library/theme/themeMerge.mjs +2 -0
- package/library/theme/themes.json.mjs +33 -144
- package/library/types/components/VcApprovalCard/VcApprovalCard.vue.d.ts +1 -1
- package/library/types/components/VcButton/VcToggleButton.vue.d.ts +1 -1
- package/library/types/components/VcCheckbox/VcCheckboxButtonGroup.vue.d.ts +3 -3
- package/library/types/components/VcCheckboxGroup/VcCheckboxGroup.vue.d.ts +3 -3
- package/library/types/components/VcMdEditor/VcMdEditor.vue.d.ts +1 -1
- package/library/types/components/VcMessage/VcMessage.vue.d.ts +1 -1
- package/library/types/components/VcSegmented/VcSegmented.vue.d.ts +25 -16
- package/library/types/components/VcSelect/VcSelect.vue.d.ts +3 -3
- package/library/types/components/VcTable/VcTable.vue.d.ts +22 -22
- package/library/types/components/VcTabs/VcTabPane.vue.d.ts +8 -0
- package/library/types/components/VcTabs/VcTabs.vue.d.ts +2 -0
- package/library/types/components/VcTag/VcTag.vue.d.ts +1 -1
- package/library/types/components/VcToolCall/VcToolCall.vue.d.ts +1 -1
- package/library/types/components/exports.d.ts +1 -5
- package/library/types/components.gen.d.ts +0 -2
- package/library/types/entity/components/Tabs/VcEntityEditableTabs.vue.d.ts +14 -8
- package/library/types/theme/themes.json.d.ts +31 -136
- package/library/types/types/ExcelParser.types.d.ts +0 -7
- package/library/types/types/Tabs.d.ts +16 -0
- package/library/types/types/VcDatetimeRangePicker.types.d.ts +0 -19
- package/library/types/types/VcTable.types.d.ts +5 -0
- package/library/types/types/VcTabs.types.d.ts +1 -0
- package/library/types/types/VcWizard.types.d.ts +0 -4
- package/library/utils/jsonSchema/jsonSchemaHelpers.mjs +1 -1
- package/library/utils/lucideIcon.mjs +1 -1
- package/package.json +2 -2
- package/src/theme/index.ts +101 -101
- package/src/theme/tailwindScheme.js +10 -2
- package/src/theme/theme.types.ts +31 -31
- package/src/theme/themeMerge.ts +2 -0
- package/src/theme/themes.json +31 -136
- package/tailwind.config.d.ts +5 -5
- package/tailwind.config.js +2 -0
- package/library/assets/components/VcDatetimeRangePicker/VcDatetimeRangePicker.css +0 -1
- package/library/assets/components/VcViewSwitcher/VcViewSwitcher.css +0 -1
- package/library/components/VcDatetimeRangePicker/VcDatetimeRangePicker.vue.mjs +0 -24
- package/library/components/VcDatetimeRangePicker/VcDatetimeRangePicker.vue3.mjs +0 -5
- package/library/components/VcViewSwitcher/VcViewSwitcher.vue.mjs +0 -86
- package/library/components/VcViewSwitcher/VcViewSwitcher.vue3.mjs +0 -5
- package/library/types/components/VcDatetimeRangePicker/VcDatetimeRangePicker.vue.d.ts +0 -2
- package/library/types/components/VcViewSwitcher/VcViewSwitcher.vue.d.ts +0 -74
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../../assets/components/VcTabs/VcTabPane.css';
|
|
2
|
-
import { defineComponent, useSlots, inject, ref, computed, watch, onMounted, onUnmounted, provide, withDirectives, openBlock, createElementBlock, unref, renderSlot, createBlock, resolveDynamicComponent, createTextVNode, vShow, createCommentVNode } from "vue";
|
|
2
|
+
import { defineComponent, useSlots, inject, ref, computed, watch, onMounted, reactive, onUnmounted, provide, withDirectives, openBlock, createElementBlock, unref, renderSlot, createBlock, resolveDynamicComponent, createTextVNode, vShow, createCommentVNode } from "vue";
|
|
3
3
|
import { VcTabsProvideKey, VcTabPaneProvideKey } from "../../tokens/tokens.mjs";
|
|
4
4
|
const _hoisted_1 = {
|
|
5
5
|
key: 0,
|
|
@@ -16,6 +16,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
16
|
navClass: { default: "" },
|
|
17
17
|
closable: { type: Boolean, default: false },
|
|
18
18
|
disabled: { type: Boolean, default: false },
|
|
19
|
+
disabledHint: { default: void 0 },
|
|
19
20
|
lazy: { type: Boolean, default: false },
|
|
20
21
|
tabData: { default: () => ({}) },
|
|
21
22
|
index: { default: 0 }
|
|
@@ -54,7 +55,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54
55
|
}
|
|
55
56
|
);
|
|
56
57
|
onMounted(() => {
|
|
57
|
-
const paneData = {
|
|
58
|
+
const paneData = reactive({
|
|
58
59
|
paneName: props.name,
|
|
59
60
|
active: isActive.value,
|
|
60
61
|
icon: props.icon,
|
|
@@ -65,8 +66,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
65
66
|
isClosable: props.closable,
|
|
66
67
|
tabData: props.tabData,
|
|
67
68
|
navClass: props.navClass
|
|
68
|
-
};
|
|
69
|
+
});
|
|
69
70
|
parentTabData == null ? void 0 : parentTabData.registerPane(paneData);
|
|
71
|
+
watch(
|
|
72
|
+
() => [props.disabled, props.disabledHint],
|
|
73
|
+
([disabled, disabledHint]) => {
|
|
74
|
+
paneData.disabled = disabled;
|
|
75
|
+
paneData.props.disabled = disabled;
|
|
76
|
+
paneData.props.disabledHint = disabledHint;
|
|
77
|
+
}
|
|
78
|
+
);
|
|
70
79
|
});
|
|
71
80
|
onUnmounted(() => {
|
|
72
81
|
parentTabData == null ? void 0 : parentTabData.unregisterPane(props.name);
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { defineComponent, useSlots, openBlock, createBlock, unref, isRef,
|
|
2
|
-
import { ElTour, ElTourStep } from "element-plus";
|
|
3
|
-
import '../../assets/node_modules/element-plus/theme-chalk/src/tour.css';import '../../assets/node_modules/element-plus/theme-chalk/src/button.css';import '../../assets/node_modules/element-plus/theme-chalk/src/base.css';
|
|
1
|
+
import { defineComponent, useSlots, computed, openBlock, createBlock, unref, isRef, withCtx, createElementBlock, Fragment, renderList, mergeProps, createSlots, renderSlot, createCommentVNode, createElementVNode, normalizeClass, createVNode } from "vue";
|
|
2
|
+
import { useLocale, ElTour, ElTourStep } from "element-plus";
|
|
3
|
+
import '../../assets/components/VcButton/VcButton.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tour.css';import '../../assets/node_modules/element-plus/theme-chalk/src/button.css';import '../../assets/node_modules/element-plus/theme-chalk/src/base.css';
|
|
4
4
|
import '../../assets/components/VcTour/VcTour.css';/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
7
|
import { useVModel } from "@vueuse/core";
|
|
8
|
+
import _sfc_main$1 from "../VcButton/VcButton.vue.mjs";
|
|
9
|
+
/* empty css */
|
|
10
|
+
const _hoisted_1 = { class: "vc-tour__footer" };
|
|
11
|
+
const _hoisted_2 = { class: "vc-tour__indicators" };
|
|
12
|
+
const _hoisted_3 = { class: "vc-tour__buttons" };
|
|
8
13
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
14
|
__name: "VcTour",
|
|
10
15
|
props: {
|
|
@@ -29,8 +34,51 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29
34
|
const props = __props;
|
|
30
35
|
const emit = __emit;
|
|
31
36
|
const slots = useSlots();
|
|
37
|
+
const { t } = useLocale();
|
|
38
|
+
const tourMask = computed(() => {
|
|
39
|
+
if (props.mask === false) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
const own = props.mask === true ? {} : props.mask;
|
|
43
|
+
return {
|
|
44
|
+
...own,
|
|
45
|
+
color: (own == null ? void 0 : own.color) ?? "var(--vc-bg-overlay)"
|
|
46
|
+
};
|
|
47
|
+
});
|
|
32
48
|
const localModel = useVModel(props, "modelValue", emit);
|
|
33
|
-
const localCurrent = useVModel(props, "current", emit
|
|
49
|
+
const localCurrent = useVModel(props, "current", emit, {
|
|
50
|
+
passive: true,
|
|
51
|
+
defaultValue: 0
|
|
52
|
+
});
|
|
53
|
+
const ButtonLabel = (labelProps) => labelProps.label;
|
|
54
|
+
ButtonLabel.props = ["label"];
|
|
55
|
+
function stepButtons(index) {
|
|
56
|
+
var _a, _b;
|
|
57
|
+
const own = (_b = (_a = props.steps) == null ? void 0 : _a[index]) == null ? void 0 : _b.props;
|
|
58
|
+
return {
|
|
59
|
+
prev: own == null ? void 0 : own.prevButtonProps,
|
|
60
|
+
next: own == null ? void 0 : own.nextButtonProps
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function onPrev(index) {
|
|
64
|
+
var _a, _b;
|
|
65
|
+
localCurrent.value = index - 1;
|
|
66
|
+
(_b = (_a = stepButtons(index).prev) == null ? void 0 : _a.onClick) == null ? void 0 : _b.call(_a);
|
|
67
|
+
emit("change", index - 1);
|
|
68
|
+
}
|
|
69
|
+
function onNext(index, total) {
|
|
70
|
+
var _a, _b, _c, _d;
|
|
71
|
+
if (index >= total - 1) {
|
|
72
|
+
(_b = (_a = stepButtons(index).next) == null ? void 0 : _a.onClick) == null ? void 0 : _b.call(_a);
|
|
73
|
+
localModel.value = false;
|
|
74
|
+
emit("close", index);
|
|
75
|
+
emit("finish");
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
localCurrent.value = index + 1;
|
|
79
|
+
(_d = (_c = stepButtons(index).next) == null ? void 0 : _c.onClick) == null ? void 0 : _d.call(_c);
|
|
80
|
+
emit("change", index + 1);
|
|
81
|
+
}
|
|
34
82
|
function onClose(currentStep) {
|
|
35
83
|
emit("close", currentStep);
|
|
36
84
|
}
|
|
@@ -50,7 +98,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
98
|
"show-arrow": __props.showArrow,
|
|
51
99
|
placement: __props.placement,
|
|
52
100
|
"content-style": __props.contentStyle,
|
|
53
|
-
mask:
|
|
101
|
+
mask: tourMask.value,
|
|
54
102
|
gap: __props.gap,
|
|
55
103
|
"scroll-into-view-options": __props.scrollIntoViewOptions,
|
|
56
104
|
"z-index": __props.zIndex,
|
|
@@ -62,7 +110,55 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
110
|
onClose,
|
|
63
111
|
onFinish,
|
|
64
112
|
onChange
|
|
65
|
-
},
|
|
113
|
+
}, {
|
|
114
|
+
indicators: withCtx(({ current: stepIndex, total }) => [
|
|
115
|
+
createElementVNode("div", _hoisted_1, [
|
|
116
|
+
createElementVNode("div", _hoisted_2, [
|
|
117
|
+
_ctx.$slots.indicators ? renderSlot(_ctx.$slots, "indicators", {
|
|
118
|
+
key: 0,
|
|
119
|
+
indicator: { current: stepIndex, total }
|
|
120
|
+
}) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(total, (index) => {
|
|
121
|
+
return openBlock(), createElementBlock("span", {
|
|
122
|
+
key: index,
|
|
123
|
+
class: normalizeClass(["vc-tour__indicator", { "is--active": index - 1 === stepIndex }])
|
|
124
|
+
}, null, 2);
|
|
125
|
+
}), 128))
|
|
126
|
+
]),
|
|
127
|
+
createElementVNode("div", _hoisted_3, [
|
|
128
|
+
stepIndex > 0 ? (openBlock(), createBlock(_sfc_main$1, {
|
|
129
|
+
key: 0,
|
|
130
|
+
size: "small",
|
|
131
|
+
type: "outline",
|
|
132
|
+
color: "secondary",
|
|
133
|
+
onClick: ($event) => onPrev(stepIndex)
|
|
134
|
+
}, {
|
|
135
|
+
default: withCtx(() => {
|
|
136
|
+
var _a;
|
|
137
|
+
return [
|
|
138
|
+
createVNode(ButtonLabel, {
|
|
139
|
+
label: ((_a = stepButtons(stepIndex).prev) == null ? void 0 : _a.children) ?? unref(t)("el.tour.previous")
|
|
140
|
+
}, null, 8, ["label"])
|
|
141
|
+
];
|
|
142
|
+
}),
|
|
143
|
+
_: 2
|
|
144
|
+
}, 1032, ["onClick"])) : createCommentVNode("", true),
|
|
145
|
+
createVNode(_sfc_main$1, {
|
|
146
|
+
size: "small",
|
|
147
|
+
onClick: ($event) => onNext(stepIndex, total)
|
|
148
|
+
}, {
|
|
149
|
+
default: withCtx(() => {
|
|
150
|
+
var _a;
|
|
151
|
+
return [
|
|
152
|
+
createVNode(ButtonLabel, {
|
|
153
|
+
label: ((_a = stepButtons(stepIndex).next) == null ? void 0 : _a.children) ?? (stepIndex === total - 1 ? unref(t)("el.tour.finish") : unref(t)("el.tour.next"))
|
|
154
|
+
}, null, 8, ["label"])
|
|
155
|
+
];
|
|
156
|
+
}),
|
|
157
|
+
_: 2
|
|
158
|
+
}, 1032, ["onClick"])
|
|
159
|
+
])
|
|
160
|
+
])
|
|
161
|
+
]),
|
|
66
162
|
default: withCtx(() => [
|
|
67
163
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.steps, (step) => {
|
|
68
164
|
return openBlock(), createBlock(unref(ElTourStep), mergeProps({
|
|
@@ -91,16 +187,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
91
187
|
]), 1040, ["target", "title", "description"]);
|
|
92
188
|
}), 128))
|
|
93
189
|
]),
|
|
94
|
-
_:
|
|
95
|
-
}, [
|
|
96
|
-
_ctx.$slots.indicators ? {
|
|
97
|
-
name: "indicators",
|
|
98
|
-
fn: withCtx((indicator) => [
|
|
99
|
-
renderSlot(_ctx.$slots, "indicators", { indicator })
|
|
100
|
-
]),
|
|
101
|
-
key: "0"
|
|
102
|
-
} : void 0
|
|
103
|
-
]), 1032, ["modelValue", "current", "append-to", "show-arrow", "placement", "content-style", "mask", "gap", "scroll-into-view-options", "z-index", "show-close", "close-icon", "close-on-press-escape", "target-area-clickable"]);
|
|
190
|
+
_: 3
|
|
191
|
+
}, 8, ["modelValue", "current", "append-to", "show-arrow", "placement", "content-style", "mask", "gap", "scroll-into-view-options", "z-index", "show-close", "close-icon", "close-on-press-escape", "target-area-clickable"]);
|
|
104
192
|
};
|
|
105
193
|
}
|
|
106
194
|
});
|
|
@@ -347,7 +347,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
347
347
|
data[props.config.iconKey] ? (openBlock(), createBlock(_sfc_main$2, {
|
|
348
348
|
key: 0,
|
|
349
349
|
icon: data[props.config.iconKey],
|
|
350
|
-
class: normalizeClass([[colorClass.value], "vc-tree-node-icon icon-
|
|
350
|
+
class: normalizeClass([[colorClass.value], "vc-tree-node-icon icon-xl"])
|
|
351
351
|
}, null, 8, ["icon", "class"])) : createCommentVNode("", true),
|
|
352
352
|
createElementVNode("span", {
|
|
353
353
|
class: normalizeClass([props.config.nodeLabelClassName ? data[props.config.nodeLabelClassName] : "", "vc-tree-node-label"])
|
|
@@ -310,7 +310,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
310
310
|
createElementVNode("div", _hoisted_5, [
|
|
311
311
|
createVNode(_sfc_main$3, {
|
|
312
312
|
icon: unref(FolderTree),
|
|
313
|
-
class: "text-content-primary icon-
|
|
313
|
+
class: "text-content-primary icon-xl"
|
|
314
314
|
}, null, 8, ["icon"])
|
|
315
315
|
])
|
|
316
316
|
], 2)
|
|
@@ -56,7 +56,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
56
56
|
createElementVNode("div", _hoisted_3, [
|
|
57
57
|
createVNode(_sfc_main$1, {
|
|
58
58
|
icon: __props.icon,
|
|
59
|
-
class: normalizeClass([[__props.activeDot ? "text-
|
|
59
|
+
class: normalizeClass([[__props.activeDot ? "text-content-brand" : "text-content-disabled"], "step-icon min-w-8"])
|
|
60
60
|
}, null, 8, ["icon", "class"])
|
|
61
61
|
])
|
|
62
62
|
])
|
|
@@ -71,18 +71,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
71
71
|
__props.hideDetails ? (openBlock(), createBlock(_sfc_main$2, {
|
|
72
72
|
key: 0,
|
|
73
73
|
icon: __props.step.icon,
|
|
74
|
-
class: normalizeClass([[isActive.value ? "text-
|
|
74
|
+
class: normalizeClass([[isActive.value ? "text-content-brand" : "text-content-disabled"], "icon-xl hidden lg:block"])
|
|
75
75
|
}, null, 8, ["icon", "class"])) : createCommentVNode("", true),
|
|
76
76
|
createElementVNode("span", {
|
|
77
77
|
class: normalizeClass([{ "truncate": __props.hideDetails }, "summary-step-content-header leading-none"])
|
|
78
78
|
}, [
|
|
79
79
|
createElementVNode("span", {
|
|
80
|
-
class: normalizeClass([{ "text-
|
|
80
|
+
class: normalizeClass([{ "text-content-brand": isActive.value }, "mb-0 text-sm xl:text-base font-medium uppercase"])
|
|
81
81
|
}, toDisplayString(`${(__props.stepIndex ?? 0) + 1}. ${__props.step.label}`), 3)
|
|
82
82
|
], 2),
|
|
83
83
|
withDirectives(createVNode(_sfc_main$2, {
|
|
84
84
|
icon: unref(Pencil),
|
|
85
|
-
class: "icon-base text-
|
|
85
|
+
class: "icon-base text-content-brand relative -mr-4 edit-icon"
|
|
86
86
|
}, null, 8, ["icon"]), [
|
|
87
87
|
[vShow, canEdit.value]
|
|
88
88
|
])
|
|
@@ -34,14 +34,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
34
34
|
},
|
|
35
35
|
emits: ["update-step", "cancel", "final"],
|
|
36
36
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
37
|
-
const deprecatedWizardKeysWarned = /* @__PURE__ */ new Set();
|
|
38
|
-
function warnDeprecatedWizardKey(oldKey, newKey) {
|
|
39
|
-
if (deprecatedWizardKeysWarned.has(oldKey)) return;
|
|
40
|
-
deprecatedWizardKeysWarned.add(oldKey);
|
|
41
|
-
console.warn(
|
|
42
|
-
`[VcWizard] step.${oldKey} is deprecated and will be removed in v4. Rename it to step.${newKey}.`
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
37
|
const slots = useSlots();
|
|
46
38
|
const props = __props;
|
|
47
39
|
const emit = __emit;
|
|
@@ -107,10 +99,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
107
99
|
async function runStepValidateFn(index) {
|
|
108
100
|
var _a;
|
|
109
101
|
const stepItem = (_a = props.steps) == null ? void 0 : _a[index];
|
|
110
|
-
|
|
111
|
-
warnDeprecatedWizardKey("beforeStepFn", "validateStepFn");
|
|
112
|
-
}
|
|
113
|
-
const validateStepFn = (stepItem == null ? void 0 : stepItem.validateStepFn) || (stepItem == null ? void 0 : stepItem.beforeStepFn);
|
|
102
|
+
const validateStepFn = stepItem == null ? void 0 : stepItem.validateStepFn;
|
|
114
103
|
if (!validateStepFn) {
|
|
115
104
|
return true;
|
|
116
105
|
}
|
|
@@ -172,10 +161,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
172
161
|
}
|
|
173
162
|
lastEnteredStepIndex.value = index;
|
|
174
163
|
const currentStep = (_a = props.steps) == null ? void 0 : _a[index];
|
|
175
|
-
|
|
176
|
-
warnDeprecatedWizardKey("onEnterStepFn", "initStepFn");
|
|
177
|
-
}
|
|
178
|
-
const initStepFn = (currentStep == null ? void 0 : currentStep.initStepFn) || (currentStep == null ? void 0 : currentStep.onEnterStepFn);
|
|
164
|
+
const initStepFn = currentStep == null ? void 0 : currentStep.initStepFn;
|
|
179
165
|
if (initStepFn) {
|
|
180
166
|
try {
|
|
181
167
|
await initStepFn();
|
|
@@ -14,8 +14,7 @@ const _hoisted_2 = {
|
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "flex-center"
|
|
16
16
|
};
|
|
17
|
-
const _hoisted_3 = { class: "
|
|
18
|
-
const _hoisted_4 = { class: "w-full" };
|
|
17
|
+
const _hoisted_3 = { class: "w-full" };
|
|
19
18
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
19
|
__name: "VcEntityVerticalEditForm",
|
|
21
20
|
props: {
|
|
@@ -96,19 +95,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
96
95
|
isArchived.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
97
96
|
createVNode(_sfc_main$3, {
|
|
98
97
|
color: "destructive",
|
|
99
|
-
square: ""
|
|
100
|
-
|
|
101
|
-
label:
|
|
102
|
-
|
|
103
|
-
]),
|
|
104
|
-
_: 1
|
|
105
|
-
})
|
|
98
|
+
square: "",
|
|
99
|
+
class: "select-none",
|
|
100
|
+
label: unref(tVU).t("voicenterUi.general.archived")
|
|
101
|
+
}, null, 8, ["label"])
|
|
106
102
|
])) : createCommentVNode("", true)
|
|
107
103
|
])
|
|
108
104
|
])
|
|
109
105
|
]),
|
|
110
106
|
"additional-action": withCtx(() => [
|
|
111
|
-
createElementVNode("div",
|
|
107
|
+
createElementVNode("div", _hoisted_3, [
|
|
112
108
|
showDeleteAction.value ? (openBlock(), createBlock(_sfc_main$2, {
|
|
113
109
|
key: 0,
|
|
114
110
|
loading: unref(loading),
|
|
@@ -85,7 +85,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
85
85
|
const searchModel = ref("");
|
|
86
86
|
const searchInputRef = ref();
|
|
87
87
|
const debouncedSearchModel = refDebounced(searchModel, 300);
|
|
88
|
-
const tableColumns = computed(() => props.columns);
|
|
89
88
|
const usedSlots = computed(() => {
|
|
90
89
|
return Object.keys(slots);
|
|
91
90
|
});
|
|
@@ -238,7 +237,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
238
237
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
239
238
|
createVNode(_sfc_main$1, mergeProps(unref(attrs), {
|
|
240
239
|
options: dataSearched.value,
|
|
241
|
-
columns:
|
|
240
|
+
columns: __props.columns,
|
|
242
241
|
loading: !!unref(loading),
|
|
243
242
|
"show-selection": isShowSelection.value,
|
|
244
243
|
"show-actions-column": __props.showActionColumns,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../../../assets/entity/components/Tabs/VcEntityEditableTabs.css';
|
|
2
|
-
import { defineComponent, ref, computed, watch, openBlock, createBlock, isRef, unref, withCtx, createElementBlock, Fragment, renderList, renderSlot, createCommentVNode } from "vue";
|
|
2
|
+
import { defineComponent, useSlots, ref, computed, watch, openBlock, createBlock, isRef, unref, withCtx, createElementBlock, Fragment, renderList, renderSlot, createCommentVNode } from "vue";
|
|
3
3
|
import { LIST_TAB_QUERY_VALUE, CREATE_TAB_QUERY_VALUE } from "../../../enum/constants.mjs";
|
|
4
4
|
import _sfc_main$1 from "../../../components/VcTabs/VcTabs.vue.mjs";
|
|
5
5
|
import '../../../assets/components/VcTabs/VcTabPane.css';import '../../../assets/components/VcTabs/VcTabs.css';/* empty css */
|
|
@@ -21,7 +21,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
confirmClose: { type: Function, default: void 0 },
|
|
22
22
|
tabListIcon: { default: () => List },
|
|
23
23
|
tabEditIcon: { default: () => Pencil },
|
|
24
|
-
tabCreateIcon: { default: () => Plus }
|
|
24
|
+
tabCreateIcon: { default: () => Plus },
|
|
25
|
+
createTabDisabledHint: { default: void 0 },
|
|
26
|
+
fixedTabs: { default: () => [] }
|
|
25
27
|
},
|
|
26
28
|
emits: ["update:modelValue", "close-tab", "tab-change", "permission-error"],
|
|
27
29
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -31,6 +33,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31
33
|
add: Plus
|
|
32
34
|
};
|
|
33
35
|
const props = __props;
|
|
36
|
+
const slots = useSlots();
|
|
37
|
+
const FixedTabContent = ({ name }) => {
|
|
38
|
+
var _a;
|
|
39
|
+
return (_a = slots[`tab-${name}`]) == null ? void 0 : _a.call(slots);
|
|
40
|
+
};
|
|
34
41
|
const emit = __emit;
|
|
35
42
|
const vcTabs = ref(null);
|
|
36
43
|
const editTabs = ref([]);
|
|
@@ -46,11 +53,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
46
53
|
icon: props.tabListIcon ?? TAB_ICONS.list,
|
|
47
54
|
label: props.entity.entityTypeListLabelTranslations
|
|
48
55
|
};
|
|
56
|
+
const fixedTabsList = props.fixedTabs.map((tab) => ({
|
|
57
|
+
name: tab.name,
|
|
58
|
+
label: tab.label,
|
|
59
|
+
icon: tab.icon,
|
|
60
|
+
disabled: tab.disabled,
|
|
61
|
+
disabledHint: tab.disabledHint
|
|
62
|
+
}));
|
|
49
63
|
const editTabsList = [
|
|
50
64
|
...editTabs.value
|
|
51
65
|
];
|
|
52
66
|
const tabs = [
|
|
53
67
|
listTab,
|
|
68
|
+
...fixedTabsList,
|
|
54
69
|
...editTabsList
|
|
55
70
|
];
|
|
56
71
|
if (!props.hideCreateTab) {
|
|
@@ -61,16 +76,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
61
76
|
icon: props.tabCreateIcon ?? TAB_ICONS.add,
|
|
62
77
|
label: "",
|
|
63
78
|
navClass: "create-nav-tab",
|
|
64
|
-
disabled: !props.entity.canCreate()
|
|
79
|
+
disabled: !props.entity.canCreate(),
|
|
80
|
+
disabledHint: props.createTabDisabledHint
|
|
65
81
|
}
|
|
66
82
|
];
|
|
67
83
|
} else {
|
|
68
84
|
return tabs;
|
|
69
85
|
}
|
|
70
86
|
});
|
|
87
|
+
const isActiveFixedTabDisabled = computed(() => {
|
|
88
|
+
return props.fixedTabs.some(({ name, disabled }) => name === activeTabModel.value && disabled);
|
|
89
|
+
});
|
|
71
90
|
function isTabActive(tabName) {
|
|
72
91
|
return activeTabModel.value === tabName;
|
|
73
92
|
}
|
|
93
|
+
function isFixedTabName(tabName) {
|
|
94
|
+
return props.fixedTabs.some(({ name }) => name === tabName);
|
|
95
|
+
}
|
|
74
96
|
function setActiveTabByRouteQueryValue() {
|
|
75
97
|
const queryTabName = props.queryTabName;
|
|
76
98
|
if (typeof queryTabName !== "string") {
|
|
@@ -81,6 +103,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
81
103
|
if (queryTabName === CREATE_TAB_QUERY_VALUE && !props.entity.canCreate()) {
|
|
82
104
|
return;
|
|
83
105
|
}
|
|
106
|
+
if (isFixedTabName(queryTabName) && tabFromOpened.disabled) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
84
109
|
activeTabModel.value = tabFromOpened.name;
|
|
85
110
|
} else {
|
|
86
111
|
try {
|
|
@@ -118,6 +143,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
118
143
|
console.error("Cannot extract name from", entityData);
|
|
119
144
|
return;
|
|
120
145
|
}
|
|
146
|
+
if (isFixedTabName(tabName)) {
|
|
147
|
+
console.error("Record id equals a fixed tab name:", tabName);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
121
150
|
const isTabOpened = dataTabs.value.find(({ name }) => name === tabName);
|
|
122
151
|
if (!isTabOpened) {
|
|
123
152
|
const newTab = {
|
|
@@ -191,7 +220,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
191
220
|
onTabRemove(activeTabModel.value);
|
|
192
221
|
}
|
|
193
222
|
function getTabIcon(tab) {
|
|
194
|
-
if (tab.name === CREATE_TAB_QUERY_VALUE || tab.name === LIST_TAB_QUERY_VALUE) {
|
|
223
|
+
if (tab.name === CREATE_TAB_QUERY_VALUE || tab.name === LIST_TAB_QUERY_VALUE || isFixedTabName(tab.name)) {
|
|
195
224
|
return tab.icon;
|
|
196
225
|
}
|
|
197
226
|
return props.tabEditIcon ?? TAB_ICONS.edit;
|
|
@@ -219,6 +248,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
219
248
|
(_a = vcTabs.value) == null ? void 0 : _a.toggleNextTab();
|
|
220
249
|
}
|
|
221
250
|
watch(activeTabModel, onActiveTabChange);
|
|
251
|
+
watch(
|
|
252
|
+
isActiveFixedTabDisabled,
|
|
253
|
+
(disabled) => {
|
|
254
|
+
if (disabled) {
|
|
255
|
+
openListTab();
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
immediate: true
|
|
260
|
+
}
|
|
261
|
+
);
|
|
222
262
|
setActiveTabByRouteQueryValue();
|
|
223
263
|
useTabsEditableDataProvide({
|
|
224
264
|
editableModels: editableTabsData,
|
|
@@ -260,23 +300,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
260
300
|
name: tabItem.name,
|
|
261
301
|
index,
|
|
262
302
|
label: tabItem.label,
|
|
263
|
-
closable: tabItem.name !== "list" && tabItem.name !== "create",
|
|
303
|
+
closable: tabItem.name !== "list" && tabItem.name !== "create" && !isFixedTabName(tabItem.name),
|
|
264
304
|
icon: getTabIcon(tabItem),
|
|
265
305
|
lazy: __props.lazyLoad,
|
|
266
306
|
disabled: tabItem.disabled,
|
|
307
|
+
"disabled-hint": tabItem.disabledHint,
|
|
267
308
|
"nav-class": tabItem.navClass,
|
|
268
309
|
class: "pt-3"
|
|
269
310
|
}, {
|
|
270
311
|
default: withCtx(() => [
|
|
271
|
-
tabItem.name === "list" ? renderSlot(_ctx.$slots, "tab-list", { key: 0 }) : tabItem.name === "create" ? renderSlot(_ctx.$slots, "tab-create", { key: 1 }) : tabItem.
|
|
312
|
+
tabItem.name === "list" ? renderSlot(_ctx.$slots, "tab-list", { key: 0 }) : tabItem.name === "create" ? renderSlot(_ctx.$slots, "tab-create", { key: 1 }) : isFixedTabName(tabItem.name) ? (openBlock(), createBlock(FixedTabContent, {
|
|
272
313
|
key: 2,
|
|
314
|
+
name: tabItem.name
|
|
315
|
+
}, null, 8, ["name"])) : tabItem.entityData ? renderSlot(_ctx.$slots, "tab-edit", {
|
|
316
|
+
key: 3,
|
|
273
317
|
index,
|
|
274
318
|
tabData: tabItem,
|
|
275
319
|
entity: tabItem.entityData
|
|
276
320
|
}) : createCommentVNode("", true)
|
|
277
321
|
]),
|
|
278
322
|
_: 2
|
|
279
|
-
}, 1032, ["name", "index", "label", "closable", "icon", "lazy", "disabled", "nav-class"]);
|
|
323
|
+
}, 1032, ["name", "index", "label", "closable", "icon", "lazy", "disabled", "disabled-hint", "nav-class"]);
|
|
280
324
|
}), 128))
|
|
281
325
|
]),
|
|
282
326
|
_: 3
|
package/library/font/index.mjs
CHANGED