hys-ui 0.1.1 → 0.2.0
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 +111 -0
- package/README.md +3 -1
- package/dist/components/HysAccordion/HysAccordion.vue.js +1 -1
- package/dist/components/HysAccordion/HysAccordion2.vue.js +181 -47
- package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +7 -0
- package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +627 -0
- package/dist/components/HysAvatar/HysAvatar.vue.js +5 -35
- package/dist/components/HysAvatar/HysAvatar2.vue.js +221 -2
- package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +7 -0
- package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +252 -0
- package/dist/components/HysBadge/HysBadge.vue.js +2 -2
- package/dist/components/HysBadge/HysBadge2.vue.js +154 -27
- package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +5 -38
- package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +74 -2
- package/dist/components/HysButton/HysButton.vue.js +2 -2
- package/dist/components/HysButton/HysButton2.vue.js +29 -28
- package/dist/components/HysCalendar/HysCalendar.vue.js +5 -92
- package/dist/components/HysCalendar/HysCalendar2.vue.js +803 -2
- package/dist/components/HysCard/HysCard.vue.js +2 -2
- package/dist/components/HysCard/HysCard2.vue.js +175 -42
- package/dist/components/HysCascader/HysCascader.vue.js +5 -194
- package/dist/components/HysCascader/HysCascader2.vue.js +760 -2
- package/dist/components/HysCascader/HysCascaderColumn.vue.js +7 -0
- package/dist/components/HysCascader/HysCascaderColumn2.vue.js +232 -0
- package/dist/components/HysCheckbox/HysCheckbox.vue.js +3 -3
- package/dist/components/HysCheckbox/HysCheckbox2.vue.js +180 -65
- package/dist/components/HysCheckboxGroup/HysCheckboxGroup.vue.js +7 -0
- package/dist/components/HysCheckboxGroup/HysCheckboxGroup2.vue.js +237 -0
- package/dist/components/HysColorPicker/HysColorPicker.vue.js +2 -2
- package/dist/components/HysColorPicker/HysColorPicker2.vue.js +107 -106
- package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
- package/dist/components/HysDataGrid/HysDataGrid2.vue.js +399 -392
- package/dist/components/HysDatePicker/HysDatePicker.vue.js +268 -139
- package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +7 -0
- package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +807 -0
- package/dist/components/HysDatePicker/HysDatePickerPanel.vue.js +7 -0
- package/dist/components/HysDatePicker/HysDatePickerPanel2.vue.js +357 -0
- package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +268 -158
- package/dist/components/HysDivider/HysDivider.vue.js +2 -2
- package/dist/components/HysDivider/HysDivider2.vue.js +33 -13
- package/dist/components/HysFileManager/HysFileManager.vue.js +3 -3
- package/dist/components/HysFileManager/HysFileManager2.vue.js +43 -42
- package/dist/components/HysForm/HysForm.vue.js +3 -3
- package/dist/components/HysForm/HysForm2.vue.js +578 -92
- package/dist/components/HysFormItem/HysFormItem.vue.js +5 -85
- package/dist/components/HysFormItem/HysFormItem2.vue.js +521 -2
- package/dist/components/HysGantt/HysGantt.vue.js +1 -1
- package/dist/components/HysGantt/HysGantt2.vue.js +1369 -272
- package/dist/components/HysInput/HysInput.vue.js +2 -2
- package/dist/components/HysInput/HysInput2.vue.js +467 -120
- package/dist/components/HysMention/HysMention.vue.js +2 -2
- package/dist/components/HysMention/HysMention2.vue.js +89 -88
- package/dist/components/HysNumberInput/HysNumberInput.vue.js +2 -2
- package/dist/components/HysNumberInput/HysNumberInput2.vue.js +561 -79
- package/dist/components/HysOrgTree/HysOrgTree.vue.js +29 -26
- package/dist/components/HysPagination/HysPagination.vue.js +1 -1
- package/dist/components/HysPagination/HysPagination2.vue.js +2 -0
- package/dist/components/HysPermissionMatrix/HysPermissionMatrix.vue.js +2 -2
- package/dist/components/HysPermissionMatrix/HysPermissionMatrix2.vue.js +52 -51
- package/dist/components/HysRadio/HysRadio.vue.js +7 -0
- package/dist/components/HysRadio/HysRadio2.vue.js +180 -0
- package/dist/components/HysRadioGroup/HysRadioGroup.vue.js +2 -2
- package/dist/components/HysRadioGroup/HysRadioGroup2.vue.js +190 -65
- package/dist/components/HysRating/HysRating.vue.js +1 -1
- package/dist/components/HysRating/HysRating2.vue.js +288 -68
- package/dist/components/HysRichTextEditor/HysRichTextEditor.vue.js +1 -1
- package/dist/components/HysRichTextEditor/HysRichTextEditor2.vue.js +70 -69
- package/dist/components/HysSearch/HysSearch.vue.js +37 -36
- package/dist/components/HysSegmented/HysSegmented.vue.js +5 -63
- package/dist/components/HysSegmented/HysSegmented2.vue.js +273 -2
- package/dist/components/HysSelect/HysSelect.vue.js +3 -2
- package/dist/components/HysSelect/HysSelect2.vue.js +859 -185
- package/dist/components/HysSkeleton/HysSkeleton.vue.js +2 -2
- package/dist/components/HysSkeleton/HysSkeleton2.vue.js +126 -29
- package/dist/components/HysSlider/HysSlider.vue.js +2 -2
- package/dist/components/HysSlider/HysSlider2.vue.js +532 -59
- package/dist/components/HysSlider/SliderTooltip.vue.js +7 -0
- package/dist/components/HysSlider/SliderTooltip2.vue.js +156 -0
- package/dist/components/HysSteps/HysSteps.vue.js +1 -1
- package/dist/components/HysSteps/HysSteps2.vue.js +110 -36
- package/dist/components/HysSwitch/HysSwitch.vue.js +2 -2
- package/dist/components/HysSwitch/HysSwitch2.vue.js +232 -50
- package/dist/components/HysTable/HysTable.vue.js +2 -2
- package/dist/components/HysTable/HysTable2.vue.js +1473 -88
- package/dist/components/HysTable/HysTableFilterOptions.vue.js +7 -0
- package/dist/components/HysTable/HysTableFilterOptions2.vue.js +133 -0
- package/dist/components/HysTabs/HysTabs.vue.js +2 -2
- package/dist/components/HysTabs/HysTabs2.vue.js +262 -68
- package/dist/components/HysTagInput/HysTagInput.vue.js +43 -42
- package/dist/components/HysTextarea/HysTextarea.vue.js +138 -77
- package/dist/components/HysTransfer/HysTransfer.vue.js +5 -223
- package/dist/components/HysTransfer/HysTransfer2.vue.js +416 -2
- package/dist/components/HysTransfer/HysTransferPanel.vue.js +7 -0
- package/dist/components/HysTransfer/HysTransferPanel2.vue.js +454 -0
- package/dist/components/HysTree/HysTree.vue.js +2 -3
- package/dist/components/HysTree/HysTree2.vue.js +641 -302
- package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +5 -136
- package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +558 -2
- package/dist/components/HysTreeSelect/HysTreeSelectPanel.vue.js +7 -0
- package/dist/components/HysTreeSelect/HysTreeSelectPanel2.vue.js +323 -0
- package/dist/components/HysUpload/HysUpload.vue.js +2 -2
- package/dist/components/HysUpload/HysUpload2.vue.js +77 -76
- package/dist/composables/autocomplete.js +50 -0
- package/dist/composables/avatar.js +57 -0
- package/dist/composables/calendar.js +96 -0
- package/dist/composables/cascader.js +79 -0
- package/dist/composables/choice.js +38 -0
- package/dist/composables/choiceModel.js +67 -0
- package/dist/composables/datePicker.js +227 -0
- package/dist/composables/formContext.js +92 -7
- package/dist/composables/formLayout.js +57 -0
- package/dist/composables/formValidation.js +240 -0
- package/dist/composables/ganttConflicts.js +143 -0
- package/dist/composables/numberInput.js +91 -0
- package/dist/composables/rating.js +16 -0
- package/dist/composables/selectOptions.js +54 -0
- package/dist/composables/table.js +150 -0
- package/dist/composables/textInput.js +34 -0
- package/dist/composables/transfer.js +63 -0
- package/dist/composables/tree.js +118 -0
- package/dist/composables/treeSelect.js +71 -0
- package/dist/composables/useCascader.js +438 -0
- package/dist/composables/useDatePicker.js +425 -0
- package/dist/composables/useFloating.js +97 -51
- package/dist/composables/useGanttDependencies.js +306 -0
- package/dist/composables/useGanttHistory.js +157 -0
- package/dist/composables/useGanttLabelResize.js +100 -0
- package/dist/composables/useTable.js +474 -0
- package/dist/composables/useTextareaSize.js +72 -0
- package/dist/composables/useTransfer.js +257 -0
- package/dist/composables/useTree.js +439 -0
- package/dist/composables/useTreeSelect.js +361 -0
- package/dist/index.js +149 -139
- package/dist/style.css +1 -1
- package/dist/types/components/HysAccordion/HysAccordion.vue.d.ts +61 -22
- package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +201 -0
- package/dist/types/components/HysAvatar/HysAvatar.vue.d.ts +28 -15
- package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +99 -0
- package/dist/types/components/HysBadge/HysBadge.vue.d.ts +41 -4
- package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +38 -10
- package/dist/types/components/HysButton/HysButton.vue.d.ts +0 -1
- package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +119 -31
- package/dist/types/components/HysCard/HysCard.vue.d.ts +55 -7
- package/dist/types/components/HysCascader/HysCascader.vue.d.ts +129 -41
- package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +55 -0
- package/dist/types/components/HysCheckbox/HysCheckbox.vue.d.ts +50 -39
- package/dist/types/components/HysCheckboxGroup/HysCheckboxGroup.vue.d.ts +73 -0
- package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +1 -1
- package/dist/types/components/HysDatePicker/HysDatePicker.vue.d.ts +66 -14
- package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +90 -0
- package/dist/types/components/HysDatePicker/HysDatePickerPanel.vue.d.ts +93 -0
- package/dist/types/components/HysDateRangePicker/HysDateRangePicker.vue.d.ts +66 -14
- package/dist/types/components/HysDivider/HysDivider.vue.d.ts +8 -3
- package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +2 -2
- package/dist/types/components/HysForm/HysForm.vue.d.ts +110 -18
- package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +108 -2
- package/dist/types/components/HysGantt/HysGantt.vue.d.ts +82 -4
- package/dist/types/components/HysInput/HysInput.vue.d.ts +52 -29
- package/dist/types/components/HysMention/HysMention.vue.d.ts +2 -2
- package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +93 -35
- package/dist/types/components/HysOrgTree/HysOrgTree.vue.d.ts +1 -0
- package/dist/types/components/HysPagination/HysPagination.vue.d.ts +1 -1
- package/dist/types/components/HysPermissionMatrix/HysPermissionMatrix.vue.d.ts +2 -2
- package/dist/types/components/HysPopover/HysPopover.vue.d.ts +3 -3
- package/dist/types/components/HysProgress/HysProgress.vue.d.ts +1 -1
- package/dist/types/components/HysRadio/HysRadio.vue.d.ts +56 -0
- package/dist/types/components/HysRadioGroup/HysRadioGroup.vue.d.ts +34 -12
- package/dist/types/components/HysRating/HysRating.vue.d.ts +85 -5
- package/dist/types/components/HysRichTextEditor/HysRichTextEditor.vue.d.ts +4 -4
- package/dist/types/components/HysSearch/HysSearch.vue.d.ts +2 -2
- package/dist/types/components/HysSegmented/HysSegmented.vue.d.ts +64 -32
- package/dist/types/components/HysSelect/HysSelect.vue.d.ts +120 -20
- package/dist/types/components/HysSkeleton/HysSkeleton.vue.d.ts +30 -2
- package/dist/types/components/HysSlider/HysSlider.vue.d.ts +66 -9
- package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +22 -0
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +1 -1
- package/dist/types/components/HysSteps/HysSteps.vue.d.ts +64 -9
- package/dist/types/components/HysSwitch/HysSwitch.vue.d.ts +76 -17
- package/dist/types/components/HysTable/HysTable.vue.d.ts +206 -32
- package/dist/types/components/HysTable/HysTableFilterOptions.vue.d.ts +18 -0
- package/dist/types/components/HysTabs/HysTabs.vue.d.ts +76 -23
- package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +5 -5
- package/dist/types/components/HysTextarea/HysTextarea.vue.d.ts +44 -27
- package/dist/types/components/HysToast/HysToast.vue.d.ts +3 -3
- package/dist/types/components/HysTour/HysTour.vue.d.ts +2 -2
- package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +55 -40
- package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +105 -0
- package/dist/types/components/HysTree/HysTree.vue.d.ts +140 -73
- package/dist/types/components/HysTreeSelect/HysTreeSelect.vue.d.ts +102 -23
- package/dist/types/components/HysTreeSelect/HysTreeSelectPanel.vue.d.ts +56 -0
- package/dist/types/composables/autocomplete.d.ts +106 -0
- package/dist/types/composables/avatar.d.ts +70 -0
- package/dist/types/composables/calendar.d.ts +66 -0
- package/dist/types/composables/cascader.d.ts +192 -0
- package/dist/types/composables/choice.d.ts +110 -0
- package/dist/types/composables/choiceModel.d.ts +11 -0
- package/dist/types/composables/datePicker.d.ts +247 -0
- package/dist/types/composables/formContext.d.ts +133 -8
- package/dist/types/composables/formLayout.d.ts +11 -0
- package/dist/types/composables/formValidation.d.ts +13 -0
- package/dist/types/composables/gantt.d.ts +68 -0
- package/dist/types/composables/ganttConflicts.d.ts +30 -0
- package/dist/types/composables/numberInput.d.ts +45 -0
- package/dist/types/composables/rating.d.ts +18 -0
- package/dist/types/composables/segmented.d.ts +15 -0
- package/dist/types/composables/selectOptions.d.ts +44 -0
- package/dist/types/composables/slider.d.ts +21 -0
- package/dist/types/composables/table.d.ts +309 -0
- package/dist/types/composables/textInput.d.ts +76 -0
- package/dist/types/composables/transfer.d.ts +180 -0
- package/dist/types/composables/tree.d.ts +237 -0
- package/dist/types/composables/treeSelect.d.ts +167 -0
- package/dist/types/composables/useCascader.d.ts +162 -0
- package/dist/types/composables/useDatePicker.d.ts +79 -0
- package/dist/types/composables/useFloating.d.ts +8 -5
- package/dist/types/composables/useGanttDependencies.d.ts +83 -0
- package/dist/types/composables/useGanttHistory.d.ts +42 -0
- package/dist/types/composables/useGanttLabelResize.d.ts +23 -0
- package/dist/types/composables/useTable.d.ts +60 -0
- package/dist/types/composables/useTextareaSize.d.ts +3 -0
- package/dist/types/composables/useTransfer.d.ts +58 -0
- package/dist/types/composables/useTree.d.ts +77 -0
- package/dist/types/composables/useTreeSelect.d.ts +117 -0
- package/dist/types/index.d.ts +33 -7
- package/package.json +2 -1
|
@@ -1,87 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
key: 0,
|
|
6
|
-
"aria-hidden": "true"
|
|
7
|
-
}, Y = /* @__PURE__ */ E({
|
|
8
|
-
__name: "HysFormItem",
|
|
9
|
-
props: {
|
|
10
|
-
label: {},
|
|
11
|
-
prop: {},
|
|
12
|
-
error: {},
|
|
13
|
-
required: { type: Boolean },
|
|
14
|
-
hint: {},
|
|
15
|
-
for: {}
|
|
16
|
-
},
|
|
17
|
-
setup(l) {
|
|
18
|
-
const r = l, S = J(), t = H(P, void 0), A = B(), v = N(), n = B(r.for || v), c = v + "-error", b = v + "-hint", a = d(() => r.error || (r.prop ? t == null ? void 0 : t.errors.value[r.prop] : "")), p = d(() => !!a.value), f = d(() => !!(r.required || r.prop && [(t == null ? void 0 : t.rules.value[r.prop]) || []].flat().some((e) => e.required))), y = d(() => p.value ? c : r.hint ? b : void 0);
|
|
19
|
-
V(T, { id: n, label: d(() => r.label), error: a, errorId: c, describedBy: y, required: f }), C(() => r.prop ? r.prop.split(".").reduce((e, o) => e == null ? void 0 : e[o], t == null ? void 0 : t.model.value) : void 0, () => {
|
|
20
|
-
t != null && t.model.value && !t.resetting.value && m("change");
|
|
21
|
-
}, { deep: !0 });
|
|
22
|
-
let i;
|
|
23
|
-
C(() => r.prop, (e) => {
|
|
24
|
-
i == null || i(), i = e ? t == null ? void 0 : t.register(e) : void 0;
|
|
25
|
-
}, { immediate: !0 }), $(() => i == null ? void 0 : i());
|
|
26
|
-
function k() {
|
|
27
|
-
var e;
|
|
28
|
-
return (r.for ? document.getElementById(r.for) : null) || ((e = A.value) == null ? void 0 : e.querySelector('input:not([type="hidden"]):not([hidden]),textarea,select,button[role="combobox"],button[role="switch"],[role="radiogroup"],[role="slider"],[role="button"],[contenteditable][role="textbox"]'));
|
|
29
|
-
}
|
|
30
|
-
function F(e) {
|
|
31
|
-
const o = k();
|
|
32
|
-
o && !o.matches("input,button,textarea,select") && (e.preventDefault(), G(o));
|
|
33
|
-
}
|
|
34
|
-
function q() {
|
|
35
|
-
const e = k();
|
|
36
|
-
if (!e || (e.id ? n.value = e.id : e.id = n.value, e.hasAttribute("data-hys-ui-field-managed"))) return;
|
|
37
|
-
e.setAttribute("aria-invalid", String(p.value)), f.value ? e.setAttribute("aria-required", "true") : e.removeAttribute("aria-required");
|
|
38
|
-
const o = new Set((e.getAttribute("aria-describedby") || "").split(" ").filter(Boolean));
|
|
39
|
-
o.delete(c), o.delete(b), y.value && o.add(y.value), o.size ? e.setAttribute("aria-describedby", [...o].join(" ")) : e.removeAttribute("aria-describedby");
|
|
40
|
-
}
|
|
41
|
-
j(q), z(q);
|
|
42
|
-
function m(e) {
|
|
43
|
-
!(t != null && t.resetting.value) && r.prop && (t == null || t.validateField(r.prop, e));
|
|
44
|
-
}
|
|
45
|
-
return (e, o) => (u(), s("div", D({
|
|
46
|
-
ref_key: "root",
|
|
47
|
-
ref: A
|
|
48
|
-
}, I(S), {
|
|
49
|
-
class: "hys-ui-ent-field",
|
|
50
|
-
onChange: o[0] || (o[0] = (w) => {
|
|
51
|
-
var x;
|
|
52
|
-
return !((x = I(t)) != null && x.model.value) && m("change");
|
|
53
|
-
}),
|
|
54
|
-
onFocusout: o[1] || (o[1] = (w) => m("blur"))
|
|
55
|
-
}), [
|
|
56
|
-
l.label ? (u(), s("label", {
|
|
57
|
-
key: 0,
|
|
58
|
-
for: n.value,
|
|
59
|
-
onClick: F
|
|
60
|
-
}, [
|
|
61
|
-
K(h(l.label) + " ", 1),
|
|
62
|
-
f.value ? (u(), s("span", O, "*")) : g("", !0)
|
|
63
|
-
], 8, L)) : g("", !0),
|
|
64
|
-
R("div", {
|
|
65
|
-
class: U({ "hys-ui-ent-invalid": p.value })
|
|
66
|
-
}, [
|
|
67
|
-
M(e.$slots, "default", {
|
|
68
|
-
id: n.value,
|
|
69
|
-
invalid: p.value,
|
|
70
|
-
error: a.value
|
|
71
|
-
})
|
|
72
|
-
], 2),
|
|
73
|
-
a.value ? (u(), s("small", {
|
|
74
|
-
key: 1,
|
|
75
|
-
id: c,
|
|
76
|
-
role: "alert",
|
|
77
|
-
class: "hys-ui-ent-error"
|
|
78
|
-
}, h(a.value), 1)) : l.hint ? (u(), s("small", {
|
|
79
|
-
key: 2,
|
|
80
|
-
id: b
|
|
81
|
-
}, h(l.hint), 1)) : g("", !0)
|
|
82
|
-
], 16));
|
|
83
|
-
}
|
|
84
|
-
});
|
|
1
|
+
import o from "./HysFormItem2.vue.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-506b48b5"]]);
|
|
85
5
|
export {
|
|
86
|
-
|
|
6
|
+
s as default
|
|
87
7
|
};
|
|
@@ -1,4 +1,523 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as De, inject as He, ref as j, useId as Ne, useSlots as je, computed as t, provide as Ge, watch as z, nextTick as ge, onMounted as Ke, onUpdated as Oe, onActivated as Ue, onDeactivated as Je, onBeforeUnmount as Qe, openBlock as r, createElementBlock as n, mergeProps as Xe, unref as C, createBlock as G, resolveDynamicComponent as Ye, normalizeStyle as ke, withCtx as se, createElementVNode as Q, createCommentVNode as c, renderSlot as w, createTextVNode as M, toDisplayString as F, createSlots as Ze, createVNode as _e, normalizeClass as X, Fragment as K, renderList as we } from "vue";
|
|
2
|
+
import { CircleHelp as ea, LoaderCircle as aa, CheckCircle2 as la, CircleAlert as ta } from "lucide-vue-next";
|
|
3
|
+
import ia from "../HysTooltip/HysTooltip.vue.js";
|
|
4
|
+
import { resolveFormCol as me, resolveFormGrid as ua } from "../../composables/formLayout.js";
|
|
5
|
+
import { formKey as oa, formPath as ra, fieldKey as sa, formValue as Ce, focusHysField as na } from "../../composables/formContext.js";
|
|
6
|
+
import { useHysRootAttrs as da } from "../../config.js";
|
|
7
|
+
import { snapshotForm as Fe, sameFormValue as va } from "../../composables/formValidation.js";
|
|
8
|
+
const ca = ["data-field-path", "data-validation-status", "aria-busy"], ba = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "hys-ui-form-required",
|
|
11
|
+
"aria-hidden": "true"
|
|
12
|
+
}, ha = { class: "hys-ui-form-label-text" }, ya = {
|
|
13
|
+
key: 0,
|
|
14
|
+
"aria-hidden": "true"
|
|
15
|
+
}, pa = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "hys-ui-form-required",
|
|
18
|
+
"aria-hidden": "true"
|
|
19
|
+
}, fa = {
|
|
20
|
+
key: 2,
|
|
21
|
+
class: "hys-ui-form-optional"
|
|
22
|
+
}, ga = ["role", "aria-labelledby", "aria-describedby", "aria-invalid"], ka = ["id", "role"], wa = {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: "hys-ui-ent-error"
|
|
25
|
+
}, ma = { key: 0 }, Ca = {
|
|
26
|
+
key: 1,
|
|
27
|
+
class: "hys-ui-form-warning"
|
|
28
|
+
}, Fa = { key: 0 }, Sa = {
|
|
29
|
+
key: 2,
|
|
30
|
+
class: "hys-ui-form-item-extra"
|
|
31
|
+
}, za = /* @__PURE__ */ De({
|
|
32
|
+
__name: "HysFormItem",
|
|
33
|
+
props: {
|
|
34
|
+
label: {},
|
|
35
|
+
prop: {},
|
|
36
|
+
rules: {},
|
|
37
|
+
dependencies: {},
|
|
38
|
+
error: {},
|
|
39
|
+
warning: {},
|
|
40
|
+
status: {},
|
|
41
|
+
required: { type: Boolean, default: void 0 },
|
|
42
|
+
showRequiredMark: { type: Boolean, default: void 0 },
|
|
43
|
+
requiredMarkPosition: {},
|
|
44
|
+
hint: {},
|
|
45
|
+
for: {},
|
|
46
|
+
disabled: { type: Boolean },
|
|
47
|
+
size: {},
|
|
48
|
+
labelPosition: {},
|
|
49
|
+
labelWidth: {},
|
|
50
|
+
labelAlign: {},
|
|
51
|
+
labelWrap: { type: Boolean, default: void 0 },
|
|
52
|
+
labelSuffix: {},
|
|
53
|
+
colon: { type: Boolean, default: void 0 },
|
|
54
|
+
labelCol: {},
|
|
55
|
+
wrapperCol: {},
|
|
56
|
+
span: {},
|
|
57
|
+
optionalMark: {},
|
|
58
|
+
tooltip: {},
|
|
59
|
+
help: {},
|
|
60
|
+
extra: {},
|
|
61
|
+
showLabel: { type: Boolean, default: void 0 },
|
|
62
|
+
showFeedback: { type: Boolean, default: void 0 },
|
|
63
|
+
feedbackIcon: { type: Boolean, default: void 0 },
|
|
64
|
+
inlineFeedback: { type: Boolean, default: void 0 },
|
|
65
|
+
validateFirst: { type: Boolean, default: void 0 },
|
|
66
|
+
preserve: { type: Boolean, default: void 0 },
|
|
67
|
+
autoLink: { type: Boolean, default: !0 },
|
|
68
|
+
group: { type: Boolean, default: void 0 },
|
|
69
|
+
noStyle: { type: Boolean },
|
|
70
|
+
validateTrigger: {}
|
|
71
|
+
},
|
|
72
|
+
setup(b, { expose: Se }) {
|
|
73
|
+
const a = b, Be = da(), e = He(oa, void 0), S = j(), V = j(), h = Ne(), p = j(a.for || h), Y = h + "-error", Z = h + "-hint", ne = h + "-warning", O = je(), f = j(!!a.group), o = t(
|
|
74
|
+
() => a.prop === void 0 ? "" : ra(a.prop)
|
|
75
|
+
), de = t(() => [a.rules ?? []].flat()), _ = t(() => a.label), v = t(
|
|
76
|
+
() => a.error !== void 0 ? a.error : o.value ? e == null ? void 0 : e.errors.value[o.value] : void 0
|
|
77
|
+
), y = t(
|
|
78
|
+
() => a.warning !== void 0 ? a.warning : o.value ? e == null ? void 0 : e.warnings.value[o.value] : void 0
|
|
79
|
+
), W = t(
|
|
80
|
+
() => a.error !== void 0 ? a.error ? [a.error] : [] : (e == null ? void 0 : e.errorMessages.value[o.value]) ?? (v.value ? [v.value] : [])
|
|
81
|
+
), $ = t(
|
|
82
|
+
() => a.warning !== void 0 ? a.warning ? [a.warning] : [] : (e == null ? void 0 : e.warningMessages.value[o.value]) ?? (y.value ? [y.value] : [])
|
|
83
|
+
), xe = t(
|
|
84
|
+
() => o.value ? e == null ? void 0 : e.states.value[o.value] : void 0
|
|
85
|
+
), d = t(
|
|
86
|
+
() => {
|
|
87
|
+
var l;
|
|
88
|
+
return a.status ?? (v.value ? "error" : y.value ? "warning" : ((l = xe.value) == null ? void 0 : l.status) ?? "idle");
|
|
89
|
+
}
|
|
90
|
+
), g = t(() => !!v.value || d.value === "error"), A = t(
|
|
91
|
+
() => a.required ?? [
|
|
92
|
+
...o.value ? (e == null ? void 0 : e.getRules(o.value)) ?? [] : [],
|
|
93
|
+
...de.value
|
|
94
|
+
].some((l) => l.required)
|
|
95
|
+
), U = t(() => !!(a.disabled || e != null && e.disabled.value)), R = t(() => a.size ?? (e == null ? void 0 : e.size.value) ?? "md"), B = t(
|
|
96
|
+
() => !a.noStyle && (a.showLabel ?? (e == null ? void 0 : e.showLabel.value) ?? !0) && (!!a.label || !!O.label)
|
|
97
|
+
), ve = t(
|
|
98
|
+
() => a.showFeedback ?? (e == null ? void 0 : e.showFeedback.value) ?? !0
|
|
99
|
+
), ce = t(
|
|
100
|
+
() => a.showRequiredMark ?? (e == null ? void 0 : e.showRequiredMark.value) ?? !0
|
|
101
|
+
), be = t(
|
|
102
|
+
() => a.requiredMarkPosition ?? (e == null ? void 0 : e.requiredMarkPosition.value) ?? "right"
|
|
103
|
+
), k = t(
|
|
104
|
+
() => a.labelPosition ?? (e == null ? void 0 : e.labelPosition.value) ?? "top"
|
|
105
|
+
), P = t(
|
|
106
|
+
() => typeof a.labelWidth == "number" ? a.labelWidth + "px" : a.labelWidth ?? (e == null ? void 0 : e.labelWidth.value) ?? "100px"
|
|
107
|
+
), qe = t(
|
|
108
|
+
() => P.value === "auto" ? (e == null ? void 0 : e.autoLabelWidth.value) ?? "auto" : P.value
|
|
109
|
+
), Me = t(
|
|
110
|
+
() => a.labelAlign ?? (a.labelPosition ? a.labelPosition === "right" ? "right" : "left" : (e == null ? void 0 : e.labelAlign.value) ?? (k.value === "right" ? "right" : "left"))
|
|
111
|
+
), Ae = t(
|
|
112
|
+
() => a.labelWrap ?? (e == null ? void 0 : e.labelWrap.value) ?? !0
|
|
113
|
+
), Le = t(
|
|
114
|
+
() => a.labelSuffix ?? (e == null ? void 0 : e.labelSuffix.value) ?? ""
|
|
115
|
+
), Ie = t(() => a.colon ?? (e == null ? void 0 : e.colon.value) ?? !1), ze = t(
|
|
116
|
+
() => a.inlineFeedback ?? (e == null ? void 0 : e.inlineFeedback.value) ?? !1
|
|
117
|
+
), Ve = t(
|
|
118
|
+
() => a.feedbackIcon ?? (e == null ? void 0 : e.feedbackIcon.value) ?? !1
|
|
119
|
+
), he = t(
|
|
120
|
+
() => a.optionalMark ?? (e == null ? void 0 : e.optionalMark.value) ?? ""
|
|
121
|
+
), T = j(), ee = t(() => (e == null ? void 0 : e.containerWidth.value) ?? 0), E = t(() => ({
|
|
122
|
+
label: me(a.labelCol ?? (e == null ? void 0 : e.labelCol.value), ee.value),
|
|
123
|
+
wrapper: me(
|
|
124
|
+
a.wrapperCol ?? (e == null ? void 0 : e.wrapperCol.value),
|
|
125
|
+
ee.value
|
|
126
|
+
)
|
|
127
|
+
})), We = t(() => {
|
|
128
|
+
const l = E.value.label, i = Math.min(
|
|
129
|
+
(e == null ? void 0 : e.columns.value) ?? 24,
|
|
130
|
+
ua(a.span, ee.value)
|
|
131
|
+
), u = B.value && k.value !== "top" && (l || E.value.wrapper);
|
|
132
|
+
return {
|
|
133
|
+
"--hys-ui-form-label-width": qe.value,
|
|
134
|
+
gridColumn: e ? "span " + i : void 0,
|
|
135
|
+
gridTemplateColumns: u ? "repeat(24,minmax(0,1fr))" : void 0,
|
|
136
|
+
columnGap: u ? "0px" : void 0
|
|
137
|
+
};
|
|
138
|
+
}), $e = t(() => {
|
|
139
|
+
const l = E.value.label;
|
|
140
|
+
return l && k.value !== "top" ? {
|
|
141
|
+
gridColumn: 1 + (l.offset ?? 0) + " / span " + Math.max(1, l.span ?? 0),
|
|
142
|
+
display: l.span === 0 ? "none" : void 0
|
|
143
|
+
} : void 0;
|
|
144
|
+
}), Re = t(() => {
|
|
145
|
+
if (!B.value) return;
|
|
146
|
+
const l = E.value.wrapper, i = E.value.label, u = Math.min(
|
|
147
|
+
23,
|
|
148
|
+
((i == null ? void 0 : i.span) ?? 0) + ((i == null ? void 0 : i.offset) ?? 0) + ((l == null ? void 0 : l.offset) ?? 0)
|
|
149
|
+
);
|
|
150
|
+
return k.value !== "top" && (l || i) ? {
|
|
151
|
+
gridColumn: 1 + u + " / span " + Math.max(1, Math.min((l == null ? void 0 : l.span) ?? 24, 24 - u)),
|
|
152
|
+
paddingInlineStart: "14px",
|
|
153
|
+
boxSizing: "border-box"
|
|
154
|
+
} : void 0;
|
|
155
|
+
}), Pe = t(
|
|
156
|
+
() => a.validateTrigger ?? (e == null ? void 0 : e.validateTrigger.value) ?? ["change", "blur"]
|
|
157
|
+
), ye = t(
|
|
158
|
+
() => a.help !== void 0 || !!(v.value || y.value || O.help || O.feedback)
|
|
159
|
+
), pe = t(
|
|
160
|
+
() => g.value ? Y : y.value ? ne : h + "-feedback"
|
|
161
|
+
), ae = t(
|
|
162
|
+
() => [
|
|
163
|
+
ve.value && ye.value ? pe.value : void 0,
|
|
164
|
+
a.hint || O.hint ? Z : void 0
|
|
165
|
+
].filter(Boolean).join(" ") || void 0
|
|
166
|
+
);
|
|
167
|
+
Ge(sa, {
|
|
168
|
+
id: t(() => a.autoLink ? p.value : ""),
|
|
169
|
+
label: _,
|
|
170
|
+
error: v,
|
|
171
|
+
errorId: Y,
|
|
172
|
+
describedBy: ae,
|
|
173
|
+
required: A,
|
|
174
|
+
invalid: g,
|
|
175
|
+
status: d,
|
|
176
|
+
disabled: U,
|
|
177
|
+
size: R,
|
|
178
|
+
validate: x
|
|
179
|
+
});
|
|
180
|
+
async function x(l) {
|
|
181
|
+
var i;
|
|
182
|
+
return e != null && e.resetting.value || U.value || !o.value || l === "blur" && ((i = e == null ? void 0 : e.suppressAutoBlur) != null && i.value) ? !0 : await (e == null ? void 0 : e.validateField(o.value, l)) ?? !0;
|
|
183
|
+
}
|
|
184
|
+
function le() {
|
|
185
|
+
var l, i;
|
|
186
|
+
return (a.for ? document.getElementById(a.for) : null) || ((l = V.value) == null ? void 0 : l.querySelector(
|
|
187
|
+
'[data-hys-ui-field-managed][role="tree"]'
|
|
188
|
+
)) || ((i = V.value) == null ? void 0 : i.querySelector(
|
|
189
|
+
'input:not([type="hidden"]):not([hidden]),textarea,select,[role="combobox"],button[role="switch"],[role="radiogroup"],[role="slider"],[role="button"],[role="group"],[contenteditable][role="textbox"]'
|
|
190
|
+
));
|
|
191
|
+
}
|
|
192
|
+
function te() {
|
|
193
|
+
na(le());
|
|
194
|
+
}
|
|
195
|
+
function Te(l) {
|
|
196
|
+
const i = le();
|
|
197
|
+
i && !i.matches("input,button,textarea,select") && (l.preventDefault(), te());
|
|
198
|
+
}
|
|
199
|
+
function ie() {
|
|
200
|
+
var N, J, I;
|
|
201
|
+
if (!a.autoLink) return;
|
|
202
|
+
const l = [
|
|
203
|
+
...((N = V.value) == null ? void 0 : N.querySelectorAll(
|
|
204
|
+
'input:not([type="hidden"]):not([hidden]),textarea,select,[role="combobox"],button[role="switch"],[role="radiogroup"],[role="slider"],[role="button"],[data-hys-ui-field-managed][role="tree"],[contenteditable][role="textbox"]'
|
|
205
|
+
)) ?? []
|
|
206
|
+
].filter(
|
|
207
|
+
(m) => m.closest(".hys-ui-ent-field") === S.value && !m.closest("[data-hys-ui-form-internal]") && (!m.closest('[data-hys-ui-field-managed][role="tree"]') || m.matches('[data-hys-ui-field-managed][role="tree"]')) && (!m.closest('[role="radiogroup"]') || m.matches('[role="radiogroup"]'))
|
|
208
|
+
), i = a.group ?? (l.length > 1 || !!((J = V.value) != null && J.querySelector(".hys-ui-ent-field")));
|
|
209
|
+
if (f.value !== i && (f.value = i, p.value = i ? "" : a.for || h), i) {
|
|
210
|
+
p.value && (p.value = "");
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
const u = le();
|
|
214
|
+
if (!u || (a.for ? p.value = a.for : u.id ? p.value = u.id : u.id = p.value, u.hasAttribute("data-hys-ui-field-managed"))) return;
|
|
215
|
+
u.setAttribute("aria-invalid", String(g.value)), A.value ? u.setAttribute("aria-required", "true") : u.removeAttribute("aria-required");
|
|
216
|
+
const s = new Set(
|
|
217
|
+
(u.getAttribute("aria-describedby") || "").split(" ").filter(Boolean)
|
|
218
|
+
);
|
|
219
|
+
s.delete(Y), s.delete(Z), s.delete(ne), s.delete(h + "-feedback"), (I = ae.value) == null || I.split(" ").forEach((m) => s.add(m)), s.size ? u.setAttribute("aria-describedby", [...s].join(" ")) : u.removeAttribute("aria-describedby");
|
|
220
|
+
}
|
|
221
|
+
function Ee(l) {
|
|
222
|
+
var u, s, N;
|
|
223
|
+
if (l.target.closest(".hys-ui-ent-field") !== S.value)
|
|
224
|
+
return;
|
|
225
|
+
const i = l.relatedTarget;
|
|
226
|
+
if (!(i && ((u = S.value) != null && u.contains(i)))) {
|
|
227
|
+
if (i)
|
|
228
|
+
for (const J of ((s = S.value) == null ? void 0 : s.querySelectorAll(
|
|
229
|
+
"[aria-controls]"
|
|
230
|
+
)) || []) {
|
|
231
|
+
const I = (N = document.getElementById(J.getAttribute("aria-controls") || "")) == null ? void 0 : N.closest("[data-hys-ui]");
|
|
232
|
+
if (I != null && I.contains(i)) return;
|
|
233
|
+
}
|
|
234
|
+
x("blur");
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
const D = {
|
|
238
|
+
path: o,
|
|
239
|
+
element: S,
|
|
240
|
+
rules: de,
|
|
241
|
+
trigger: Pe,
|
|
242
|
+
dependencies: t(() => a.dependencies ?? []),
|
|
243
|
+
label: _,
|
|
244
|
+
validateFirst: t(
|
|
245
|
+
() => a.validateFirst ?? (e == null ? void 0 : e.validateFirst.value) ?? !0
|
|
246
|
+
),
|
|
247
|
+
preserve: t(() => a.preserve ?? (e == null ? void 0 : e.preserve.value) ?? !0),
|
|
248
|
+
validate: x,
|
|
249
|
+
clearValidate: () => {
|
|
250
|
+
o.value && (e == null || e.clearValidate([o.value]));
|
|
251
|
+
},
|
|
252
|
+
resetField: () => {
|
|
253
|
+
o.value && (e == null || e.resetFields([o.value]));
|
|
254
|
+
},
|
|
255
|
+
setInitialValue: (l) => {
|
|
256
|
+
o.value && (e == null || e.setFieldInitialValue(o.value, l));
|
|
257
|
+
},
|
|
258
|
+
focus: te
|
|
259
|
+
};
|
|
260
|
+
let q, fe = Fe(a.rules);
|
|
261
|
+
z(
|
|
262
|
+
o,
|
|
263
|
+
(l) => {
|
|
264
|
+
q == null || q(), q = l ? e == null ? void 0 : e.register(D) : void 0;
|
|
265
|
+
},
|
|
266
|
+
{ immediate: !0, flush: "sync" }
|
|
267
|
+
), z(
|
|
268
|
+
() => [
|
|
269
|
+
o.value,
|
|
270
|
+
Ce(e == null ? void 0 : e.model.value, o.value),
|
|
271
|
+
...(a.dependencies ?? []).map(
|
|
272
|
+
(l) => Ce(e == null ? void 0 : e.model.value, l)
|
|
273
|
+
)
|
|
274
|
+
],
|
|
275
|
+
(l, i) => {
|
|
276
|
+
e != null && e.model.value && !e.resetting.value && l[0] === (i == null ? void 0 : i[0]) && x("change");
|
|
277
|
+
},
|
|
278
|
+
{ deep: !0 }
|
|
279
|
+
), z(
|
|
280
|
+
() => a.rules,
|
|
281
|
+
() => {
|
|
282
|
+
va(a.rules, fe) || (fe = Fe(a.rules), e && !e.resetting.value && (e.validateOnRuleChange.value ? x() : o.value && e.cancelField(o.value)));
|
|
283
|
+
},
|
|
284
|
+
{ deep: !0 }
|
|
285
|
+
), z(
|
|
286
|
+
() => a.for,
|
|
287
|
+
() => {
|
|
288
|
+
p.value = a.for || h, ge(ie);
|
|
289
|
+
}
|
|
290
|
+
), z(U, (l) => {
|
|
291
|
+
l && D.clearValidate();
|
|
292
|
+
});
|
|
293
|
+
let L, H = !0;
|
|
294
|
+
function ue() {
|
|
295
|
+
var l;
|
|
296
|
+
H && (e == null || e.setLabelWidth(
|
|
297
|
+
h,
|
|
298
|
+
B.value && k.value !== "top" && P.value === "auto" ? Math.ceil(((l = T.value) == null ? void 0 : l.getBoundingClientRect().width) ?? 0) : void 0
|
|
299
|
+
));
|
|
300
|
+
}
|
|
301
|
+
function oe() {
|
|
302
|
+
L == null || L.disconnect(), L = void 0, e == null || e.setLabelWidth(h);
|
|
303
|
+
}
|
|
304
|
+
function re() {
|
|
305
|
+
oe(), !(!H || !S.value) && (ue(), typeof ResizeObserver < "u" && T.value && (L = new ResizeObserver(ue), L.observe(T.value)));
|
|
306
|
+
}
|
|
307
|
+
return z(
|
|
308
|
+
[B, k, P, T, R],
|
|
309
|
+
() => void ge(re)
|
|
310
|
+
), Ke(() => {
|
|
311
|
+
ie(), re();
|
|
312
|
+
}), Oe(() => {
|
|
313
|
+
ie(), ue();
|
|
314
|
+
}), Ue(() => {
|
|
315
|
+
H = !0, re();
|
|
316
|
+
}), Je(() => {
|
|
317
|
+
H = !1, oe();
|
|
318
|
+
}), Qe(() => {
|
|
319
|
+
H = !1, oe(), q == null || q();
|
|
320
|
+
}), Se({
|
|
321
|
+
validate: x,
|
|
322
|
+
clearValidate: D.clearValidate,
|
|
323
|
+
resetField: D.resetField,
|
|
324
|
+
setInitialValue: D.setInitialValue,
|
|
325
|
+
focus: te,
|
|
326
|
+
path: o,
|
|
327
|
+
status: d,
|
|
328
|
+
error: v,
|
|
329
|
+
warning: y,
|
|
330
|
+
size: R,
|
|
331
|
+
validateMessage: v,
|
|
332
|
+
validateState: d
|
|
333
|
+
}), (l, i) => (r(), n("div", Xe({
|
|
334
|
+
ref_key: "root",
|
|
335
|
+
ref: S
|
|
336
|
+
}, C(Be), {
|
|
337
|
+
class: ["hys-ui-ent-field", [
|
|
338
|
+
"hys-ui-form-item-" + k.value,
|
|
339
|
+
"hys-ui-form-item-" + R.value,
|
|
340
|
+
"hys-ui-form-label-align-" + Me.value,
|
|
341
|
+
{
|
|
342
|
+
"hys-ui-form-item-no-style": b.noStyle,
|
|
343
|
+
"hys-ui-form-item-grid": B.value && k.value !== "top",
|
|
344
|
+
"hys-ui-form-label-nowrap": !Ae.value,
|
|
345
|
+
"hys-ui-form-label-auto": P.value === "auto"
|
|
346
|
+
}
|
|
347
|
+
]],
|
|
348
|
+
style: We.value,
|
|
349
|
+
"data-field-path": o.value || void 0,
|
|
350
|
+
"data-validation-status": d.value,
|
|
351
|
+
"aria-busy": d.value === "validating" || void 0,
|
|
352
|
+
onChange: i[1] || (i[1] = (u) => {
|
|
353
|
+
var s;
|
|
354
|
+
return !((s = C(e)) != null && s.model.value) && x("change");
|
|
355
|
+
}),
|
|
356
|
+
onFocusout: Ee
|
|
357
|
+
}), [
|
|
358
|
+
B.value ? (r(), G(Ye(f.value ? "div" : "label"), {
|
|
359
|
+
key: 0,
|
|
360
|
+
class: "hys-ui-form-item-label",
|
|
361
|
+
id: C(h) + "-label",
|
|
362
|
+
for: b.autoLink && !f.value ? p.value : void 0,
|
|
363
|
+
style: ke($e.value),
|
|
364
|
+
onClick: i[0] || (i[0] = (u) => b.autoLink && !f.value && Te(u))
|
|
365
|
+
}, {
|
|
366
|
+
default: se(() => [
|
|
367
|
+
Q("span", {
|
|
368
|
+
ref_key: "labelContent",
|
|
369
|
+
ref: T,
|
|
370
|
+
class: "hys-ui-form-label-content"
|
|
371
|
+
}, [
|
|
372
|
+
A.value && ce.value && be.value === "left" ? (r(), n("span", ba, "*")) : c("", !0),
|
|
373
|
+
Q("span", ha, [
|
|
374
|
+
w(l.$slots, "label", {
|
|
375
|
+
required: A.value,
|
|
376
|
+
status: d.value
|
|
377
|
+
}, () => [
|
|
378
|
+
M(F(_.value), 1)
|
|
379
|
+
], !0),
|
|
380
|
+
M(F(Le.value), 1),
|
|
381
|
+
Ie.value && k.value !== "top" ? (r(), n("span", ya, ":")) : c("", !0)
|
|
382
|
+
]),
|
|
383
|
+
A.value && ce.value && be.value === "right" ? (r(), n("span", pa, "*")) : c("", !0),
|
|
384
|
+
!A.value && he.value ? (r(), n("span", fa, F(he.value), 1)) : c("", !0),
|
|
385
|
+
b.tooltip || l.$slots.tooltip ? (r(), G(ia, {
|
|
386
|
+
key: 3,
|
|
387
|
+
text: b.tooltip
|
|
388
|
+
}, Ze({
|
|
389
|
+
default: se(() => [
|
|
390
|
+
_e(C(ea), {
|
|
391
|
+
size: 14,
|
|
392
|
+
"aria-label": "字段说明"
|
|
393
|
+
})
|
|
394
|
+
]),
|
|
395
|
+
_: 2
|
|
396
|
+
}, [
|
|
397
|
+
l.$slots.tooltip ? {
|
|
398
|
+
name: "content",
|
|
399
|
+
fn: se(() => [
|
|
400
|
+
w(l.$slots, "tooltip", {}, void 0, !0)
|
|
401
|
+
]),
|
|
402
|
+
key: "0"
|
|
403
|
+
} : void 0
|
|
404
|
+
]), 1032, ["text"])) : c("", !0)
|
|
405
|
+
], 512)
|
|
406
|
+
]),
|
|
407
|
+
_: 3
|
|
408
|
+
}, 8, ["id", "for", "style"])) : c("", !0),
|
|
409
|
+
Q("div", {
|
|
410
|
+
class: X(["hys-ui-form-item-body", { "hys-ui-form-inline-feedback": ze.value }]),
|
|
411
|
+
style: ke(Re.value),
|
|
412
|
+
role: f.value ? "group" : void 0,
|
|
413
|
+
"aria-labelledby": f.value && B.value ? C(h) + "-label" : void 0,
|
|
414
|
+
"aria-describedby": f.value ? ae.value : void 0,
|
|
415
|
+
"aria-invalid": f.value ? g.value : void 0
|
|
416
|
+
}, [
|
|
417
|
+
Q("div", {
|
|
418
|
+
ref_key: "control",
|
|
419
|
+
ref: V,
|
|
420
|
+
class: X(["hys-ui-form-item-control", {
|
|
421
|
+
"hys-ui-ent-invalid": g.value,
|
|
422
|
+
"hys-ui-form-item-warning": d.value === "warning"
|
|
423
|
+
}])
|
|
424
|
+
}, [
|
|
425
|
+
w(l.$slots, "default", {
|
|
426
|
+
id: p.value,
|
|
427
|
+
invalid: g.value,
|
|
428
|
+
error: v.value,
|
|
429
|
+
warning: y.value,
|
|
430
|
+
errors: W.value,
|
|
431
|
+
warnings: $.value,
|
|
432
|
+
status: d.value,
|
|
433
|
+
disabled: U.value,
|
|
434
|
+
size: R.value
|
|
435
|
+
}, void 0, !0),
|
|
436
|
+
Ve.value && d.value !== "idle" ? (r(), n("span", {
|
|
437
|
+
key: 0,
|
|
438
|
+
class: X(["hys-ui-form-feedback-icon", "hys-ui-form-feedback-" + d.value]),
|
|
439
|
+
"aria-hidden": "true"
|
|
440
|
+
}, [
|
|
441
|
+
d.value === "validating" ? (r(), G(C(aa), {
|
|
442
|
+
key: 0,
|
|
443
|
+
size: 15,
|
|
444
|
+
class: "hys-ui-icon-spin"
|
|
445
|
+
})) : d.value === "success" ? (r(), G(C(la), {
|
|
446
|
+
key: 1,
|
|
447
|
+
size: 15
|
|
448
|
+
})) : (r(), G(C(ta), {
|
|
449
|
+
key: 2,
|
|
450
|
+
size: 15
|
|
451
|
+
}))
|
|
452
|
+
], 2)) : c("", !0)
|
|
453
|
+
], 2),
|
|
454
|
+
ve.value && ye.value ? (r(), n("div", {
|
|
455
|
+
key: 0,
|
|
456
|
+
id: pe.value,
|
|
457
|
+
role: g.value ? "alert" : y.value ? "status" : void 0,
|
|
458
|
+
class: X(["hys-ui-form-item-feedback", {
|
|
459
|
+
"hys-ui-ent-error": g.value,
|
|
460
|
+
"hys-ui-form-warning": !g.value && d.value === "warning"
|
|
461
|
+
}])
|
|
462
|
+
}, [
|
|
463
|
+
w(l.$slots, "help", {
|
|
464
|
+
error: v.value,
|
|
465
|
+
warning: y.value,
|
|
466
|
+
errors: W.value,
|
|
467
|
+
warnings: $.value,
|
|
468
|
+
status: d.value
|
|
469
|
+
}, () => [
|
|
470
|
+
b.help !== void 0 ? (r(), n(K, { key: 0 }, [
|
|
471
|
+
M(F(b.help), 1)
|
|
472
|
+
], 64)) : w(l.$slots, "feedback", {
|
|
473
|
+
error: v.value,
|
|
474
|
+
warning: y.value,
|
|
475
|
+
errors: W.value,
|
|
476
|
+
warnings: $.value,
|
|
477
|
+
status: d.value
|
|
478
|
+
}, () => [
|
|
479
|
+
v.value ? (r(), n("small", wa, [
|
|
480
|
+
w(l.$slots, "error", {
|
|
481
|
+
error: v.value,
|
|
482
|
+
errors: W.value
|
|
483
|
+
}, () => [
|
|
484
|
+
(r(!0), n(K, null, we(W.value, (u, s) => (r(), n(K, { key: s }, [
|
|
485
|
+
s ? (r(), n("br", ma)) : c("", !0),
|
|
486
|
+
M(F(u), 1)
|
|
487
|
+
], 64))), 128))
|
|
488
|
+
], !0)
|
|
489
|
+
])) : y.value ? (r(), n("small", Ca, [
|
|
490
|
+
w(l.$slots, "warning", {
|
|
491
|
+
warning: y.value,
|
|
492
|
+
warnings: $.value
|
|
493
|
+
}, () => [
|
|
494
|
+
(r(!0), n(K, null, we($.value, (u, s) => (r(), n(K, { key: s }, [
|
|
495
|
+
s ? (r(), n("br", Fa)) : c("", !0),
|
|
496
|
+
M(F(u), 1)
|
|
497
|
+
], 64))), 128))
|
|
498
|
+
], !0)
|
|
499
|
+
])) : c("", !0)
|
|
500
|
+
], !0, 1)
|
|
501
|
+
], !0)
|
|
502
|
+
], 10, ka)) : c("", !0),
|
|
503
|
+
b.hint || l.$slots.hint ? (r(), n("small", {
|
|
504
|
+
key: 1,
|
|
505
|
+
id: Z,
|
|
506
|
+
class: "hys-ui-form-item-hint"
|
|
507
|
+
}, [
|
|
508
|
+
w(l.$slots, "hint", {}, () => [
|
|
509
|
+
M(F(b.hint), 1)
|
|
510
|
+
], !0)
|
|
511
|
+
])) : c("", !0),
|
|
512
|
+
b.extra || l.$slots.extra ? (r(), n("div", Sa, [
|
|
513
|
+
w(l.$slots, "extra", { status: d.value }, () => [
|
|
514
|
+
M(F(b.extra), 1)
|
|
515
|
+
], !0)
|
|
516
|
+
])) : c("", !0)
|
|
517
|
+
], 14, ga)
|
|
518
|
+
], 16, ca));
|
|
519
|
+
}
|
|
520
|
+
});
|
|
2
521
|
export {
|
|
3
|
-
|
|
522
|
+
za as default
|
|
4
523
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./HysGantt2.vue.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-316ac1a0"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|