@wssto2/vue-core 0.4.16 → 0.4.18
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/dist/{Activity-CVO3sJwy.js → Activity-DB9ABAMb.js} +3 -3
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-B7qSUiee.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-Bm0sxqNz.js} +64 -63
- package/dist/{Changes-Bzvl3cEx.js → Changes-IIczcs6O.js} +2 -2
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-CD5zZ29o.js → CollectionPage.vue_vue_type_script_setup_true_lang-CUoyYpaW.js} +6 -6
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-ChS9ULwk.js → DataTable.vue_vue_type_script_setup_true_lang-Wuvo-l_z.js} +1 -1
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-BufoFwVQ.js → DateField.vue_vue_type_script_setup_true_lang-8mvjzRA-.js} +3 -3
- package/dist/{DeadLetters-DmwUtgf9.js → DeadLetters-Bq5YpnvT.js} +3 -3
- package/dist/{General-CUEjJBD4.js → General-DQruOZs2.js} +5 -5
- package/dist/{NewRolePage-Cyn-oV6r.js → NewRolePage-BcA8jBBQ.js} +3 -3
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-a8kN3A7k.js → NumberField.vue_vue_type_script_setup_true_lang-CC8bKyR_.js} +1 -1
- package/dist/{Popover.vue_vue_type_script_setup_true_lang-Dx-tDhNE.js → Popover.vue_vue_type_script_setup_true_lang-BTOzgIQF.js} +12 -12
- package/dist/{ProfilePage-I74SQBFO.js → ProfilePage-BqdCzyax.js} +7 -7
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-D87Hs75d.js → RecordHeader.vue_vue_type_script_setup_true_lang-DijFQnU6.js} +1 -1
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-Da0M-hen.js → ResourcePage.vue_vue_type_script_setup_true_lang-BpLnmA6n.js} +1 -1
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-Ce6wjptT.js → RoleEditor.vue_vue_type_script_setup_true_lang-DPpCuJWk.js} +2 -2
- package/dist/{RolePage-DWQP3qQl.js → RolePage-IES_ADt5.js} +6 -6
- package/dist/{RolesPage-BeEsHIQ2.js → RolesPage-D0K7tEL-.js} +3 -3
- package/dist/{SectionList.vue_vue_type_script_setup_true_lang-B0p_8xQG.js → SectionList.vue_vue_type_script_setup_true_lang-D5QWy-c1.js} +1 -1
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-D5Cnb4_O.js → SectionNavigator.vue_vue_type_script_setup_true_lang-CW81A_bn.js} +2 -2
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-DkbBJpYX.js +489 -0
- package/dist/{SessionList.vue_vue_type_script_setup_true_lang-DoUo68xE.js → SessionList.vue_vue_type_script_setup_true_lang-C0XvavBw.js} +1 -1
- package/dist/{Sessions-D8IXcb5M.js → Sessions-BfpiOhGs.js} +2 -2
- package/dist/{SettingsPage-DRQP2nrH.js → SettingsPage-BnEpURcU.js} +5 -5
- package/dist/{SignIn-CAZkovhb.js → SignIn-DrLE0gNr.js} +2 -2
- package/dist/{SignInPage-D-49oLY3.js → SignInPage-CRynZCU2.js} +2 -2
- package/dist/{SignInTable.vue_vue_type_script_setup_true_lang-CIv34nRn.js → SignInTable.vue_vue_type_script_setup_true_lang-7Z9EmLs-.js} +1 -1
- package/dist/{SignIns-BtNfgMLc.js → SignIns-BQ8tISWn.js} +2 -2
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-D3-R5XXG.js → TextField.vue_vue_type_script_setup_true_lang-CWgn-vGl.js} +97 -90
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-pAdLPYXA.js → TimeField.vue_vue_type_script_setup_true_lang-BebAIPeL.js} +3 -3
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-FVRUr-9y.js → Timestamp.vue_vue_type_script_setup_true_lang-CU2Y5oYl.js} +1 -1
- package/dist/{UserRecord-BSbNuRFi.js → UserRecord-CqmPm4Fv.js} +7 -7
- package/dist/{UsersList-DPHxcaDm.js → UsersList-CHAray61.js} +8 -8
- package/dist/access/index.js +1 -1
- package/dist/app/index.js +1 -1
- package/dist/collection/index.js +3 -3
- package/dist/content/index.js +1 -1
- package/dist/{fieldMessages-DV6sESpn.js → fieldMessages-6HVzSDqG.js} +1 -1
- package/dist/form/ComboField.vue.d.ts +11 -8
- package/dist/form/CommandDialog.vue.d.ts +3 -0
- package/dist/form/MultiSelectField.vue.d.ts +8 -5
- package/dist/form/OptionList.vue.d.ts +7 -4
- package/dist/form/SelectField.vue.d.ts +11 -8
- package/dist/form/SuggestionList.vue.d.ts +11 -6
- package/dist/form/index.d.ts +2 -0
- package/dist/form/index.js +981 -928
- package/dist/form/options.d.ts +18 -5
- package/dist/form/suggestions.d.ts +12 -12
- package/dist/form/useOptions.d.ts +12 -12
- package/dist/form/useRecordDialog.d.ts +47 -0
- package/dist/format/index.js +1 -1
- package/dist/format-D8X4zsx6.js +78 -0
- package/dist/identity/index.js +1 -1
- package/dist/{index-CWeNiBX6.js → index-91Lo0hJy.js} +4 -4
- package/dist/{index-Bq96L43f.js → index-sYamgVg7.js} +12 -12
- package/dist/{index-yKIOaisE.js → index-wlRejl73.js} +5 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/intlLocale.d.ts +2 -0
- package/dist/intlLocale-CeRU44qJ.js +4 -0
- package/dist/notifications/index.js +1 -1
- package/dist/overlay/index.js +1 -1
- package/dist/page/index.js +5 -5
- package/dist/phone/index.js +112 -111
- package/dist/resource/index.js +1 -1
- package/dist/{rowLayout-D1cYQghV.js → rowLayout-BFz4Kdoy.js} +2 -2
- package/dist/shell/index.js +1 -1
- package/dist/{status-DzmySsWw.js → status-B_IMA25a.js} +1 -1
- package/dist/{suggestions-BxMm6MQA.js → suggestions-DHJFKB26.js} +50 -50
- package/dist/testing/index.js +1 -1
- package/dist/{useCommand-B-N6HJOz.js → useCommand-YN9EMb7s.js} +41 -38
- package/dist/{useTypedEntry-aTfPBAhw.js → useTypedEntry-C7k7Dyl-.js} +237 -236
- package/package.json +1 -1
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-C1Flb1hA.js +0 -465
- package/dist/format-B8mJm946.js +0 -77
package/package.json
CHANGED
|
@@ -1,465 +0,0 @@
|
|
|
1
|
-
import { defineComponent as G, ref as N, useId as J, useTemplateRef as K, computed as g, watch as B, nextTick as Q, openBlock as a, createElementBlock as f, normalizeClass as b, createElementVNode as r, createVNode as q, unref as o, withDirectives as X, vModelText as Y, createCommentVNode as v, toDisplayString as $, createBlock as V, Fragment as R, renderList as H, onScopeDispose as Z, mergeProps as I, createSlots as M, withCtx as S, createTextVNode as ee, renderSlot as U, mergeDefaults as te } from "vue";
|
|
2
|
-
import { useI18n as W } from "vue-i18n";
|
|
3
|
-
import { _ as oe } from "./Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
4
|
-
import { _ as z } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
5
|
-
import { u as le } from "./mediaQuery-CygcXmFW.js";
|
|
6
|
-
import { _ as P } from "./ToneDot.vue_vue_type_script_setup_true_lang-99rNn-L5.js";
|
|
7
|
-
import { _ as ae } from "./Sheet.vue_vue_type_script_setup_true_lang-DgOFV4fa.js";
|
|
8
|
-
import { _ as ne } from "./Popover.vue_vue_type_script_setup_true_lang-Dx-tDhNE.js";
|
|
9
|
-
import { a as se, c as re, _ as ie, f as ue, b as de } from "./control-B_Nwtmag.js";
|
|
10
|
-
import { g as ce, m as pe } from "./options-Ba_0uLWN.js";
|
|
11
|
-
import { a as me } from "./suggestions-BxMm6MQA.js";
|
|
12
|
-
const fe = { class: "flex min-h-9 items-center gap-1.5 rounded-control bg-fill px-2.5 text-content-muted focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-border-focus" }, ve = ["aria-label", "placeholder"], be = ["aria-multiselectable", "aria-busy"], ge = {
|
|
13
|
-
key: 0,
|
|
14
|
-
role: "presentation"
|
|
15
|
-
}, he = ["aria-selected"], ye = { class: "flex-1 py-2" }, xe = {
|
|
16
|
-
key: 1,
|
|
17
|
-
role: "presentation",
|
|
18
|
-
class: "flex items-center gap-2.5 px-row-inset py-4 text-subheadline text-content-muted",
|
|
19
|
-
"data-test": "options-loading"
|
|
20
|
-
}, ke = { role: "status" }, _e = {
|
|
21
|
-
key: 2,
|
|
22
|
-
role: "presentation",
|
|
23
|
-
class: "flex flex-col items-start gap-1 px-row-inset py-3",
|
|
24
|
-
"data-test": "options-failed"
|
|
25
|
-
}, we = {
|
|
26
|
-
role: "alert",
|
|
27
|
-
class: "text-subheadline text-content-destructive"
|
|
28
|
-
}, $e = ["id"], Ce = ["aria-labelledby"], Se = ["aria-selected"], Ve = ["disabled", "onClick"], Le = {
|
|
29
|
-
key: 0,
|
|
30
|
-
"aria-hidden": "true",
|
|
31
|
-
class: "flex shrink-0 items-center"
|
|
32
|
-
}, De = { class: "min-w-0 flex-1 text-content-strong" }, qe = {
|
|
33
|
-
key: 1,
|
|
34
|
-
class: "shrink-0 text-footnote text-content-muted"
|
|
35
|
-
}, ze = {
|
|
36
|
-
key: 3,
|
|
37
|
-
class: "px-4 py-6 text-center text-subheadline text-content-muted"
|
|
38
|
-
}, j = /* @__PURE__ */ G({
|
|
39
|
-
__name: "OptionList",
|
|
40
|
-
props: {
|
|
41
|
-
options: {},
|
|
42
|
-
modelValue: { default: null },
|
|
43
|
-
multiple: { type: Boolean, default: !1 },
|
|
44
|
-
searchFrom: { default: 9 },
|
|
45
|
-
noneLabel: { default: void 0 },
|
|
46
|
-
presentation: { default: "grouped" },
|
|
47
|
-
status: { default: "loaded" }
|
|
48
|
-
},
|
|
49
|
-
emits: ["select", "retry"],
|
|
50
|
-
setup(i, { emit: h }) {
|
|
51
|
-
const e = i, y = h, { t: m } = W(), n = N(""), c = J(), x = K("root"), s = g(() => e.options.length >= e.searchFrom), C = g(() => ce(pe(e.options, n.value))), L = (p) => e.multiple ? Array.isArray(e.modelValue) && e.modelValue.includes(p.value) : e.modelValue === p.value, u = g(() => e.multiple ? !1 : e.modelValue === null);
|
|
52
|
-
function w(p) {
|
|
53
|
-
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(p.key)) return;
|
|
54
|
-
const t = [...x.value?.querySelectorAll("[data-option]:not([disabled])") ?? []];
|
|
55
|
-
if (t.length === 0) return;
|
|
56
|
-
const _ = t.indexOf(document.activeElement), d = p.key === "Home" ? 0 : p.key === "End" ? t.length - 1 : p.key === "ArrowDown" ? Math.min(_ + 1, t.length - 1) : Math.max(_ - 1, 0);
|
|
57
|
-
p.key === "ArrowUp" && _ <= 0 ? x.value?.querySelector("[data-option-search]")?.focus() : t[_ === -1 && p.key === "ArrowDown" ? 0 : d]?.focus(), p.preventDefault();
|
|
58
|
-
}
|
|
59
|
-
const k = g(() => e.presentation === "grouped"), O = g(() => e.status === "loading"), T = g(() => e.status === "failed");
|
|
60
|
-
return B(() => e.status, (p, l) => {
|
|
61
|
-
l !== "loading" || p === "loading" || Q(() => {
|
|
62
|
-
const t = document.activeElement;
|
|
63
|
-
(!t || t === document.body || t.getAttribute("role") === "dialog" && !!x.value && t.contains(x.value)) && x.value?.querySelector("[data-option-search], [data-option]:not([disabled])")?.focus({ preventScroll: !0 });
|
|
64
|
-
});
|
|
65
|
-
}), (p, l) => (a(), f("div", {
|
|
66
|
-
ref_key: "root",
|
|
67
|
-
ref: x,
|
|
68
|
-
"data-test": "option-list",
|
|
69
|
-
onKeydown: w
|
|
70
|
-
}, [
|
|
71
|
-
s.value ? (a(), f("div", {
|
|
72
|
-
key: 0,
|
|
73
|
-
class: b(["sticky top-0 z-10 pb-2", k.value ? "bg-surface-page pt-1" : "bg-surface-cell"])
|
|
74
|
-
}, [
|
|
75
|
-
r("label", fe, [
|
|
76
|
-
q(o(z), {
|
|
77
|
-
name: "search",
|
|
78
|
-
size: 16,
|
|
79
|
-
class: "shrink-0"
|
|
80
|
-
}),
|
|
81
|
-
X(r("input", {
|
|
82
|
-
"onUpdate:modelValue": l[0] || (l[0] = (t) => n.value = t),
|
|
83
|
-
"data-option-search": "",
|
|
84
|
-
type: "search",
|
|
85
|
-
enterkeyhint: "search",
|
|
86
|
-
autocomplete: "off",
|
|
87
|
-
autocapitalize: "off",
|
|
88
|
-
spellcheck: "false",
|
|
89
|
-
"aria-label": o(m)("core.form.select.search"),
|
|
90
|
-
placeholder: o(m)("core.form.select.search"),
|
|
91
|
-
class: "min-w-0 flex-1 border-0 bg-transparent p-0 text-body text-content-strong outline-none placeholder:text-content-disabled focus:ring-0"
|
|
92
|
-
}, null, 8, ve), [
|
|
93
|
-
[Y, n.value]
|
|
94
|
-
])
|
|
95
|
-
])
|
|
96
|
-
], 2)) : v("", !0),
|
|
97
|
-
r("ul", {
|
|
98
|
-
class: b(["flex flex-col", k.value ? "gap-group-gap" : "gap-2"]),
|
|
99
|
-
role: "listbox",
|
|
100
|
-
"aria-multiselectable": e.multiple || void 0,
|
|
101
|
-
"aria-busy": O.value || void 0
|
|
102
|
-
}, [
|
|
103
|
-
e.noneLabel && n.value === "" ? (a(), f("li", ge, [
|
|
104
|
-
r("ul", {
|
|
105
|
-
role: "group",
|
|
106
|
-
class: b(k.value ? "rounded-group bg-surface-cell shadow-group" : "")
|
|
107
|
-
}, [
|
|
108
|
-
r("li", {
|
|
109
|
-
role: "option",
|
|
110
|
-
"aria-selected": u.value
|
|
111
|
-
}, [
|
|
112
|
-
r("button", {
|
|
113
|
-
type: "button",
|
|
114
|
-
"data-option": "",
|
|
115
|
-
class: b(["flex min-h-row w-full cursor-pointer items-center gap-3 px-row-inset text-left text-body hover:bg-fill focus-visible:bg-fill focus-visible:outline-none active:bg-fill", [u.value ? "text-content-strong" : "text-content-muted", k.value ? "rounded-group" : "rounded-control"]]),
|
|
116
|
-
onClick: l[1] || (l[1] = (t) => y("select", null))
|
|
117
|
-
}, [
|
|
118
|
-
r("span", ye, $(e.noneLabel), 1),
|
|
119
|
-
u.value ? (a(), V(o(z), {
|
|
120
|
-
key: 0,
|
|
121
|
-
name: "checkCustom",
|
|
122
|
-
size: 18,
|
|
123
|
-
class: "shrink-0 text-content-link"
|
|
124
|
-
})) : v("", !0)
|
|
125
|
-
], 2)
|
|
126
|
-
], 8, he)
|
|
127
|
-
], 2)
|
|
128
|
-
])) : v("", !0),
|
|
129
|
-
O.value ? (a(), f("li", xe, [
|
|
130
|
-
q(o(z), {
|
|
131
|
-
name: "loader4Line",
|
|
132
|
-
size: 16,
|
|
133
|
-
class: "shrink-0 animate-spin text-content-link"
|
|
134
|
-
}),
|
|
135
|
-
r("span", ke, $(o(m)("core.form.select.loading")), 1)
|
|
136
|
-
])) : T.value ? (a(), f("li", _e, [
|
|
137
|
-
r("span", we, $(o(m)("core.form.select.load_failed")), 1),
|
|
138
|
-
r("button", {
|
|
139
|
-
type: "button",
|
|
140
|
-
"data-option": "",
|
|
141
|
-
"data-test": "options-retry",
|
|
142
|
-
class: "-ml-2 cursor-pointer rounded-control px-2 py-1 text-subheadline font-medium text-content-link hover:bg-fill focus-visible:bg-fill focus-visible:outline-none",
|
|
143
|
-
onClick: l[2] || (l[2] = (t) => y("retry"))
|
|
144
|
-
}, $(o(m)("core.actions.retry")), 1)
|
|
145
|
-
])) : v("", !0),
|
|
146
|
-
(a(!0), f(R, null, H(C.value, (t, _) => (a(), f("li", {
|
|
147
|
-
key: t.title ?? _,
|
|
148
|
-
role: "presentation"
|
|
149
|
-
}, [
|
|
150
|
-
t.title ? (a(), f("p", {
|
|
151
|
-
key: 0,
|
|
152
|
-
id: `${o(c)}-${_}`,
|
|
153
|
-
class: "px-row-inset pb-1.5 text-footnote uppercase tracking-wide text-content-muted"
|
|
154
|
-
}, $(t.title), 9, $e)) : v("", !0),
|
|
155
|
-
r("ul", {
|
|
156
|
-
role: "group",
|
|
157
|
-
"aria-labelledby": t.title ? `${o(c)}-${_}` : void 0,
|
|
158
|
-
class: b(k.value ? "rounded-group bg-surface-cell shadow-group" : "")
|
|
159
|
-
}, [
|
|
160
|
-
(a(!0), f(R, null, H(t.options, (d) => (a(), f("li", {
|
|
161
|
-
key: String(d.value),
|
|
162
|
-
role: "option",
|
|
163
|
-
"aria-selected": L(d),
|
|
164
|
-
class: "group/option"
|
|
165
|
-
}, [
|
|
166
|
-
r("button", {
|
|
167
|
-
type: "button",
|
|
168
|
-
"data-option": "",
|
|
169
|
-
"data-test": "option",
|
|
170
|
-
disabled: d.disabled,
|
|
171
|
-
class: b(["flex w-full cursor-pointer items-stretch gap-3 pl-row-inset text-left text-body hover:bg-fill focus-visible:bg-fill focus-visible:outline-none active:bg-fill disabled:cursor-not-allowed disabled:opacity-45", k.value ? "group-first/option:rounded-t-group group-last/option:rounded-b-group" : "rounded-control"]),
|
|
172
|
-
onClick: (E) => y("select", d.value)
|
|
173
|
-
}, [
|
|
174
|
-
e.multiple ? (a(), f("span", Le, [
|
|
175
|
-
r("span", {
|
|
176
|
-
class: b(["flex size-5.5 items-center justify-center rounded-full border", L(d) ? "border-control-on bg-control-on text-white" : "border-border-control"])
|
|
177
|
-
}, [
|
|
178
|
-
L(d) ? (a(), V(o(z), {
|
|
179
|
-
key: 0,
|
|
180
|
-
name: "checkCustom",
|
|
181
|
-
size: 12
|
|
182
|
-
})) : v("", !0)
|
|
183
|
-
], 2)
|
|
184
|
-
])) : v("", !0),
|
|
185
|
-
r("span", {
|
|
186
|
-
class: b(["flex min-h-row min-w-0 flex-1 items-center gap-3 py-2 pr-row-inset", k.value ? "border-t border-border-separator group-first/option:border-t-0" : ""])
|
|
187
|
-
}, [
|
|
188
|
-
d.dot ? (a(), V(P, {
|
|
189
|
-
key: 0,
|
|
190
|
-
tone: d.dot,
|
|
191
|
-
class: "-mr-1.5"
|
|
192
|
-
}, null, 8, ["tone"])) : v("", !0),
|
|
193
|
-
r("span", De, $(d.label), 1),
|
|
194
|
-
d.description ? (a(), f("span", qe, $(d.description), 1)) : v("", !0),
|
|
195
|
-
!e.multiple && L(d) ? (a(), V(o(z), {
|
|
196
|
-
key: 2,
|
|
197
|
-
name: "checkCustom",
|
|
198
|
-
size: 18,
|
|
199
|
-
class: "shrink-0 text-content-link"
|
|
200
|
-
})) : v("", !0)
|
|
201
|
-
], 2)
|
|
202
|
-
], 10, Ve)
|
|
203
|
-
], 8, Se))), 128))
|
|
204
|
-
], 10, Ce)
|
|
205
|
-
]))), 128)),
|
|
206
|
-
C.value.length === 0 && !O.value && !T.value ? (a(), f("li", ze, $(o(m)("core.form.select.no_matches")), 1)) : v("", !0)
|
|
207
|
-
], 10, be)
|
|
208
|
-
], 544));
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
function We(i) {
|
|
212
|
-
const h = me(), e = i.for !== void 0;
|
|
213
|
-
let y = 0;
|
|
214
|
-
function m() {
|
|
215
|
-
const n = i.for?.();
|
|
216
|
-
if (e && n == null) {
|
|
217
|
-
h.cancel(), h.items.value = [], h.status.value = "idle";
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
h.run(
|
|
221
|
-
(c) => e ? i.load(n, { signal: c }) : i.load({ signal: c })
|
|
222
|
-
);
|
|
223
|
-
}
|
|
224
|
-
return B(
|
|
225
|
-
() => i.for?.(),
|
|
226
|
-
(n, c) => {
|
|
227
|
-
c != null && y++, m();
|
|
228
|
-
},
|
|
229
|
-
{ immediate: !0 }
|
|
230
|
-
), Z(h.cancel), {
|
|
231
|
-
get status() {
|
|
232
|
-
return h.status.value;
|
|
233
|
-
},
|
|
234
|
-
get options() {
|
|
235
|
-
return h.items.value;
|
|
236
|
-
},
|
|
237
|
-
get generation() {
|
|
238
|
-
return y;
|
|
239
|
-
},
|
|
240
|
-
reload: m
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
const A = (i) => Array.isArray(i), Ae = [];
|
|
244
|
-
function Oe(i, h) {
|
|
245
|
-
const e = g(() => {
|
|
246
|
-
const s = i();
|
|
247
|
-
return A(s) ? s : s.options;
|
|
248
|
-
}), y = g(() => {
|
|
249
|
-
const s = i();
|
|
250
|
-
return A(s) ? "loaded" : s.status;
|
|
251
|
-
}), m = g(() => y.value === "loading" || y.value === "failed" ? Ae : e.value), n = g(() => y.value === "loading"), c = i();
|
|
252
|
-
let x = A(c) ? 0 : c.generation;
|
|
253
|
-
return B(
|
|
254
|
-
() => {
|
|
255
|
-
const s = i();
|
|
256
|
-
return A(s) ? null : s.status === "loaded" || s.status === "idle" ? s.options : null;
|
|
257
|
-
},
|
|
258
|
-
(s) => {
|
|
259
|
-
const C = i();
|
|
260
|
-
s === null || A(C) || C.generation === x || (x = C.generation, h(s));
|
|
261
|
-
}
|
|
262
|
-
), { known: e, rows: m, status: y, loading: n, reload: () => {
|
|
263
|
-
const s = i();
|
|
264
|
-
A(s) || s.reload();
|
|
265
|
-
} };
|
|
266
|
-
}
|
|
267
|
-
const Te = ["id", "disabled", "aria-expanded", "aria-required", "aria-invalid", "aria-describedby", "aria-busy"], Fe = ["id", "disabled", "aria-required", "aria-invalid", "aria-describedby", "aria-busy", "onClick"], Be = { class: "max-h-72 overflow-y-auto" }, Je = /* @__PURE__ */ G({
|
|
268
|
-
__name: "SelectField",
|
|
269
|
-
props: /* @__PURE__ */ te({
|
|
270
|
-
label: {},
|
|
271
|
-
labelHidden: { type: Boolean },
|
|
272
|
-
hint: {},
|
|
273
|
-
error: {},
|
|
274
|
-
required: { type: Boolean },
|
|
275
|
-
editable: { type: Boolean },
|
|
276
|
-
disabled: { type: Boolean },
|
|
277
|
-
lockedReason: {},
|
|
278
|
-
presentation: {},
|
|
279
|
-
name: {},
|
|
280
|
-
options: {},
|
|
281
|
-
selected: {},
|
|
282
|
-
placeholder: {},
|
|
283
|
-
clearable: {},
|
|
284
|
-
modelValue: {},
|
|
285
|
-
searchFrom: {}
|
|
286
|
-
}, { ...de, selected: null, placeholder: void 0, clearable: void 0, modelValue: void 0, searchFrom: 9 }),
|
|
287
|
-
emits: ["update:modelValue"],
|
|
288
|
-
setup(i, { emit: h }) {
|
|
289
|
-
const e = i, y = h, m = N(e.modelValue ?? null);
|
|
290
|
-
B(() => e.modelValue, (l) => m.value = l ?? null);
|
|
291
|
-
const n = g({
|
|
292
|
-
get: () => m.value,
|
|
293
|
-
set: (l) => {
|
|
294
|
-
m.value = l, y("update:modelValue", l);
|
|
295
|
-
}
|
|
296
|
-
}), { t: c } = W(), x = le(), s = !!se(), C = K("sheet"), L = N(!1), u = Oe(() => e.options, (l) => {
|
|
297
|
-
n.value !== null && !l.some((t) => t.value === n.value) && (n.value = null);
|
|
298
|
-
}), w = g(() => u.known.value.find((l) => l.value === n.value) ?? (e.selected?.value === n.value ? e.selected : null)), k = g(() => e.placeholder ?? c("core.form.select.choose")), O = re("popup", () => e.error ? "error" : e.disabled ? "locked" : "rest");
|
|
299
|
-
function T(l) {
|
|
300
|
-
n.value = l, C.value?.dismiss();
|
|
301
|
-
}
|
|
302
|
-
const p = g(() => [
|
|
303
|
-
"flex max-w-full min-w-0 items-center gap-1.5 py-1 pl-2.5 pr-2 text-body focus-visible:outline-none",
|
|
304
|
-
s ? "compact:pl-0 compact:pr-0" : "",
|
|
305
|
-
e.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
306
|
-
]);
|
|
307
|
-
return (l, t) => (a(), V(ie, I(o(ue)(e), {
|
|
308
|
-
value: w.value?.label ?? null
|
|
309
|
-
}), M({
|
|
310
|
-
default: S(({ id: _, describedby: d, invalid: E }) => [
|
|
311
|
-
r("div", {
|
|
312
|
-
class: b(["inline-flex max-w-full min-w-0", o(O)])
|
|
313
|
-
}, [
|
|
314
|
-
o(x) ? (a(), f("button", {
|
|
315
|
-
key: 0,
|
|
316
|
-
id: _,
|
|
317
|
-
type: "button",
|
|
318
|
-
disabled: e.disabled,
|
|
319
|
-
"aria-haspopup": "dialog",
|
|
320
|
-
"aria-expanded": L.value,
|
|
321
|
-
"aria-required": e.required || void 0,
|
|
322
|
-
"aria-invalid": E || void 0,
|
|
323
|
-
"aria-describedby": d,
|
|
324
|
-
"aria-busy": o(u).loading.value || void 0,
|
|
325
|
-
class: b(p.value),
|
|
326
|
-
onClick: t[0] || (t[0] = (D) => C.value?.present())
|
|
327
|
-
}, [
|
|
328
|
-
w.value?.dot ? (a(), V(P, {
|
|
329
|
-
key: 0,
|
|
330
|
-
tone: w.value.dot
|
|
331
|
-
}, null, 8, ["tone"])) : v("", !0),
|
|
332
|
-
r("span", {
|
|
333
|
-
class: b(["min-w-0 truncate", w.value ? s ? "text-content-strong compact:text-content-muted" : "text-content-strong" : "text-content-disabled"])
|
|
334
|
-
}, $(w.value?.label ?? k.value), 3),
|
|
335
|
-
q(o(z), {
|
|
336
|
-
name: o(u).loading.value ? "loader4Line" : "expandUpDownLine",
|
|
337
|
-
size: 14,
|
|
338
|
-
class: b(["shrink-0 text-content-muted", o(u).loading.value ? "animate-spin" : ""])
|
|
339
|
-
}, null, 8, ["name", "class"])
|
|
340
|
-
], 10, Te)) : (a(), V(ne, {
|
|
341
|
-
key: 1,
|
|
342
|
-
label: e.label ?? k.value,
|
|
343
|
-
width: "md",
|
|
344
|
-
"match-trigger-width": "",
|
|
345
|
-
placement: "bottom-start",
|
|
346
|
-
arrow: !1
|
|
347
|
-
}, {
|
|
348
|
-
trigger: S(({ toggle: D, attrs: F }) => [
|
|
349
|
-
r("button", I({
|
|
350
|
-
id: _,
|
|
351
|
-
type: "button"
|
|
352
|
-
}, F, {
|
|
353
|
-
"aria-haspopup": "listbox",
|
|
354
|
-
disabled: e.disabled,
|
|
355
|
-
"aria-required": e.required || void 0,
|
|
356
|
-
"aria-invalid": E || void 0,
|
|
357
|
-
"aria-describedby": d,
|
|
358
|
-
"aria-busy": o(u).loading.value || void 0,
|
|
359
|
-
class: p.value,
|
|
360
|
-
onClick: D
|
|
361
|
-
}), [
|
|
362
|
-
w.value?.dot ? (a(), V(P, {
|
|
363
|
-
key: 0,
|
|
364
|
-
tone: w.value.dot
|
|
365
|
-
}, null, 8, ["tone"])) : v("", !0),
|
|
366
|
-
r("span", {
|
|
367
|
-
class: b(["min-w-0 truncate", w.value ? "text-content-strong" : "text-content-disabled"])
|
|
368
|
-
}, $(w.value?.label ?? k.value), 3),
|
|
369
|
-
q(o(z), {
|
|
370
|
-
name: o(u).loading.value ? "loader4Line" : "expandUpDownLine",
|
|
371
|
-
size: 14,
|
|
372
|
-
class: b(["shrink-0 text-content-muted", o(u).loading.value ? "animate-spin" : ""])
|
|
373
|
-
}, null, 8, ["name", "class"])
|
|
374
|
-
], 16, Fe)
|
|
375
|
-
]),
|
|
376
|
-
default: S(({ dismiss: D }) => [
|
|
377
|
-
r("div", Be, [
|
|
378
|
-
q(j, {
|
|
379
|
-
options: o(u).rows.value,
|
|
380
|
-
status: o(u).status.value,
|
|
381
|
-
"model-value": n.value,
|
|
382
|
-
"search-from": e.searchFrom,
|
|
383
|
-
"none-label": e.clearable ? o(c)("core.form.select.clear") : void 0,
|
|
384
|
-
presentation: "plain",
|
|
385
|
-
onSelect: (F) => {
|
|
386
|
-
n.value = F, D();
|
|
387
|
-
},
|
|
388
|
-
onRetry: t[1] || (t[1] = (F) => o(u).reload())
|
|
389
|
-
}, null, 8, ["options", "status", "model-value", "search-from", "none-label", "onSelect"])
|
|
390
|
-
])
|
|
391
|
-
]),
|
|
392
|
-
_: 2
|
|
393
|
-
}, 1032, ["label"]))
|
|
394
|
-
], 2),
|
|
395
|
-
o(x) ? (a(), V(ae, {
|
|
396
|
-
key: 0,
|
|
397
|
-
ref_key: "sheet",
|
|
398
|
-
ref: C,
|
|
399
|
-
title: e.label ?? k.value,
|
|
400
|
-
grouped: "",
|
|
401
|
-
onPresented: t[4] || (t[4] = (D) => L.value = !0),
|
|
402
|
-
onDismissed: t[5] || (t[5] = (D) => L.value = !1)
|
|
403
|
-
}, M({
|
|
404
|
-
default: S(() => [
|
|
405
|
-
q(j, {
|
|
406
|
-
options: o(u).rows.value,
|
|
407
|
-
status: o(u).status.value,
|
|
408
|
-
"model-value": n.value,
|
|
409
|
-
"search-from": e.searchFrom,
|
|
410
|
-
"none-label": e.clearable ? o(c)("core.form.select.clear") : void 0,
|
|
411
|
-
onSelect: T,
|
|
412
|
-
onRetry: t[2] || (t[2] = (D) => o(u).reload())
|
|
413
|
-
}, null, 8, ["options", "status", "model-value", "search-from", "none-label"])
|
|
414
|
-
]),
|
|
415
|
-
_: 2
|
|
416
|
-
}, [
|
|
417
|
-
e.clearable && n.value !== null ? {
|
|
418
|
-
name: "footer",
|
|
419
|
-
fn: S(() => [
|
|
420
|
-
q(oe, {
|
|
421
|
-
prominence: "plain",
|
|
422
|
-
onClick: t[3] || (t[3] = (D) => T(null))
|
|
423
|
-
}, {
|
|
424
|
-
default: S(() => [
|
|
425
|
-
ee($(o(c)("core.form.select.clear")), 1)
|
|
426
|
-
]),
|
|
427
|
-
_: 1
|
|
428
|
-
})
|
|
429
|
-
]),
|
|
430
|
-
key: "0"
|
|
431
|
-
} : void 0
|
|
432
|
-
]), 1032, ["title"])) : v("", !0)
|
|
433
|
-
]),
|
|
434
|
-
_: 2
|
|
435
|
-
}, [
|
|
436
|
-
l.$slots.trailing ? {
|
|
437
|
-
name: "trailing",
|
|
438
|
-
fn: S(() => [
|
|
439
|
-
U(l.$slots, "trailing")
|
|
440
|
-
]),
|
|
441
|
-
key: "0"
|
|
442
|
-
} : void 0,
|
|
443
|
-
l.$slots.labelTrailing ? {
|
|
444
|
-
name: "labelTrailing",
|
|
445
|
-
fn: S(() => [
|
|
446
|
-
U(l.$slots, "labelTrailing")
|
|
447
|
-
]),
|
|
448
|
-
key: "1"
|
|
449
|
-
} : void 0,
|
|
450
|
-
l.$slots.readonly ? {
|
|
451
|
-
name: "readonly",
|
|
452
|
-
fn: S(() => [
|
|
453
|
-
U(l.$slots, "readonly")
|
|
454
|
-
]),
|
|
455
|
-
key: "2"
|
|
456
|
-
} : void 0
|
|
457
|
-
]), 1040, ["value"]));
|
|
458
|
-
}
|
|
459
|
-
});
|
|
460
|
-
export {
|
|
461
|
-
Je as _,
|
|
462
|
-
j as a,
|
|
463
|
-
We as b,
|
|
464
|
-
Oe as u
|
|
465
|
-
};
|
package/dist/format-B8mJm946.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { d as g } from "./context-Ch1r4fdN.js";
|
|
2
|
-
const T = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
3
|
-
function m(n) {
|
|
4
|
-
if (n == null || n === "") return null;
|
|
5
|
-
let r;
|
|
6
|
-
if (n instanceof Date) r = n;
|
|
7
|
-
else if (typeof n == "number") r = new Date(n);
|
|
8
|
-
else {
|
|
9
|
-
const i = T.exec(n);
|
|
10
|
-
r = i ? new Date(Number(i[1]), Number(i[2]) - 1, Number(i[3])) : new Date(n);
|
|
11
|
-
}
|
|
12
|
-
return Number.isNaN(r.getTime()) || r.getTime() <= 0 ? null : r;
|
|
13
|
-
}
|
|
14
|
-
const s = { year: "numeric", month: "2-digit", day: "2-digit" }, u = { hour: "2-digit", minute: "2-digit" }, o = [
|
|
15
|
-
["year", 31536e3],
|
|
16
|
-
["month", 2592e3],
|
|
17
|
-
["week", 604800],
|
|
18
|
-
["day", 86400],
|
|
19
|
-
["hour", 3600],
|
|
20
|
-
["minute", 60],
|
|
21
|
-
["second", 1]
|
|
22
|
-
];
|
|
23
|
-
function b() {
|
|
24
|
-
const n = /* @__PURE__ */ new Map(), r = (e, t) => {
|
|
25
|
-
let a = n.get(e);
|
|
26
|
-
return a || (a = t(), n.set(e, a)), a;
|
|
27
|
-
}, i = (e, t) => r(`d|${e}|${JSON.stringify(t)}`, () => new Intl.DateTimeFormat(e, t));
|
|
28
|
-
return {
|
|
29
|
-
date: (e, t) => i(t, s).format(e),
|
|
30
|
-
dateTime: (e, t) => i(t, { ...s, ...u }).format(e),
|
|
31
|
-
time: (e, t) => i(t, u).format(e),
|
|
32
|
-
number: (e, t, a) => r(`n|${t}|${JSON.stringify(a ?? {})}`, () => new Intl.NumberFormat(t, a)).format(e),
|
|
33
|
-
money: (e, t, a) => r(`m|${a}|${t}`, () => new Intl.NumberFormat(a, { style: "currency", currency: t })).format(e),
|
|
34
|
-
relative(e, t, a) {
|
|
35
|
-
const c = Math.trunc((e.getTime() - a.getTime()) / 1e3), [d, f] = o.find(([, l]) => Math.abs(c) >= l) ?? o[o.length - 1];
|
|
36
|
-
return r(`r|${t}`, () => new Intl.RelativeTimeFormat(t, { numeric: "auto" })).format(Math.trunc(c / f), d);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
function F(n) {
|
|
41
|
-
const r = { ...b(), ...n.formatters }, i = (e) => typeof e == "number" && Number.isFinite(e);
|
|
42
|
-
return {
|
|
43
|
-
get locale() {
|
|
44
|
-
return n.locale();
|
|
45
|
-
},
|
|
46
|
-
date: (e) => {
|
|
47
|
-
const t = m(e);
|
|
48
|
-
return t ? r.date(t, n.locale()) : "";
|
|
49
|
-
},
|
|
50
|
-
dateTime: (e) => {
|
|
51
|
-
const t = m(e);
|
|
52
|
-
return t ? r.dateTime(t, n.locale()) : "";
|
|
53
|
-
},
|
|
54
|
-
time: (e) => {
|
|
55
|
-
const t = m(e);
|
|
56
|
-
return t ? r.time(t, n.locale()) : "";
|
|
57
|
-
},
|
|
58
|
-
number: (e, t) => i(e) ? r.number(e, n.locale(), t) : "",
|
|
59
|
-
money: (e, t) => i(e) ? r.money(e, t, n.locale()) : "",
|
|
60
|
-
relative: (e, t = /* @__PURE__ */ new Date()) => {
|
|
61
|
-
const a = m(e);
|
|
62
|
-
return a ? r.relative(a, n.locale(), t) : "";
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
const [y, h] = g("vue-core.formatting");
|
|
67
|
-
function w(n, r) {
|
|
68
|
-
n.provide(y, r);
|
|
69
|
-
}
|
|
70
|
-
export {
|
|
71
|
-
b as a,
|
|
72
|
-
F as c,
|
|
73
|
-
y as f,
|
|
74
|
-
w as i,
|
|
75
|
-
m as t,
|
|
76
|
-
h as u
|
|
77
|
-
};
|