@fewangsit/wangsvue-fats 1.0.1-rc.0 → 1.0.1-rc.11
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/animation/index.es.js +50 -0
- package/approverinfo/index.es.js +6 -6
- package/assetinfo/index.es.js +160 -2
- package/backgroundimagecropper/{BackgroundImageCropper.es.js → index.es.js} +1 -1
- package/badge/index.es.js +7 -7
- package/badgegroup/index.es.js +7 -7
- package/basecalendar/{BaseCalendar.es.js → index.es.js} +6 -6
- package/basetree/index.es.js +14 -14
- package/breadcrumb/index.es.js +6 -6
- package/button/index.es.js +118 -2
- package/buttonaddbyscan/index.es.js +13 -13
- package/buttonbulkaction/index.es.js +184 -2
- package/buttoncopy/index.es.js +6 -6
- package/buttondownload/index.es.js +15 -15
- package/buttonfilter/index.es.js +6 -6
- package/buttonradio/index.es.js +2 -2
- package/buttonscan/index.es.js +414 -2
- package/buttonsearch/index.es.js +9 -9
- package/buttonsearchbyscan/index.es.js +7 -7
- package/buttonselecttree/index.es.js +22 -22
- package/buttonselectuser/index.es.js +25 -25
- package/buttonsync/index.es.js +12 -12
- package/buttontoggle/index.es.js +6 -6
- package/buttonviewlog/index.es.js +2 -2
- package/calendar/index.es.js +4 -4
- package/card/index.es.js +4 -4
- package/carousel/index.es.js +7 -7
- package/checkbox/index.es.js +2 -2
- package/codesnippet/{CodeSnippet.es.js → index.es.js} +1 -1
- package/codesnippetadapter/{CodeSnippetAdapter.es.js → index.es.js} +1 -1
- package/columnlist/{ColumnList.es.js → index.es.js} +8 -8
- package/config/defaultProps.es.js +133 -0
- package/config/index.es.js +10 -218
- package/config/locale.es.js +85 -0
- package/customcolumn/index.es.js +8 -8
- package/datatable/index.es.js +108 -107
- package/datepicker/index.es.js +138 -2
- package/daypicker/index.es.js +6 -6
- package/dialog/index.es.js +4 -4
- package/dialogassetnamedetail/index.es.js +11 -11
- package/dialogbasictransferlog/{DialogBasicTransferLog.es.js → index.es.js} +17 -17
- package/dialogconfirm/index.es.js +17 -17
- package/dialogdamagelog/index.es.js +14 -14
- package/dialogform/index.es.js +32 -32
- package/dialogfulltransferlog/{DialogFullTransferLog.es.js → index.es.js} +16 -16
- package/dialoglinkedasset/index.es.js +9 -9
- package/dialogprintqr/index.es.js +332 -2
- package/dialogreportdamage/index.es.js +12 -12
- package/dialogreportmissing/index.es.js +12 -12
- package/dialogreporttag/index.es.js +8 -8
- package/dialogselecttree/index.es.js +13 -13
- package/dialogselectuser/index.d.ts +2 -2
- package/dialogselectuser/index.es.js +18 -18
- package/dialogselectuserfilter/{DialogSelectUserFilter.es.js → index.es.js} +2 -2
- package/dialogtransferlog/index.es.js +9 -9
- package/directives/{focus/index.es.js → focus.es.js} +2 -2
- package/directives/index.es.js +2 -0
- package/directives/tooltip.es.js +1 -0
- package/disposalreport/index.es.js +8 -8
- package/disposalreportbulkaction/{DisposalReportBulkAction.es.js → index.es.js} +9 -8
- package/disposalreporttable/{DisposalReportTable.es.js → index.es.js} +16 -16
- package/disposalreporttablefilter/{DisposalReportTableFilter.es.js → index.es.js} +5 -5
- package/dropdown/index.es.js +37 -37
- package/editor/{Editor.es.js → index.es.js} +57 -57
- package/editorbutton/{EditorButton.es.js → index.es.js} +1 -1
- package/event-bus/index.es.js +4 -3
- package/event-bus/mitt.es.js +53 -0
- package/fieldwrapper/{FieldWrapper.es.js → index.es.js} +2 -2
- package/fileupload/index.es.js +13 -13
- package/filtercontainer/index.es.js +34 -34
- package/form/index.es.js +23 -23
- package/hardwaresync/{HardwareSync.es.js → index.es.js} +42 -42
- package/icon/index.es.js +4 -4
- package/image/index.es.js +14 -14
- package/imagecompressor/index.es.js +14 -14
- package/imageinputinfo/{ImageInputInfo.es.js → index.es.js} +2 -2
- package/inlinemessage/index.es.js +7 -7
- package/inputbadge/index.es.js +14 -14
- package/inputcurrency/index.es.js +147 -2
- package/inputemail/index.es.js +4 -4
- package/inputnumber/index.es.js +6 -6
- package/inputotp/index.es.js +1 -1
- package/inputpassword/index.es.js +10 -10
- package/inputphonenumber/index.es.js +28 -28
- package/inputrangenumber/index.es.js +9 -9
- package/inputsearch/index.es.js +2 -2
- package/inputtext/index.es.js +11 -11
- package/inputurl/index.es.js +5 -5
- package/invisiblefield/index.es.js +8 -8
- package/languagedropdownoption/{LanguageDropdownOption.es.js → index.es.js} +3 -3
- package/languageswitcher/index.es.js +7 -7
- package/litedropdown/index.es.js +10 -10
- package/loading/index.es.js +8 -8
- package/mentionlist/{MentionList.es.js → index.es.js} +4 -4
- package/menu/index.es.js +20 -19
- package/menuitem/{MenuItem.es.js → index.es.js} +1 -1
- package/multiselect/index.es.js +27 -27
- package/overlaypanel/index.es.js +6 -6
- package/package.json +1 -5
- package/paginator/index.es.js +11 -11
- package/plugins/VueHtmlToPaper.es.js +40 -0
- package/{animation/Animation.es.js → plugins/WangsVue.es.js} +38 -83
- package/plugins/basei18n.d.ts +103 -0
- package/plugins/basei18n.es.js +88 -0
- package/plugins/{formValidation/index.es.js → formValidation.es.js} +4 -4
- package/plugins/i18n.d.ts +5 -102
- package/plugins/i18n.es.js +6 -0
- package/stats.html +1 -1
- package/steps/index.es.js +4 -4
- package/tabmenu/index.es.js +1 -1
- package/tagtype/index.es.js +6 -6
- package/textarea/index.es.js +5 -5
- package/timeline/index.es.js +5 -5
- package/timelinecontentbytype/{TimelineContentByType.es.js → index.es.js} +9 -9
- package/toast/index.es.js +3 -3
- package/toggleswitch/index.es.js +2 -2
- package/transactionroles/index.es.js +2 -2
- package/tree/index.es.js +117 -107
- package/treenode/{TreeNode.es.js → index.es.js} +4 -4
- package/treesearchinput/{TreeSearchInput.es.js → index.es.js} +4 -4
- package/username/index.es.js +20 -20
- package/userwithicon/index.es.js +4 -4
- package/utils/baseToast.util.es.js +1 -1
- package/utils/date.util.es.js +2 -2
- package/utils/index.es.js +3 -36
- package/utils/role.util.es.js +2 -2
- package/validatormessage/index.es.js +4 -4
- package/vendor/highlight.js/es/core.es.js +1 -1
- package/vendor/lodash/_freeGlobal.es.js +1 -1
- package/vendor/simplebar-core/dist/index.es.js +1 -1
- package/wangsvue-fats.d.ts +1 -2
- package/wangsvue-fats.es.js +219 -256
- package/wangsvue-fats.system.js +56 -56
- package/approverinfo/package.json +0 -4
- package/assetinfo/AssetInfo.es.js +0 -179
- package/assetinfo/package.json +0 -4
- package/badge/package.json +0 -4
- package/badgegroup/package.json +0 -4
- package/basetree/package.json +0 -4
- package/breadcrumb/package.json +0 -4
- package/button/Button.es.js +0 -120
- package/button/package.json +0 -4
- package/buttonaddbyscan/package.json +0 -4
- package/buttonbulkaction/ButtonBulkAction.es.js +0 -238
- package/buttonbulkaction/package.json +0 -4
- package/buttoncopy/package.json +0 -4
- package/buttondownload/package.json +0 -4
- package/buttonfilter/package.json +0 -4
- package/buttonradio/package.json +0 -4
- package/buttonscan/ButtonScan.es.js +0 -416
- package/buttonscan/package.json +0 -4
- package/buttonsearch/package.json +0 -4
- package/buttonsearchbyscan/package.json +0 -4
- package/buttonselecttree/package.json +0 -4
- package/buttonselectuser/package.json +0 -4
- package/buttonsync/package.json +0 -4
- package/buttontoggle/package.json +0 -4
- package/buttonviewlog/package.json +0 -4
- package/calendar/package.json +0 -4
- package/card/package.json +0 -4
- package/carousel/package.json +0 -4
- package/checkbox/package.json +0 -4
- package/config/package.json +0 -4
- package/customcolumn/package.json +0 -4
- package/datatable/package.json +0 -4
- package/datepicker/DatePicker.es.js +0 -224
- package/datepicker/package.json +0 -4
- package/daypicker/package.json +0 -4
- package/dialog/package.json +0 -4
- package/dialogassetnamedetail/package.json +0 -4
- package/dialogconfirm/package.json +0 -4
- package/dialogdamagelog/package.json +0 -4
- package/dialogform/package.json +0 -4
- package/dialoglinkedasset/package.json +0 -4
- package/dialogprintqr/DialogPrintQR.es.js +0 -334
- package/dialogprintqr/package.json +0 -4
- package/dialogreportdamage/package.json +0 -4
- package/dialogreportmissing/package.json +0 -4
- package/dialogreporttag/package.json +0 -4
- package/dialogselecttree/package.json +0 -4
- package/dialogselectuser/package.json +0 -4
- package/dialogtransferlog/package.json +0 -4
- package/directives/focus/package.json +0 -4
- package/directives/tooltip/index.es.js +0 -4
- package/directives/tooltip/package.json +0 -4
- package/disposalreport/package.json +0 -4
- package/dropdown/package.json +0 -4
- package/event-bus/package.json +0 -4
- package/fileupload/package.json +0 -4
- package/filtercontainer/package.json +0 -4
- package/form/package.json +0 -4
- package/icon/package.json +0 -4
- package/image/package.json +0 -4
- package/imagecompressor/package.json +0 -4
- package/index.d.ts +0 -2
- package/inlinemessage/package.json +0 -4
- package/inputbadge/package.json +0 -4
- package/inputcurrency/InputCurrency.es.js +0 -150
- package/inputcurrency/helpers/index.es.js +0 -5
- package/inputcurrency/helpers/package.json +0 -4
- package/inputcurrency/package.json +0 -4
- package/inputemail/package.json +0 -4
- package/inputnumber/package.json +0 -4
- package/inputotp/package.json +0 -4
- package/inputpassword/package.json +0 -4
- package/inputphonenumber/package.json +0 -4
- package/inputrangenumber/package.json +0 -4
- package/inputsearch/package.json +0 -4
- package/inputtext/package.json +0 -4
- package/inputurl/package.json +0 -4
- package/invisiblefield/package.json +0 -4
- package/languageswitcher/package.json +0 -4
- package/litedropdown/package.json +0 -4
- package/loading/package.json +0 -4
- package/loading/store/index.es.js +0 -5
- package/loading/store/package.json +0 -4
- package/menu/package.json +0 -4
- package/multiselect/package.json +0 -4
- package/overlaypanel/package.json +0 -4
- package/paginator/package.json +0 -4
- package/plugins/formValidation/package.json +0 -4
- package/plugins/i18n/index.es.js +0 -8
- package/plugins/i18n/package.json +0 -4
- package/plugins/i18n-extension.d.ts +0 -4
- package/steps/package.json +0 -4
- package/tabmenu/package.json +0 -4
- package/tagtype/package.json +0 -4
- package/textarea/package.json +0 -4
- package/timeline/package.json +0 -4
- package/toast/package.json +0 -4
- package/toast/service/index.es.js +0 -5
- package/toast/service/package.json +0 -4
- package/toggleswitch/package.json +0 -4
- package/transactionroles/package.json +0 -4
- package/tree/package.json +0 -4
- package/username/package.json +0 -4
- package/userwithicon/package.json +0 -4
- package/utils/package.json +0 -4
- package/validatormessage/package.json +0 -4
- /package/inputgroup/{InputGroup.es.js → index.es.js} +0 -0
- /package/mentionsection/{MentionSection.es.js → index.es.js} +0 -0
- /package/multirow/{MultiRow.es.js → index.es.js} +0 -0
package/dropdown/index.es.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as x, onMounted as ee, computed as u, inject as N, ref as le, shallowRef as I, reactive as ae, watch as $, createBlock as f, openBlock as s, withCtx as r, createVNode as d, normalizeClass as oe, createCommentVNode as T, unref as t, renderSlot as m, mergeProps as j, createSlots as te, normalizeProps as v, guardReactiveProps as c, createElementVNode as ie, toDisplayString as k, createElementBlock as D, Fragment as E, createTextVNode as R, nextTick as re } from "vue";
|
|
2
2
|
import { u as ne } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
|
|
3
|
-
import { u as se } from "../
|
|
3
|
+
import { u as se } from "../plugins/WangsVue.es.js";
|
|
4
4
|
import { f as de } from "../utils/filterOptions.util.es.js";
|
|
5
5
|
import { m as ue } from "../utils/mergePropsWithDefaults.util.es.js";
|
|
6
6
|
import { a as pe } from "../utils/textFormatter.util.es.js";
|
|
7
7
|
import { s as fe } from "../vendor/primevue/dropdown/dropdown.esm.es.js";
|
|
8
8
|
import { s as K } from "../vendor/primevue/inputgroupaddon/inputgroupaddon.esm.es.js";
|
|
9
|
-
import me from "../badge/index.es.js";
|
|
10
|
-
import { _ as ve } from "../fieldwrapper/
|
|
11
|
-
import B from "../icon/index.es.js";
|
|
12
|
-
import { _ as ce } from "../inputgroup/
|
|
13
|
-
import ge from "../validatormessage/index.es.js";
|
|
9
|
+
import { _ as me } from "../badge/index.es.js";
|
|
10
|
+
import { _ as ve } from "../fieldwrapper/index.es.js";
|
|
11
|
+
import { _ as B } from "../icon/index.es.js";
|
|
12
|
+
import { _ as ce } from "../inputgroup/index.es.js";
|
|
13
|
+
import { _ as ge } from "../validatormessage/index.es.js";
|
|
14
14
|
import { i as z } from "../vendor/lodash-es/isEqual.es.js";
|
|
15
15
|
import { c as F } from "../vendor/lodash-es/cloneDeep.es.js";
|
|
16
|
-
const Ie = /* @__PURE__ */
|
|
16
|
+
const Ie = /* @__PURE__ */ x({
|
|
17
17
|
__name: "Dropdown",
|
|
18
18
|
props: {
|
|
19
19
|
modelValue: { type: [String, Number, Boolean, Object], default: void 0 },
|
|
@@ -52,7 +52,7 @@ const Ie = /* @__PURE__ */ _({
|
|
|
52
52
|
const { locale: p, defaultProps: G } = se("Dropdown"), H = u(() => ue(e, G)), n = N("preset", {}).dropdown, U = N(
|
|
53
53
|
"preset",
|
|
54
54
|
{}
|
|
55
|
-
).inputgroupaddon, g = le(), y = I(!1), b = I(!1), M = u(() => e.invalid || !!
|
|
55
|
+
).inputgroupaddon, g = le(), y = I(!1), b = I(!1), M = u(() => e.invalid || !!a.errorMessage), a = ae({
|
|
56
56
|
value: e.initialValue !== void 0 ? e.initialValue : e.modelValue
|
|
57
57
|
}), J = u(() => {
|
|
58
58
|
var l;
|
|
@@ -65,59 +65,59 @@ const Ie = /* @__PURE__ */ _({
|
|
|
65
65
|
return e.loading ? p.loadingPlaceholder : e.placeholder ?? ((l = p.inputPlaceholder) == null ? void 0 : l.replace("{label}", e.label ?? "").replace("{lowercaseLabel}", (e.label ?? "").toLowerCase()));
|
|
66
66
|
}), X = () => {
|
|
67
67
|
e.useValidator && (Object.assign(
|
|
68
|
-
|
|
68
|
+
a,
|
|
69
69
|
ne(e.fieldName ?? "dropdown", (l) => !(l != null && l !== "") && e.mandatory ? typeof e.validatorMessage == "object" && "empty" in e.validatorMessage ? e.validatorMessage.empty : e.validatorMessage ?? J.value : re(Y))
|
|
70
|
-
), e.initialValue !== void 0 && (
|
|
70
|
+
), e.initialValue !== void 0 && (a.value = e.initialValue), e.invalid && a.validate());
|
|
71
71
|
}, Y = () => e.validatorMessage && e.invalid ? e.validatorMessage : !0, Z = (l) => {
|
|
72
|
-
const { value:
|
|
73
|
-
e.unselectOnReselect ? b.value = !0 : O("update:modelValue",
|
|
72
|
+
const { value: o } = l;
|
|
73
|
+
e.unselectOnReselect ? b.value = !0 : O("update:modelValue", o);
|
|
74
74
|
}, h = () => {
|
|
75
75
|
if (e.optionValue) {
|
|
76
|
-
const l = V.value.find((
|
|
77
|
-
if (typeof
|
|
78
|
-
return e.dataKey ?
|
|
79
|
-
F(
|
|
80
|
-
F(
|
|
76
|
+
const l = V.value.find((o) => {
|
|
77
|
+
if (typeof o != "string")
|
|
78
|
+
return e.dataKey ? a.value[e.dataKey] === o[e.optionValue ?? ""][e.dataKey] : z(
|
|
79
|
+
F(o[e.optionValue ?? ""]),
|
|
80
|
+
F(a.value)
|
|
81
81
|
);
|
|
82
82
|
});
|
|
83
83
|
if (l && typeof l != "string")
|
|
84
84
|
return l[e.optionLabel ?? ""];
|
|
85
|
-
} else if (
|
|
86
|
-
return
|
|
87
|
-
return
|
|
88
|
-
},
|
|
85
|
+
} else if (a.value && typeof a.value == "object" && e.optionLabel && e.optionLabel in a.value)
|
|
86
|
+
return a.value[e.optionLabel];
|
|
87
|
+
return a.value;
|
|
88
|
+
}, _ = () => {
|
|
89
89
|
g.value && g.value.show();
|
|
90
90
|
};
|
|
91
91
|
return $(
|
|
92
92
|
() => e.initialValue,
|
|
93
93
|
(l) => {
|
|
94
|
-
|
|
94
|
+
a.value = l;
|
|
95
95
|
},
|
|
96
96
|
{ once: !0 }
|
|
97
97
|
), $(
|
|
98
98
|
() => e.modelValue,
|
|
99
99
|
(l) => {
|
|
100
|
-
|
|
100
|
+
a.value = l;
|
|
101
101
|
}
|
|
102
102
|
), $(
|
|
103
|
-
() =>
|
|
104
|
-
(l,
|
|
103
|
+
() => a.value,
|
|
104
|
+
(l, o) => {
|
|
105
105
|
setTimeout(() => {
|
|
106
|
-
e.unselectOnReselect && b.value && (z(l,
|
|
106
|
+
e.unselectOnReselect && b.value && (z(l, o) && l !== void 0 && (a.value = void 0), b.value = !1, O("update:modelValue", a.value));
|
|
107
107
|
}, 0);
|
|
108
108
|
}
|
|
109
109
|
), q({
|
|
110
|
-
showOverlay:
|
|
111
|
-
}), (l,
|
|
110
|
+
showOverlay: _
|
|
111
|
+
}), (l, o) => (s(), f(ve, {
|
|
112
112
|
info: l.fieldInfo,
|
|
113
113
|
label: e.label,
|
|
114
114
|
mandatory: e.mandatory,
|
|
115
115
|
"show-optional-text": l.showOptionalText,
|
|
116
|
-
onInfoClick:
|
|
116
|
+
onInfoClick: o[3] || (o[3] = (w) => l.$emit("fieldInfoClick"))
|
|
117
117
|
}, {
|
|
118
118
|
default: r(() => [
|
|
119
119
|
d(ce, {
|
|
120
|
-
class:
|
|
120
|
+
class: oe([
|
|
121
121
|
{
|
|
122
122
|
"grid grid-cols-[max-content,1fr,max-content]": l.$slots["addon-left"] && l.$slots["addon-right"],
|
|
123
123
|
"grid grid-cols-[1fr,max-content]": !l.$slots["addon-left"] && l.$slots["addon-right"],
|
|
@@ -144,8 +144,8 @@ const Ie = /* @__PURE__ */ _({
|
|
|
144
144
|
ref_key: "dropdown",
|
|
145
145
|
ref: g
|
|
146
146
|
}, e, {
|
|
147
|
-
modelValue:
|
|
148
|
-
"onUpdate:modelValue":
|
|
147
|
+
modelValue: a.value,
|
|
148
|
+
"onUpdate:modelValue": o[0] || (o[0] = (i) => a.value = i),
|
|
149
149
|
"aria-describedby": e.label + "error",
|
|
150
150
|
"filter-placeholder": e.filterPlaceholder || t(p).filterPlaceholder,
|
|
151
151
|
invalid: M.value,
|
|
@@ -159,8 +159,8 @@ const Ie = /* @__PURE__ */ _({
|
|
|
159
159
|
},
|
|
160
160
|
"virtual-scroller-options": ((L = V.value) == null ? void 0 : L.length) > 10 ? { itemSize: 32 } : void 0,
|
|
161
161
|
onChange: Z,
|
|
162
|
-
onHide:
|
|
163
|
-
onShow:
|
|
162
|
+
onHide: o[1] || (o[1] = (i) => y.value = !1),
|
|
163
|
+
onShow: o[2] || (o[2] = (i) => (l.$emit("show"), y.value = !0))
|
|
164
164
|
}), te({
|
|
165
165
|
dropdownicon: r(() => [
|
|
166
166
|
d(B, v(c(t(n).dropdownicon({ state: { isShowOverlay: y.value } }))), null, 16)
|
|
@@ -231,7 +231,7 @@ const Ie = /* @__PURE__ */ _({
|
|
|
231
231
|
}, 8, ["class", "disabled", "invalid", "ring"]),
|
|
232
232
|
d(ge, {
|
|
233
233
|
id: e.label + "error",
|
|
234
|
-
message:
|
|
234
|
+
message: a.errorMessage
|
|
235
235
|
}, null, 8, ["id", "message"])
|
|
236
236
|
]),
|
|
237
237
|
_: 3
|
|
@@ -239,5 +239,5 @@ const Ie = /* @__PURE__ */ _({
|
|
|
239
239
|
}
|
|
240
240
|
});
|
|
241
241
|
export {
|
|
242
|
-
Ie as
|
|
242
|
+
Ie as _
|
|
243
243
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as De, mergeModels as ve, inject as Oe, useModel as ge, onMounted as je, reactive as Ke, shallowRef as x, ref as R, computed as X, watch as be, resolveDirective as We, createElementBlock as E, openBlock as f, Fragment as Y, createVNode as c, withCtx as v, createElementVNode as d, normalizeClass as _, createCommentVNode as U, createBlock as D, renderList as he, mergeProps as ze, unref as
|
|
1
|
+
import { defineComponent as De, mergeModels as ve, inject as Oe, useModel as ge, onMounted as je, reactive as Ke, shallowRef as x, ref as R, computed as X, watch as be, resolveDirective as We, createElementBlock as E, openBlock as f, Fragment as Y, createVNode as c, withCtx as v, createElementVNode as d, normalizeClass as _, createCommentVNode as U, createBlock as D, renderList as he, mergeProps as ze, unref as s, createTextVNode as Ge, toDisplayString as ye, withDirectives as qe, nextTick as Je } from "vue";
|
|
2
2
|
import { u as Qe } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
|
|
3
3
|
import { B as Xe } from "../vendor/@tiptap/extension-bold/dist/index.es.js";
|
|
4
4
|
import { B as Ye } from "../vendor/@tiptap/extension-bullet-list/dist/index.es.js";
|
|
@@ -10,8 +10,8 @@ import { H as ot } from "../vendor/@tiptap/extension-history/dist/index.es.js";
|
|
|
10
10
|
import { I as lt } from "../vendor/@tiptap/extension-image/dist/index.es.js";
|
|
11
11
|
import { I as nt } from "../vendor/@tiptap/extension-italic/dist/index.es.js";
|
|
12
12
|
import { L as it } from "../vendor/@tiptap/extension-link/dist/index.es.js";
|
|
13
|
-
import { L as
|
|
14
|
-
import { M as
|
|
13
|
+
import { L as st } from "../vendor/@tiptap/extension-list-item/dist/index.es.js";
|
|
14
|
+
import { M as rt } from "../vendor/@tiptap/extension-mention/dist/index.es.js";
|
|
15
15
|
import { O as dt } from "../vendor/@tiptap/extension-ordered-list/dist/index.es.js";
|
|
16
16
|
import { P as ct } from "../vendor/@tiptap/extension-paragraph/dist/index.es.js";
|
|
17
17
|
import { P as ut } from "../vendor/@tiptap/extension-placeholder/dist/index.es.js";
|
|
@@ -19,22 +19,22 @@ import { T as mt } from "../vendor/@tiptap/extension-text/dist/index.es.js";
|
|
|
19
19
|
import { U as pt } from "../vendor/@tiptap/extension-underline/dist/index.es.js";
|
|
20
20
|
import { V as _e, a as ft, u as vt, E as gt, F as Z } from "../vendor/@tiptap/vue-3/dist/index.es.js";
|
|
21
21
|
import { N as ke, m as Ce } from "../vendor/@tiptap/core/dist/index.es.js";
|
|
22
|
-
import { _ as bt } from "../codesnippetadapter/
|
|
23
|
-
import { _ as ht } from "../mentionsection/
|
|
22
|
+
import { _ as bt } from "../codesnippetadapter/index.es.js";
|
|
23
|
+
import { _ as ht } from "../mentionsection/index.es.js";
|
|
24
24
|
import { t as yt } from "../vendor/tippy.js/dist/tippy.esm.es.js";
|
|
25
|
-
import { _ as xt } from "../mentionlist/
|
|
25
|
+
import { _ as xt } from "../mentionlist/index.es.js";
|
|
26
26
|
import { v as _t } from "../utils/addAttachment.util.es.js";
|
|
27
27
|
import { s as kt } from "../vendor/primevue/menu/menu.esm.es.js";
|
|
28
|
-
import { _ as ee } from "../button/
|
|
29
|
-
import Ct from "../dialog/index.es.js";
|
|
30
|
-
import { _ as wt } from "../fieldwrapper/
|
|
31
|
-
import St from "../form/index.es.js";
|
|
32
|
-
import At from "../icon/index.es.js";
|
|
33
|
-
import Lt from "../inputtext/index.es.js";
|
|
34
|
-
import xe from "../inputurl/index.es.js";
|
|
35
|
-
import Mt from "../overlaypanel/index.es.js";
|
|
36
|
-
import Tt from "../validatormessage/index.es.js";
|
|
37
|
-
import { _ as M } from "../editorbutton/
|
|
28
|
+
import { _ as ee } from "../button/index.es.js";
|
|
29
|
+
import { _ as Ct } from "../dialog/index.es.js";
|
|
30
|
+
import { _ as wt } from "../fieldwrapper/index.es.js";
|
|
31
|
+
import { _ as St } from "../form/index.es.js";
|
|
32
|
+
import { _ as At } from "../icon/index.es.js";
|
|
33
|
+
import { _ as Lt } from "../inputtext/index.es.js";
|
|
34
|
+
import { _ as xe } from "../inputurl/index.es.js";
|
|
35
|
+
import { _ as Mt } from "../overlaypanel/index.es.js";
|
|
36
|
+
import { _ as Tt } from "../validatormessage/index.es.js";
|
|
37
|
+
import { _ as M } from "../editorbutton/index.es.js";
|
|
38
38
|
const It = ke.create({
|
|
39
39
|
name: "codeSnippet",
|
|
40
40
|
group: "block",
|
|
@@ -53,19 +53,19 @@ const It = ke.create({
|
|
|
53
53
|
}
|
|
54
54
|
];
|
|
55
55
|
},
|
|
56
|
-
renderHTML({ HTMLAttributes:
|
|
57
|
-
return ["codeSnippet", Ce(
|
|
56
|
+
renderHTML({ HTMLAttributes: r }) {
|
|
57
|
+
return ["codeSnippet", Ce(r)];
|
|
58
58
|
},
|
|
59
59
|
addNodeView() {
|
|
60
60
|
return _e(bt);
|
|
61
61
|
},
|
|
62
62
|
addCommands() {
|
|
63
63
|
return {
|
|
64
|
-
insertCodeSnippet: () => ({ commands:
|
|
64
|
+
insertCodeSnippet: () => ({ commands: r }) => r.insertContent({
|
|
65
65
|
type: "codeSnippet",
|
|
66
66
|
attrs: { code: "" }
|
|
67
67
|
}),
|
|
68
|
-
deleteCodeSnippet: () => ({ commands:
|
|
68
|
+
deleteCodeSnippet: () => ({ commands: r }) => r.deleteSelection()
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
}), Bt = ke.create({
|
|
@@ -89,30 +89,30 @@ const It = ke.create({
|
|
|
89
89
|
}
|
|
90
90
|
];
|
|
91
91
|
},
|
|
92
|
-
renderHTML({ HTMLAttributes:
|
|
93
|
-
return ["mentionSection", Ce(
|
|
92
|
+
renderHTML({ HTMLAttributes: r }) {
|
|
93
|
+
return ["mentionSection", Ce(r)];
|
|
94
94
|
},
|
|
95
95
|
addNodeView() {
|
|
96
96
|
return _e(ht);
|
|
97
97
|
},
|
|
98
98
|
addCommands() {
|
|
99
99
|
return {
|
|
100
|
-
insertMentionSection: (
|
|
100
|
+
insertMentionSection: (r) => ({ commands: g }) => g.insertContent({
|
|
101
101
|
type: "mentionSection",
|
|
102
102
|
attrs: {
|
|
103
|
-
title:
|
|
103
|
+
title: r,
|
|
104
104
|
bodyText: null
|
|
105
105
|
}
|
|
106
106
|
}),
|
|
107
|
-
deleteMentionSection: () => ({ commands:
|
|
107
|
+
deleteMentionSection: () => ({ commands: r }) => r.deleteSelection()
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
110
|
}), Ht = () => ({
|
|
111
111
|
render: () => {
|
|
112
|
-
let
|
|
112
|
+
let r, g;
|
|
113
113
|
return {
|
|
114
114
|
onStart(m) {
|
|
115
|
-
|
|
115
|
+
r = new ft(xt, {
|
|
116
116
|
props: {
|
|
117
117
|
items: m.items,
|
|
118
118
|
command: m.command
|
|
@@ -121,7 +121,7 @@ const It = ke.create({
|
|
|
121
121
|
}), m.clientRect && (g = yt("body", {
|
|
122
122
|
getReferenceClientRect: m.clientRect,
|
|
123
123
|
appendTo: () => document.body,
|
|
124
|
-
content:
|
|
124
|
+
content: r.element,
|
|
125
125
|
showOnCreate: !0,
|
|
126
126
|
interactive: !0,
|
|
127
127
|
trigger: "manual",
|
|
@@ -129,15 +129,15 @@ const It = ke.create({
|
|
|
129
129
|
}));
|
|
130
130
|
},
|
|
131
131
|
onUpdate(m) {
|
|
132
|
-
|
|
132
|
+
r.updateProps(m), m.clientRect && g[0].setProps({
|
|
133
133
|
getReferenceClientRect: m.clientRect
|
|
134
134
|
});
|
|
135
135
|
},
|
|
136
136
|
onKeyDown(m) {
|
|
137
|
-
return m.event.key === "Escape" ? (g[0].hide(), !0) :
|
|
137
|
+
return m.event.key === "Escape" ? (g[0].hide(), !0) : r.ref.onKeyDown(m.event);
|
|
138
138
|
},
|
|
139
139
|
onExit() {
|
|
140
|
-
g[0].destroy(),
|
|
140
|
+
g[0].destroy(), r.destroy();
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
143
|
}
|
|
@@ -196,10 +196,10 @@ const It = ke.create({
|
|
|
196
196
|
mentionedListModifiers: {}
|
|
197
197
|
}),
|
|
198
198
|
emits: /* @__PURE__ */ ve(["update:modelValue", "postImageLocal", "deleteImageLocal", "blur", "focus", "update:mentionedList"], ["update:modelValue", "update:mentionedList"]),
|
|
199
|
-
setup(
|
|
200
|
-
const we = Oe("preset", {}).menu, l =
|
|
201
|
-
ge(
|
|
202
|
-
const Se = ge(
|
|
199
|
+
setup(r, { expose: g, emit: m }) {
|
|
200
|
+
const we = Oe("preset", {}).menu, l = r, V = m;
|
|
201
|
+
ge(r, "modelValue");
|
|
202
|
+
const Se = ge(r, "mentionedList");
|
|
203
203
|
je(() => {
|
|
204
204
|
l.useValidator && (Object.assign(
|
|
205
205
|
b,
|
|
@@ -309,7 +309,7 @@ const It = ke.create({
|
|
|
309
309
|
class: "list-disc px-3 py-1"
|
|
310
310
|
}
|
|
311
311
|
}),
|
|
312
|
-
|
|
312
|
+
st,
|
|
313
313
|
// Marks
|
|
314
314
|
Xe,
|
|
315
315
|
nt,
|
|
@@ -325,7 +325,7 @@ const It = ke.create({
|
|
|
325
325
|
openOnClick: !1
|
|
326
326
|
}),
|
|
327
327
|
ot,
|
|
328
|
-
|
|
328
|
+
rt.configure({
|
|
329
329
|
HTMLAttributes: {
|
|
330
330
|
class: "bg-primary-200 text-primary-800 rounded-[50px] px-1"
|
|
331
331
|
},
|
|
@@ -344,7 +344,7 @@ const It = ke.create({
|
|
|
344
344
|
tt
|
|
345
345
|
]
|
|
346
346
|
}), Le = X(() => {
|
|
347
|
-
var S, y, A, L, I, B, H, F, W,
|
|
347
|
+
var S, y, A, L, I, B, H, F, W, re, de, ce, ue, me, pe, fe;
|
|
348
348
|
if (!a.value) return [];
|
|
349
349
|
const {
|
|
350
350
|
toggleBold: t,
|
|
@@ -424,7 +424,7 @@ const It = ke.create({
|
|
|
424
424
|
},
|
|
425
425
|
{
|
|
426
426
|
icon: "code-line",
|
|
427
|
-
active: (
|
|
427
|
+
active: (re = a.value) == null ? void 0 : re.isActive("code"),
|
|
428
428
|
tooltipText: "Inline Code | Ctrl + E",
|
|
429
429
|
onClick: () => {
|
|
430
430
|
e(), u();
|
|
@@ -586,7 +586,7 @@ const It = ke.create({
|
|
|
586
586
|
/* @__PURE__ */ new Set([...P.value, t])
|
|
587
587
|
)), T.value && ((i = a.value) == null || i.commands.setImage({ src: T.value }), P.value = Array.from(
|
|
588
588
|
/* @__PURE__ */ new Set([...P.value, T.value])
|
|
589
|
-
)), T.value = void 0,
|
|
589
|
+
)), T.value = void 0, se();
|
|
590
590
|
}, ne = () => {
|
|
591
591
|
var t;
|
|
592
592
|
N.value && N.value.title === "localImage" && V("deleteImageLocal", N.value), (t = a.value) == null || t.commands.deleteSelection();
|
|
@@ -611,7 +611,7 @@ const It = ke.create({
|
|
|
611
611
|
var n, o;
|
|
612
612
|
const { insertCodeSnippet: t, deleteCodeSnippet: e } = (n = a.value) == null ? void 0 : n.commands;
|
|
613
613
|
return (o = a.value) != null && o.isActive("codeSnippet") ? e() : t(), !1;
|
|
614
|
-
},
|
|
614
|
+
}, se = () => {
|
|
615
615
|
a.value.commands.createParagraphNear();
|
|
616
616
|
}, Ee = (t) => {
|
|
617
617
|
var e;
|
|
@@ -677,7 +677,7 @@ const It = ke.create({
|
|
|
677
677
|
class: [{ "!bg-primary-50 ": o.active }, o.class]
|
|
678
678
|
}), null, 16, ["class"]))), 128))
|
|
679
679
|
], 2)) : U("", !0),
|
|
680
|
-
k.value ? U("", !0) : (f(), D(
|
|
680
|
+
k.value ? U("", !0) : (f(), D(s(gt), {
|
|
681
681
|
key: 1,
|
|
682
682
|
class: _([
|
|
683
683
|
`${l.editorState === "editable" ? "px-3 py-2" : ""} [&_*]:outline-none`,
|
|
@@ -705,10 +705,10 @@ const It = ke.create({
|
|
|
705
705
|
"[&_*:has(code)]:my-[0.25rem]",
|
|
706
706
|
`${l.contentWrapperClass}`
|
|
707
707
|
]),
|
|
708
|
-
editor:
|
|
708
|
+
editor: s(a),
|
|
709
709
|
spellcheck: "false"
|
|
710
710
|
}, null, 8, ["class", "editor"])),
|
|
711
|
-
c(
|
|
711
|
+
c(s(kt), {
|
|
712
712
|
ref_key: "headingMenu",
|
|
713
713
|
ref: te,
|
|
714
714
|
model: Me.value,
|
|
@@ -719,11 +719,11 @@ const It = ke.create({
|
|
|
719
719
|
return [
|
|
720
720
|
d("a", {
|
|
721
721
|
class: _([
|
|
722
|
-
...(i =
|
|
722
|
+
...(i = s(we)) == null ? void 0 : i.action.class,
|
|
723
723
|
o.class,
|
|
724
724
|
"flex items-center !justify-between h-[30px]",
|
|
725
725
|
{
|
|
726
|
-
"bg-primary-50": ((u =
|
|
726
|
+
"bg-primary-50": ((u = s(a)) == null ? void 0 : u.isActive("heading", { level: 1 })) && o.label === "Heading 1" || ((p = s(a)) == null ? void 0 : p.isActive("heading", { level: 2 })) && o.label === "Heading 2" || ((C = s(a)) == null ? void 0 : C.isActive("heading", { level: 3 })) && o.label === "Heading 3" || ((w = s(a)) == null ? void 0 : w.isActive("heading", { level: 4 })) && o.label === "Heading 4" || ((h = s(a)) == null ? void 0 : h.isActive("heading", { level: 5 })) && o.label === "Heading 5" || ((S = s(a)) == null ? void 0 : S.isActive("heading", { level: 6 })) && o.label === "Heading 6" || ((y = s(a)) == null ? void 0 : y.isActive("paragraph")) && o.label === "Paragraf"
|
|
727
727
|
}
|
|
728
728
|
]),
|
|
729
729
|
title: o.label,
|
|
@@ -739,12 +739,12 @@ const It = ke.create({
|
|
|
739
739
|
}),
|
|
740
740
|
_: 1
|
|
741
741
|
}, 8, ["model"]),
|
|
742
|
-
|
|
742
|
+
s(a) && l.editorState === "editable" ? (f(), D(s(Z), {
|
|
743
743
|
key: 2,
|
|
744
|
-
editor:
|
|
744
|
+
editor: s(a),
|
|
745
745
|
"should-show": () => {
|
|
746
746
|
var o, i;
|
|
747
|
-
return ((o =
|
|
747
|
+
return ((o = s(a)) == null ? void 0 : o.isActive("codeSnippet")) || ((i = s(a)) == null ? void 0 : i.isActive("mentionSection"));
|
|
748
748
|
},
|
|
749
749
|
"tippy-options": { placement: "top", zIndex: 9 },
|
|
750
750
|
class: "-mt-1.5 shadow-panel",
|
|
@@ -753,7 +753,7 @@ const It = ke.create({
|
|
|
753
753
|
default: v(() => [
|
|
754
754
|
d("div", Nt, [
|
|
755
755
|
c(M, {
|
|
756
|
-
onClick:
|
|
756
|
+
onClick: se,
|
|
757
757
|
icon: "close",
|
|
758
758
|
severity: "secondary",
|
|
759
759
|
text: "",
|
|
@@ -763,12 +763,12 @@ const It = ke.create({
|
|
|
763
763
|
]),
|
|
764
764
|
_: 1
|
|
765
765
|
}, 8, ["editor", "should-show"])) : U("", !0),
|
|
766
|
-
|
|
766
|
+
s(a) && !O.value && l.editorState === "editable" ? (f(), D(s(Z), {
|
|
767
767
|
key: 3,
|
|
768
|
-
editor:
|
|
768
|
+
editor: s(a),
|
|
769
769
|
"should-show": () => {
|
|
770
770
|
var o;
|
|
771
|
-
return (o =
|
|
771
|
+
return (o = s(a)) == null ? void 0 : o.isActive("link");
|
|
772
772
|
},
|
|
773
773
|
"tippy-options": { placement: "bottom", zIndex: 9 },
|
|
774
774
|
class: "-mt-1.5 shadow-panel",
|
|
@@ -871,12 +871,12 @@ const It = ke.create({
|
|
|
871
871
|
]),
|
|
872
872
|
_: 1
|
|
873
873
|
}, 8, ["visible"]),
|
|
874
|
-
|
|
874
|
+
s(a) && l.editorState === "editable" ? (f(), D(s(Z), {
|
|
875
875
|
key: 4,
|
|
876
|
-
editor:
|
|
876
|
+
editor: s(a),
|
|
877
877
|
"should-show": () => {
|
|
878
878
|
var o;
|
|
879
|
-
return !!((o =
|
|
879
|
+
return !!((o = s(a)) != null && o.isActive("image"));
|
|
880
880
|
},
|
|
881
881
|
"tippy-options": { placement: "top", zIndex: 9 },
|
|
882
882
|
class: "-mt-1.5 shadow-panel",
|
|
@@ -943,7 +943,7 @@ const It = ke.create({
|
|
|
943
943
|
"use-validator": ""
|
|
944
944
|
}, null, 8, ["value"]),
|
|
945
945
|
c(ee, {
|
|
946
|
-
label: (i =
|
|
946
|
+
label: (i = s(a)) != null && i.isActive("link") ? "Simpan" : "Tambahkan",
|
|
947
947
|
class: "w-max ml-auto",
|
|
948
948
|
severity: "secondary",
|
|
949
949
|
type: "submit"
|
package/event-bus/index.es.js
CHANGED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
function c(e) {
|
|
2
|
+
var o;
|
|
3
|
+
e = e || ((o = window.eventBus) == null ? void 0 : o.all) || /* @__PURE__ */ new Map();
|
|
4
|
+
const f = {
|
|
5
|
+
/**
|
|
6
|
+
* A Map of event names to registered handler functions.
|
|
7
|
+
*/
|
|
8
|
+
all: e,
|
|
9
|
+
/**
|
|
10
|
+
* Register an event handler for the given type.
|
|
11
|
+
* @param {string|symbol} type Type of event to listen for, or `'*'` for all events
|
|
12
|
+
* @param {Function} handler Function to call in response to given event
|
|
13
|
+
* @memberOf mitt
|
|
14
|
+
*/
|
|
15
|
+
on(n, i) {
|
|
16
|
+
const s = e == null ? void 0 : e.get(n);
|
|
17
|
+
s ? s.push(i) : e == null || e.set(n, [i]);
|
|
18
|
+
},
|
|
19
|
+
/**
|
|
20
|
+
* Remove an event handler for the given type.
|
|
21
|
+
* If `handler` is omitted, all handlers of the given type are removed.
|
|
22
|
+
* @param {string|symbol} type Type of event to unregister `handler` from (`'*'` to remove a wildcard handler)
|
|
23
|
+
* @param {Function} [handler] Handler function to remove
|
|
24
|
+
* @memberOf mitt
|
|
25
|
+
*/
|
|
26
|
+
off(n, i) {
|
|
27
|
+
const s = e == null ? void 0 : e.get(n);
|
|
28
|
+
s && (i ? s.splice(s.indexOf(i) >>> 0, 1) : e == null || e.set(n, []));
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* Invoke all handlers for the given type.
|
|
32
|
+
* If present, `'*'` handlers are invoked after type-matched handlers.
|
|
33
|
+
*
|
|
34
|
+
* Note: Manually firing '*' handlers is not supported.
|
|
35
|
+
*
|
|
36
|
+
* @param {string|symbol} type The event type to invoke
|
|
37
|
+
* @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
|
|
38
|
+
* @memberOf mitt
|
|
39
|
+
*/
|
|
40
|
+
emit(n, i) {
|
|
41
|
+
let s = e == null ? void 0 : e.get(n);
|
|
42
|
+
s && s.slice().map((t) => {
|
|
43
|
+
t(i);
|
|
44
|
+
}), s = e == null ? void 0 : e.get("*"), s && s.slice().map((t) => {
|
|
45
|
+
t(n, i);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
return window.eventBus ?? (window.eventBus = f), window.eventBus;
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
c as m
|
|
53
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as $, useSlots as b, computed as w, createElementBlock as l, renderSlot as p, openBlock as o, normalizeProps as t, mergeProps as r, createCommentVNode as a, Fragment as g, createTextVNode as v, createBlock as C, toDisplayString as i, unref as u } from "vue";
|
|
2
|
-
import { u as B } from "../
|
|
2
|
+
import { u as B } from "../plugins/WangsVue.es.js";
|
|
3
3
|
import { m as P } from "../utils/mergePropsWithDefaults.util.es.js";
|
|
4
|
-
import h from "../icon/index.es.js";
|
|
4
|
+
import { _ as h } from "../icon/index.es.js";
|
|
5
5
|
const T = /* @__PURE__ */ $({
|
|
6
6
|
__name: "FieldWrapper",
|
|
7
7
|
props: {
|
package/fileupload/index.es.js
CHANGED
|
@@ -2,10 +2,10 @@ import { defineComponent as D, mergeModels as $, useModel as G, inject as Y, sha
|
|
|
2
2
|
import { u as X } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
|
|
3
3
|
import { u as ee } from "../utils/baseToast.util.es.js";
|
|
4
4
|
import { s as ae } from "../vendor/primevue/fileupload/fileupload.esm.es.js";
|
|
5
|
-
import { _ as le } from "../fieldwrapper/
|
|
6
|
-
import se from "../inputtext/index.es.js";
|
|
7
|
-
import { _ as ie } from "../button/
|
|
8
|
-
import oe from "../validatormessage/index.es.js";
|
|
5
|
+
import { _ as le } from "../fieldwrapper/index.es.js";
|
|
6
|
+
import { _ as se } from "../inputtext/index.es.js";
|
|
7
|
+
import { _ as ie } from "../button/index.es.js";
|
|
8
|
+
import { _ as oe } from "../validatormessage/index.es.js";
|
|
9
9
|
const te = { class: "'!mt-0 font-light text-xs text-general-500'" }, re = 1048576, ye = /* @__PURE__ */ D({
|
|
10
10
|
__name: "FileUpload",
|
|
11
11
|
props: /* @__PURE__ */ $({
|
|
@@ -35,7 +35,7 @@ const te = { class: "'!mt-0 font-light text-xs text-general-500'" }, re = 104857
|
|
|
35
35
|
}),
|
|
36
36
|
emits: /* @__PURE__ */ $(["select", "update:modelValue", "upload", "error"], ["update:modelValue"]),
|
|
37
37
|
setup(T, { emit: R }) {
|
|
38
|
-
const V = ee(), r = G(T, "modelValue"), a = T,
|
|
38
|
+
const V = ee(), r = G(T, "modelValue"), a = T, _ = R, { fileupload: c = {} } = Y("preset", {}), i = y(), t = y(), o = y(), E = z(), n = H({ value: void 0 }), q = Z(() => !!n.errorMessage || (u.value ? u.value.length > 0 : !1)), d = y(!1);
|
|
39
39
|
J(() => {
|
|
40
40
|
a.useValidator && Object.assign(
|
|
41
41
|
n,
|
|
@@ -61,7 +61,7 @@ const te = { class: "'!mt-0 font-light text-xs text-general-500'" }, re = 104857
|
|
|
61
61
|
try {
|
|
62
62
|
if (!e.files || e.files.length === 0)
|
|
63
63
|
return;
|
|
64
|
-
a.multiple ? (o.value = e.files, i.value = e.files.map((s) => s.name),
|
|
64
|
+
a.multiple ? (o.value = e.files, i.value = e.files.map((s) => s.name), _("select", e.files)) : (o.value = e.files[0], i.value = (l = e.files[0]) == null ? void 0 : l.name, _("select", e.files[0]));
|
|
65
65
|
} catch (s) {
|
|
66
66
|
console.error(s);
|
|
67
67
|
}
|
|
@@ -89,11 +89,11 @@ const te = { class: "'!mt-0 font-light text-xs text-general-500'" }, re = 104857
|
|
|
89
89
|
return x(o, (e) => {
|
|
90
90
|
n.value = e, r.value = e, u.value = void 0, t.value = void 0;
|
|
91
91
|
}), x(r, (e) => {
|
|
92
|
-
Array.isArray(e) && a.multiple ? (o.value = e, i.value = e.map((l) => l.name)) : e instanceof File ? (o.value = e, i.value = e.name) : (o.value = void 0, i.value = void 0), n.value = e, "messages" in
|
|
92
|
+
Array.isArray(e) && a.multiple ? (o.value = e, i.value = e.map((l) => l.name)) : e instanceof File ? (o.value = e, i.value = e.name) : (o.value = void 0, i.value = void 0), n.value = e, "messages" in E.value && (E.value.messages = []), u.value = void 0, t.value = void 0;
|
|
93
93
|
}), x(u, (e) => {
|
|
94
94
|
if (e && e.length > 0) {
|
|
95
95
|
const l = e[0].replace("{2}", a.accept || "").replace("{2.1}", a.fileExtensions || "");
|
|
96
|
-
l.includes("Invalid file size") &&
|
|
96
|
+
l.includes("Invalid file size") && _("error", "FILE_SIZE_TOO_LARGE"), j(l), a.useErrorToast && V.add({
|
|
97
97
|
message: l,
|
|
98
98
|
severity: "error"
|
|
99
99
|
}), o.value = void 0, i.value = void 0;
|
|
@@ -101,7 +101,7 @@ const te = { class: "'!mt-0 font-light text-xs text-general-500'" }, re = 104857
|
|
|
101
101
|
t.value = void 0;
|
|
102
102
|
}), (e, l) => (f(), A(m(ae), g(a, {
|
|
103
103
|
ref_key: "fileUpload",
|
|
104
|
-
ref:
|
|
104
|
+
ref: E,
|
|
105
105
|
"file-limit": e.multiple ? void 0 : 1,
|
|
106
106
|
pt: { input: { style: "display: none" } },
|
|
107
107
|
onSelect: L,
|
|
@@ -123,8 +123,8 @@ const te = { class: "'!mt-0 font-light text-xs text-general-500'" }, re = 104857
|
|
|
123
123
|
invalid: q.value,
|
|
124
124
|
"model-value": Array.isArray(i.value) ? i.value.join(", ") : i.value,
|
|
125
125
|
placeholder: a.placeholder,
|
|
126
|
-
onClick: (
|
|
127
|
-
onKeydown: Q((
|
|
126
|
+
onClick: (b) => U(p, v),
|
|
127
|
+
onKeydown: Q((b) => K(b, p, v), ["prevent"])
|
|
128
128
|
}, {
|
|
129
129
|
"addon-left": M(() => l[1] || (l[1] = [
|
|
130
130
|
h(" Browse")
|
|
@@ -158,7 +158,7 @@ const te = { class: "'!mt-0 font-light text-xs text-general-500'" }, re = 104857
|
|
|
158
158
|
a.withUpload ? (f(), A(ie, g({ key: 0 }, m(c).buttonupload({ props: a }), {
|
|
159
159
|
disabled: a.disabled || d.value || !o.value,
|
|
160
160
|
label: a.uploadLabel,
|
|
161
|
-
onClick: (
|
|
161
|
+
onClick: (b) => O(s, v),
|
|
162
162
|
severity: "success",
|
|
163
163
|
type: "button"
|
|
164
164
|
}), null, 16, ["disabled", "label", "onClick"])) : S("", !0)
|
|
@@ -172,5 +172,5 @@ const te = { class: "'!mt-0 font-light text-xs text-general-500'" }, re = 104857
|
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
174
|
export {
|
|
175
|
-
ye as
|
|
175
|
+
ye as _
|
|
176
176
|
};
|