@wisemen/vue-core-components 2.2.3 → 3.0.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/dist/components/date-field/dateField.props.d.ts +5 -0
- package/dist/components/date-field/parts/DateFieldRoot.d.ts +1 -0
- package/dist/components/date-range-field/dateRangeField.props.d.ts +5 -0
- package/dist/components/date-range-field/parts/DateRangeFieldRoot.d.ts +1 -0
- package/dist/components/file-upload/fileUpload.props.d.ts +1 -0
- package/dist/index.js +146 -127
- package/dist/index.umd +14 -14
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -957,7 +957,7 @@ var concatArrays = (e, t) => {
|
|
|
957
957
|
"auto",
|
|
958
958
|
isArbitraryVariable,
|
|
959
959
|
isArbitraryValue
|
|
960
|
-
],
|
|
960
|
+
], dx = () => [
|
|
961
961
|
"auto",
|
|
962
962
|
"min",
|
|
963
963
|
"max",
|
|
@@ -1000,18 +1000,18 @@ var concatArrays = (e, t) => {
|
|
|
1000
1000
|
e,
|
|
1001
1001
|
isArbitraryVariable,
|
|
1002
1002
|
isArbitraryValue
|
|
1003
|
-
],
|
|
1003
|
+
], fx = () => [
|
|
1004
1004
|
...E(),
|
|
1005
1005
|
isArbitraryVariablePosition,
|
|
1006
1006
|
isArbitraryPosition,
|
|
1007
1007
|
{ position: [isArbitraryVariable, isArbitraryValue] }
|
|
1008
|
-
],
|
|
1008
|
+
], px = () => ["no-repeat", { repeat: [
|
|
1009
1009
|
"",
|
|
1010
1010
|
"x",
|
|
1011
1011
|
"y",
|
|
1012
1012
|
"space",
|
|
1013
1013
|
"round"
|
|
1014
|
-
] }],
|
|
1014
|
+
] }], mx = () => [
|
|
1015
1015
|
"auto",
|
|
1016
1016
|
"cover",
|
|
1017
1017
|
"contain",
|
|
@@ -1039,7 +1039,7 @@ var concatArrays = (e, t) => {
|
|
|
1039
1039
|
"dashed",
|
|
1040
1040
|
"dotted",
|
|
1041
1041
|
"double"
|
|
1042
|
-
],
|
|
1042
|
+
], hx = () => [
|
|
1043
1043
|
"normal",
|
|
1044
1044
|
"multiply",
|
|
1045
1045
|
"screen",
|
|
@@ -1067,21 +1067,21 @@ var concatArrays = (e, t) => {
|
|
|
1067
1067
|
v,
|
|
1068
1068
|
isArbitraryVariable,
|
|
1069
1069
|
isArbitraryValue
|
|
1070
|
-
],
|
|
1070
|
+
], gx = () => [
|
|
1071
1071
|
"none",
|
|
1072
1072
|
isNumber,
|
|
1073
1073
|
isArbitraryVariable,
|
|
1074
1074
|
isArbitraryValue
|
|
1075
|
-
],
|
|
1075
|
+
], _x = () => [
|
|
1076
1076
|
"none",
|
|
1077
1077
|
isNumber,
|
|
1078
1078
|
isArbitraryVariable,
|
|
1079
1079
|
isArbitraryValue
|
|
1080
|
-
],
|
|
1080
|
+
], vx = () => [
|
|
1081
1081
|
isNumber,
|
|
1082
1082
|
isArbitraryVariable,
|
|
1083
1083
|
isArbitraryValue
|
|
1084
|
-
],
|
|
1084
|
+
], yx = () => [
|
|
1085
1085
|
isFraction,
|
|
1086
1086
|
"full",
|
|
1087
1087
|
...N()
|
|
@@ -1317,8 +1317,8 @@ var concatArrays = (e, t) => {
|
|
|
1317
1317
|
"row-dense",
|
|
1318
1318
|
"col-dense"
|
|
1319
1319
|
] }],
|
|
1320
|
-
"auto-cols": [{ "auto-cols":
|
|
1321
|
-
"auto-rows": [{ "auto-rows":
|
|
1320
|
+
"auto-cols": [{ "auto-cols": dx() }],
|
|
1321
|
+
"auto-rows": [{ "auto-rows": dx() }],
|
|
1322
1322
|
gap: [{ gap: N() }],
|
|
1323
1323
|
"gap-x": [{ "gap-x": N() }],
|
|
1324
1324
|
"gap-y": [{ "gap-y": N() }],
|
|
@@ -1561,9 +1561,9 @@ var concatArrays = (e, t) => {
|
|
|
1561
1561
|
"padding",
|
|
1562
1562
|
"content"
|
|
1563
1563
|
] }],
|
|
1564
|
-
"bg-position": [{ bg:
|
|
1565
|
-
"bg-repeat": [{ bg:
|
|
1566
|
-
"bg-size": [{ bg:
|
|
1564
|
+
"bg-position": [{ bg: fx() }],
|
|
1565
|
+
"bg-repeat": [{ bg: px() }],
|
|
1566
|
+
"bg-size": [{ bg: mx() }],
|
|
1567
1567
|
"bg-image": [{ bg: [
|
|
1568
1568
|
"none",
|
|
1569
1569
|
{
|
|
@@ -1703,11 +1703,11 @@ var concatArrays = (e, t) => {
|
|
|
1703
1703
|
isArbitraryValue
|
|
1704
1704
|
] }],
|
|
1705
1705
|
"mix-blend": [{ "mix-blend": [
|
|
1706
|
-
...
|
|
1706
|
+
...hx(),
|
|
1707
1707
|
"plus-darker",
|
|
1708
1708
|
"plus-lighter"
|
|
1709
1709
|
] }],
|
|
1710
|
-
"bg-blend": [{ "bg-blend":
|
|
1710
|
+
"bg-blend": [{ "bg-blend": hx() }],
|
|
1711
1711
|
"mask-clip": [{ "mask-clip": [
|
|
1712
1712
|
"border",
|
|
1713
1713
|
"padding",
|
|
@@ -1780,9 +1780,9 @@ var concatArrays = (e, t) => {
|
|
|
1780
1780
|
"stroke",
|
|
1781
1781
|
"view"
|
|
1782
1782
|
] }],
|
|
1783
|
-
"mask-position": [{ mask:
|
|
1784
|
-
"mask-repeat": [{ mask:
|
|
1785
|
-
"mask-size": [{ mask:
|
|
1783
|
+
"mask-position": [{ mask: fx() }],
|
|
1784
|
+
"mask-repeat": [{ mask: px() }],
|
|
1785
|
+
"mask-size": [{ mask: mx() }],
|
|
1786
1786
|
"mask-type": [{ "mask-type": ["alpha", "luminance"] }],
|
|
1787
1787
|
"mask-image": [{ mask: [
|
|
1788
1788
|
"none",
|
|
@@ -1941,18 +1941,18 @@ var concatArrays = (e, t) => {
|
|
|
1941
1941
|
isArbitraryValue
|
|
1942
1942
|
] }],
|
|
1943
1943
|
"perspective-origin": [{ "perspective-origin": O() }],
|
|
1944
|
-
rotate: [{ rotate:
|
|
1945
|
-
"rotate-x": [{ "rotate-x":
|
|
1946
|
-
"rotate-y": [{ "rotate-y":
|
|
1947
|
-
"rotate-z": [{ "rotate-z":
|
|
1948
|
-
scale: [{ scale:
|
|
1949
|
-
"scale-x": [{ "scale-x":
|
|
1950
|
-
"scale-y": [{ "scale-y":
|
|
1951
|
-
"scale-z": [{ "scale-z":
|
|
1944
|
+
rotate: [{ rotate: gx() }],
|
|
1945
|
+
"rotate-x": [{ "rotate-x": gx() }],
|
|
1946
|
+
"rotate-y": [{ "rotate-y": gx() }],
|
|
1947
|
+
"rotate-z": [{ "rotate-z": gx() }],
|
|
1948
|
+
scale: [{ scale: _x() }],
|
|
1949
|
+
"scale-x": [{ "scale-x": _x() }],
|
|
1950
|
+
"scale-y": [{ "scale-y": _x() }],
|
|
1951
|
+
"scale-z": [{ "scale-z": _x() }],
|
|
1952
1952
|
"scale-3d": ["scale-3d"],
|
|
1953
|
-
skew: [{ skew:
|
|
1954
|
-
"skew-x": [{ "skew-x":
|
|
1955
|
-
"skew-y": [{ "skew-y":
|
|
1953
|
+
skew: [{ skew: vx() }],
|
|
1954
|
+
"skew-x": [{ "skew-x": vx() }],
|
|
1955
|
+
"skew-y": [{ "skew-y": vx() }],
|
|
1956
1956
|
transform: [{ transform: [
|
|
1957
1957
|
isArbitraryVariable,
|
|
1958
1958
|
isArbitraryValue,
|
|
@@ -1963,10 +1963,10 @@ var concatArrays = (e, t) => {
|
|
|
1963
1963
|
] }],
|
|
1964
1964
|
"transform-origin": [{ origin: O() }],
|
|
1965
1965
|
"transform-style": [{ transform: ["3d", "flat"] }],
|
|
1966
|
-
translate: [{ translate:
|
|
1967
|
-
"translate-x": [{ "translate-x":
|
|
1968
|
-
"translate-y": [{ "translate-y":
|
|
1969
|
-
"translate-z": [{ "translate-z":
|
|
1966
|
+
translate: [{ translate: yx() }],
|
|
1967
|
+
"translate-x": [{ "translate-x": yx() }],
|
|
1968
|
+
"translate-y": [{ "translate-y": yx() }],
|
|
1969
|
+
"translate-z": [{ "translate-z": yx() }],
|
|
1970
1970
|
"translate-none": ["translate-none"],
|
|
1971
1971
|
accent: [{ accent: G() }],
|
|
1972
1972
|
appearance: [{ appearance: ["none", "auto"] }],
|
|
@@ -4195,11 +4195,11 @@ var SelectRoot_default = /* @__PURE__ */ defineComponent({
|
|
|
4195
4195
|
function R(e, t) {
|
|
4196
4196
|
return T(n.displayFn(e).toLowerCase(), t.toLowerCase());
|
|
4197
4197
|
}
|
|
4198
|
-
let z = computed(() => n.filter?.fn ?? R),
|
|
4199
|
-
function
|
|
4198
|
+
let z = computed(() => n.filter?.fn ?? R), dx = computed(() => n.filter === null || !n.filter.isEnabled || L.value && !w.value ? y.value : new Map(Array.from(y.value.entries()).filter(([e, t]) => z.value(t, s.value)))), B = computed(() => n.virtualList === null || !n.virtualList.isEnabled ? [] : n.virtualList.items.filter((e) => z.value(e, s.value))), U = computed(() => new Map(Array.from(b.value.entries()).filter(([e, t]) => Array.from(t).some((e) => dx.value.has(e))))), W = computed(() => n.searchInputPlaceholder ?? u("component.select.search_input_placeholder"));
|
|
4199
|
+
function fx(e) {
|
|
4200
4200
|
c.value = e;
|
|
4201
4201
|
}
|
|
4202
|
-
function
|
|
4202
|
+
function mx() {
|
|
4203
4203
|
if (!n.isSearchTermControlled) {
|
|
4204
4204
|
if (k.value || !L.value || i.value === null || n.clearSearchTermOnSelect) {
|
|
4205
4205
|
s.value = "";
|
|
@@ -4217,34 +4217,34 @@ var SelectRoot_default = /* @__PURE__ */ defineComponent({
|
|
|
4217
4217
|
K();
|
|
4218
4218
|
}
|
|
4219
4219
|
function Y() {
|
|
4220
|
-
n.isSearchTermControlled ||
|
|
4220
|
+
n.isSearchTermControlled || mx(), w.value = !1;
|
|
4221
4221
|
}
|
|
4222
4222
|
function X() {
|
|
4223
|
-
j.value ||
|
|
4223
|
+
j.value || bx(), j.value = !0;
|
|
4224
4224
|
}
|
|
4225
4225
|
function Z() {
|
|
4226
4226
|
setTimeout(() => {
|
|
4227
|
-
!_.value?.$el.contains(document.activeElement) && (!c.value || n.isDropdownHidden) && (j.value = !1,
|
|
4227
|
+
!_.value?.$el.contains(document.activeElement) && (!c.value || n.isDropdownHidden) && (j.value = !1, Sx());
|
|
4228
4228
|
});
|
|
4229
4229
|
}
|
|
4230
|
-
function
|
|
4230
|
+
function vx() {
|
|
4231
4231
|
K();
|
|
4232
4232
|
}
|
|
4233
|
-
function
|
|
4233
|
+
function bx() {
|
|
4234
4234
|
r("focus");
|
|
4235
4235
|
}
|
|
4236
|
-
function
|
|
4236
|
+
function Sx() {
|
|
4237
4237
|
r("blur");
|
|
4238
4238
|
}
|
|
4239
|
-
function
|
|
4240
|
-
e.target === C.value ? e.preventDefault() :
|
|
4239
|
+
function Cx(e) {
|
|
4240
|
+
e.target === C.value ? e.preventDefault() : Sx();
|
|
4241
4241
|
}
|
|
4242
|
-
function
|
|
4243
|
-
K(), N.value ||
|
|
4242
|
+
function wx() {
|
|
4243
|
+
K(), N.value || fx(!1);
|
|
4244
4244
|
}
|
|
4245
4245
|
return watch(c, (e) => {
|
|
4246
4246
|
e ? J() : Y();
|
|
4247
|
-
}), watch(i,
|
|
4247
|
+
}), watch(i, mx, { immediate: !0 }), useProvideSelectContext({
|
|
4248
4248
|
...toComputedRefs(n),
|
|
4249
4249
|
id: computed(() => g),
|
|
4250
4250
|
hasInlineSearchInput: L,
|
|
@@ -4256,18 +4256,18 @@ var SelectRoot_default = /* @__PURE__ */ defineComponent({
|
|
|
4256
4256
|
allItems: y,
|
|
4257
4257
|
customClassConfig: O,
|
|
4258
4258
|
filteredGroups: U,
|
|
4259
|
-
filteredItems:
|
|
4259
|
+
filteredItems: dx,
|
|
4260
4260
|
inlinesearchInputElementRef: C,
|
|
4261
4261
|
modelValue: i,
|
|
4262
4262
|
remainOpenOnSelect: N,
|
|
4263
4263
|
searchInputPlaceholder: W,
|
|
4264
4264
|
searchTerm: s,
|
|
4265
|
-
setIsDropdownVisible:
|
|
4265
|
+
setIsDropdownVisible: fx,
|
|
4266
4266
|
style: E,
|
|
4267
4267
|
virtualListFilteredItems: B,
|
|
4268
|
-
onDropdownEscapeKeyDown:
|
|
4269
|
-
onDropdownInteractOutside:
|
|
4270
|
-
onSelectItem:
|
|
4268
|
+
onDropdownEscapeKeyDown: vx,
|
|
4269
|
+
onDropdownInteractOutside: Cx,
|
|
4270
|
+
onSelectItem: wx
|
|
4271
4271
|
}), (t, r) => (openBlock(), createBlock(TestIdProvider_default, { "test-id": n.testId }, {
|
|
4272
4272
|
default: withCtx(() => [createVNode(FormControl_default, {
|
|
4273
4273
|
id: null,
|
|
@@ -4603,21 +4603,21 @@ var SelectRoot_default = /* @__PURE__ */ defineComponent({
|
|
|
4603
4603
|
"error"
|
|
4604
4604
|
], ["update:modelValue"]),
|
|
4605
4605
|
setup(e, { emit: t }) {
|
|
4606
|
-
let n = e, r = t, i = useModel(e, "modelValue"), { googleMapsApiKey:
|
|
4606
|
+
let n = e, r = t, i = useModel(e, "modelValue"), s = /\/\s*(\d+)/, { googleMapsApiKey: c } = useInjectConfigContext(), u = ref(!1), g = ref([]), _ = null, v = ref(null), y = computed(() => i.value === null ? null : addressToFormattedAddress(i.value)), b = computed(() => g.value.map((e) => ({
|
|
4607
4607
|
placeId: e.placeId,
|
|
4608
4608
|
mainText: e.mainText,
|
|
4609
4609
|
secondaryText: e.secondaryText
|
|
4610
4610
|
})));
|
|
4611
|
-
async function
|
|
4612
|
-
if (
|
|
4613
|
-
|
|
4611
|
+
async function C(e) {
|
|
4612
|
+
if (_ === null) throw Error("Autocomplete service is not defined");
|
|
4613
|
+
u.value = !0;
|
|
4614
4614
|
try {
|
|
4615
|
-
let t = e, n =
|
|
4616
|
-
if (
|
|
4617
|
-
let e =
|
|
4618
|
-
t = t.replace(
|
|
4615
|
+
let t = e, n = e.match(s);
|
|
4616
|
+
if (n !== null && n[1] !== void 0) {
|
|
4617
|
+
let e = n[1];
|
|
4618
|
+
t = t.replace(s, `/bus ${e}`);
|
|
4619
4619
|
}
|
|
4620
|
-
|
|
4620
|
+
g.value = (await _.fetchAutocompleteSuggestions({ input: t })).suggestions.filter((e) => e.placePrediction !== null).map((e) => {
|
|
4621
4621
|
let t = e.placePrediction;
|
|
4622
4622
|
return {
|
|
4623
4623
|
placeId: t.placeId,
|
|
@@ -4628,16 +4628,16 @@ var SelectRoot_default = /* @__PURE__ */ defineComponent({
|
|
|
4628
4628
|
} catch (e) {
|
|
4629
4629
|
r("error", e);
|
|
4630
4630
|
}
|
|
4631
|
-
|
|
4631
|
+
u.value = !1;
|
|
4632
4632
|
}
|
|
4633
|
-
async function
|
|
4633
|
+
async function w(e) {
|
|
4634
4634
|
if (e === null) {
|
|
4635
4635
|
i.value = null;
|
|
4636
4636
|
return;
|
|
4637
4637
|
}
|
|
4638
|
-
|
|
4638
|
+
v.value = e, i.value = await getAddressByPlaceId(e.placeId), v.value = null;
|
|
4639
4639
|
}
|
|
4640
|
-
async function
|
|
4640
|
+
async function T(e) {
|
|
4641
4641
|
let { AutocompleteSuggestion: t } = await new Loader({
|
|
4642
4642
|
apiKey: e,
|
|
4643
4643
|
libraries: ["places"]
|
|
@@ -4645,17 +4645,17 @@ var SelectRoot_default = /* @__PURE__ */ defineComponent({
|
|
|
4645
4645
|
return t;
|
|
4646
4646
|
}
|
|
4647
4647
|
return onMounted(async () => {
|
|
4648
|
-
if (
|
|
4649
|
-
|
|
4648
|
+
if (c === null) throw Error("Google Maps API key is not defined. Provide it in the config using the `<ConfigProvider />` component.");
|
|
4649
|
+
_ = await T(c);
|
|
4650
4650
|
}), (e, t) => (openBlock(), createBlock(Autocomplete_default, mergeProps(n, {
|
|
4651
|
-
"model-value":
|
|
4652
|
-
items:
|
|
4653
|
-
"is-loading":
|
|
4651
|
+
"model-value": v.value || y.value,
|
|
4652
|
+
items: b.value,
|
|
4653
|
+
"is-loading": u.value,
|
|
4654
4654
|
"display-fn": (e) => unref(formattedAddressToString)(e),
|
|
4655
|
-
onSearch:
|
|
4655
|
+
onSearch: C,
|
|
4656
4656
|
onFocus: t[0] ||= (e) => r("focus"),
|
|
4657
4657
|
onBlur: t[1] ||= (e) => r("blur"),
|
|
4658
|
-
"onUpdate:modelValue":
|
|
4658
|
+
"onUpdate:modelValue": w
|
|
4659
4659
|
}), {
|
|
4660
4660
|
base: withCtx(() => [renderSlot(e.$slots, "base")]),
|
|
4661
4661
|
left: withCtx(() => [renderSlot(e.$slots, "left")]),
|
|
@@ -6676,9 +6676,13 @@ var DatePickerRoot_default = /* @__PURE__ */ defineComponent({
|
|
|
6676
6676
|
}), _hoisted_1$22 = { class: "p-lg" }, DateFieldPopover_default = /* @__PURE__ */ defineComponent({
|
|
6677
6677
|
__name: "DateFieldPopover",
|
|
6678
6678
|
setup(e) {
|
|
6679
|
-
let { maxDate: t, minDate: n, weekStartsOn: r, isDateDisabled: i, isDateUnavailable: a, isDisabled: c, allowDeselect: u, classConfig: g, customClassConfig: _,
|
|
6680
|
-
return (
|
|
6679
|
+
let { maxDate: t, minDate: n, weekStartsOn: r, isDateDisabled: i, isDateUnavailable: a, isDisabled: c, allowDeselect: u, classConfig: g, customClassConfig: _, dontCloseOnSelect: v, hideDatePicker: y, label: b, locale: C, modelValue: w, placeholderValue: T, showTwoMonths: O } = useInjectDateFieldContext(), k = ref(!1);
|
|
6680
|
+
return watch(w, () => {
|
|
6681
|
+
v.value || !k.value || (k.value = !1);
|
|
6682
|
+
}), (e, v) => unref(y) ? createCommentVNode("", !0) : (openBlock(), createBlock(Popover_default, {
|
|
6681
6683
|
key: 0,
|
|
6684
|
+
"is-open": k.value,
|
|
6685
|
+
"onUpdate:isOpen": v[1] ||= (e) => k.value = e,
|
|
6682
6686
|
"is-popover-arrow-hidden": !0,
|
|
6683
6687
|
"popover-align": "end"
|
|
6684
6688
|
}, {
|
|
@@ -6695,19 +6699,19 @@ var DatePickerRoot_default = /* @__PURE__ */ defineComponent({
|
|
|
6695
6699
|
class: "mr-[0.3rem]"
|
|
6696
6700
|
}, null, 8, ["is-disabled"])]),
|
|
6697
6701
|
content: withCtx(() => [createElementVNode("div", _hoisted_1$22, [createVNode(DatePicker_default, {
|
|
6698
|
-
modelValue: unref(
|
|
6699
|
-
"onUpdate:modelValue":
|
|
6702
|
+
modelValue: unref(w),
|
|
6703
|
+
"onUpdate:modelValue": v[0] ||= (e) => isRef(w) ? w.value = e : null,
|
|
6700
6704
|
"focus-on-mount": !0,
|
|
6701
6705
|
"allow-deselect": unref(u),
|
|
6702
6706
|
"is-date-disabled": unref(i),
|
|
6703
6707
|
"is-date-unavailable": unref(a),
|
|
6704
|
-
"placeholder-value": unref(
|
|
6708
|
+
"placeholder-value": unref(T),
|
|
6705
6709
|
"max-date": unref(t),
|
|
6706
|
-
locale: unref(
|
|
6710
|
+
locale: unref(C),
|
|
6707
6711
|
"week-starts-on": unref(r),
|
|
6708
6712
|
"min-date": unref(n),
|
|
6709
|
-
"show-two-months": unref(
|
|
6710
|
-
label: unref(
|
|
6713
|
+
"show-two-months": unref(O),
|
|
6714
|
+
label: unref(b) ?? "",
|
|
6711
6715
|
"class-config": {
|
|
6712
6716
|
...unref(_).datePicker,
|
|
6713
6717
|
...unref(g)?.datePicker
|
|
@@ -6727,7 +6731,7 @@ var DatePickerRoot_default = /* @__PURE__ */ defineComponent({
|
|
|
6727
6731
|
"class-config"
|
|
6728
6732
|
])])]),
|
|
6729
6733
|
_: 1
|
|
6730
|
-
}));
|
|
6734
|
+
}, 8, ["is-open"]));
|
|
6731
6735
|
}
|
|
6732
6736
|
}), _hoisted_1$21 = [
|
|
6733
6737
|
"data-icon-left",
|
|
@@ -6741,6 +6745,10 @@ var DatePickerRoot_default = /* @__PURE__ */ defineComponent({
|
|
|
6741
6745
|
default: !1
|
|
6742
6746
|
},
|
|
6743
6747
|
autocomplete: { default: "off" },
|
|
6748
|
+
dontCloseOnSelect: {
|
|
6749
|
+
type: Boolean,
|
|
6750
|
+
default: !1
|
|
6751
|
+
},
|
|
6744
6752
|
hideDatePicker: {
|
|
6745
6753
|
type: Boolean,
|
|
6746
6754
|
default: !1
|
|
@@ -6872,6 +6880,7 @@ var DatePickerRoot_default = /* @__PURE__ */ defineComponent({
|
|
|
6872
6880
|
props: /* @__PURE__ */ mergeModels({
|
|
6873
6881
|
isLoading: { type: Boolean },
|
|
6874
6882
|
autocomplete: {},
|
|
6883
|
+
dontCloseOnSelect: { type: Boolean },
|
|
6875
6884
|
hideDatePicker: { type: Boolean },
|
|
6876
6885
|
iconLeft: {},
|
|
6877
6886
|
variant: {},
|
|
@@ -7384,9 +7393,13 @@ var DateRangeFieldIconLeft_default = /* @__PURE__ */ defineComponent({
|
|
|
7384
7393
|
}), _hoisted_1$18 = { class: "p-lg" }, DateRangefieldPopover_default = /* @__PURE__ */ defineComponent({
|
|
7385
7394
|
__name: "DateRangefieldPopover",
|
|
7386
7395
|
setup(e) {
|
|
7387
|
-
let { maxDate: t, minDate: n, weekStartsOn: r, isDateDisabled: i, isDateUnavailable: a, isDisabled: c, allowDeselect: u, allowNonContinuousSelection: g, classConfig: _, customClassConfig: v,
|
|
7388
|
-
return (
|
|
7396
|
+
let { maxDate: t, minDate: n, weekStartsOn: r, isDateDisabled: i, isDateUnavailable: a, isDisabled: c, allowDeselect: u, allowNonContinuousSelection: g, classConfig: _, customClassConfig: v, dontCloseOnSelect: y, hideDatePicker: b, label: C, locale: w, modelValue: T, placeholderValue: O, showTwoMonths: k } = useInjectDateRangeFieldContext(), j = ref(!1);
|
|
7397
|
+
return watch(() => [T.value.from?.toString(), T.value.until?.toString()], ([e, t]) => {
|
|
7398
|
+
y.value || !j.value || t !== void 0 && (j.value = !1);
|
|
7399
|
+
}), (e, y) => unref(b) ? createCommentVNode("", !0) : (openBlock(), createBlock(Popover_default, {
|
|
7389
7400
|
key: 0,
|
|
7401
|
+
"is-open": j.value,
|
|
7402
|
+
"onUpdate:isOpen": y[1] ||= (e) => j.value = e,
|
|
7390
7403
|
"is-popover-arrow-hidden": !0,
|
|
7391
7404
|
"popover-align": "end"
|
|
7392
7405
|
}, {
|
|
@@ -7403,20 +7416,20 @@ var DateRangeFieldIconLeft_default = /* @__PURE__ */ defineComponent({
|
|
|
7403
7416
|
class: "mr-[0.3rem]"
|
|
7404
7417
|
}, null, 8, ["is-disabled"])]),
|
|
7405
7418
|
content: withCtx(() => [createElementVNode("div", _hoisted_1$18, [createVNode(DateRangePicker_default, {
|
|
7406
|
-
modelValue: unref(
|
|
7407
|
-
"onUpdate:modelValue":
|
|
7419
|
+
modelValue: unref(T),
|
|
7420
|
+
"onUpdate:modelValue": y[0] ||= (e) => isRef(T) ? T.value = e : null,
|
|
7408
7421
|
"focus-on-mount": !0,
|
|
7409
7422
|
"allow-deselect": unref(u),
|
|
7410
|
-
"placeholder-value": unref(
|
|
7423
|
+
"placeholder-value": unref(O),
|
|
7411
7424
|
"is-date-disabled": unref(i),
|
|
7412
7425
|
"week-starts-on": unref(r),
|
|
7413
|
-
locale: unref(
|
|
7426
|
+
locale: unref(w),
|
|
7414
7427
|
"allow-non-continuous-selection": unref(g),
|
|
7415
7428
|
"is-date-unavailable": unref(a),
|
|
7416
7429
|
"max-date": unref(t),
|
|
7417
7430
|
"min-date": unref(n),
|
|
7418
|
-
"show-two-months": unref(
|
|
7419
|
-
label: unref(
|
|
7431
|
+
"show-two-months": unref(k),
|
|
7432
|
+
label: unref(C) ?? "",
|
|
7420
7433
|
"class-config": {
|
|
7421
7434
|
...unref(v).datePicker,
|
|
7422
7435
|
...unref(_)?.datePicker
|
|
@@ -7437,7 +7450,7 @@ var DateRangeFieldIconLeft_default = /* @__PURE__ */ defineComponent({
|
|
|
7437
7450
|
"class-config"
|
|
7438
7451
|
])])]),
|
|
7439
7452
|
_: 1
|
|
7440
|
-
}));
|
|
7453
|
+
}, 8, ["is-open"]));
|
|
7441
7454
|
}
|
|
7442
7455
|
}), _hoisted_1$17 = [
|
|
7443
7456
|
"data-icon-left",
|
|
@@ -7452,6 +7465,10 @@ var DateRangeFieldIconLeft_default = /* @__PURE__ */ defineComponent({
|
|
|
7452
7465
|
},
|
|
7453
7466
|
allowNonContinuousSelection: { type: Boolean },
|
|
7454
7467
|
autocomplete: { default: "off" },
|
|
7468
|
+
dontCloseOnSelect: {
|
|
7469
|
+
type: Boolean,
|
|
7470
|
+
default: !1
|
|
7471
|
+
},
|
|
7455
7472
|
hideDatePicker: {
|
|
7456
7473
|
type: Boolean,
|
|
7457
7474
|
default: !1
|
|
@@ -7574,6 +7591,7 @@ var DateRangeFieldIconLeft_default = /* @__PURE__ */ defineComponent({
|
|
|
7574
7591
|
isLoading: { type: Boolean },
|
|
7575
7592
|
allowNonContinuousSelection: { type: Boolean },
|
|
7576
7593
|
autocomplete: {},
|
|
7594
|
+
dontCloseOnSelect: { type: Boolean },
|
|
7577
7595
|
hideDatePicker: { type: Boolean },
|
|
7578
7596
|
iconLeft: {},
|
|
7579
7597
|
variant: {},
|
|
@@ -8777,7 +8795,7 @@ var KeyboardKey_default = /* @__PURE__ */ defineComponent({
|
|
|
8777
8795
|
classConfig: { default: null }
|
|
8778
8796
|
},
|
|
8779
8797
|
setup(e) {
|
|
8780
|
-
let t = e, { theme:
|
|
8798
|
+
let t = e, n = /windows/i, { theme: r } = injectThemeProviderContext(), i = computed(() => n.test(navigator.userAgent)), o = new Map([
|
|
8781
8799
|
["alt", "⌥"],
|
|
8782
8800
|
["arrowdown", "↓"],
|
|
8783
8801
|
["arrowleft", "←"],
|
|
@@ -8789,7 +8807,7 @@ var KeyboardKey_default = /* @__PURE__ */ defineComponent({
|
|
|
8789
8807
|
["escape", "ESC"],
|
|
8790
8808
|
["meta", "⌘"],
|
|
8791
8809
|
["shift", "⇧"]
|
|
8792
|
-
]),
|
|
8810
|
+
]), s = new Map([
|
|
8793
8811
|
["alt", "Alt"],
|
|
8794
8812
|
["arrowdown", "↓"],
|
|
8795
8813
|
["arrowleft", "←"],
|
|
@@ -8801,8 +8819,8 @@ var KeyboardKey_default = /* @__PURE__ */ defineComponent({
|
|
|
8801
8819
|
["escape", "Esc"],
|
|
8802
8820
|
["meta", "Win"],
|
|
8803
8821
|
["shift", "Shift"]
|
|
8804
|
-
]),
|
|
8805
|
-
return (e, n) => (openBlock(), createElementBlock("kbd", { class: normalizeClass(
|
|
8822
|
+
]), l = computed(() => createKeyboardKeyStyle({ variant: t.variant ?? void 0 })), u = computed(() => getCustomComponentVariant("keyboardKey", r.value, { variant: t.variant })), m = computed(() => (i.value ? s : o).get(t.keyboardKey) ?? t.keyboardKey);
|
|
8823
|
+
return (e, n) => (openBlock(), createElementBlock("kbd", { class: normalizeClass(l.value.key({ class: unref(mergeClasses)(u.value.key, t.classConfig?.key) })) }, toDisplayString(m.value), 3));
|
|
8806
8824
|
}
|
|
8807
8825
|
});
|
|
8808
8826
|
const createKeyboardShortcutStyle = tv({
|
|
@@ -8812,8 +8830,9 @@ const createKeyboardShortcutStyle = tv({
|
|
|
8812
8830
|
},
|
|
8813
8831
|
variants: { variant: {} }
|
|
8814
8832
|
});
|
|
8833
|
+
var MOBILE_DEVICE_REGEX = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;
|
|
8815
8834
|
function isMobileDevice() {
|
|
8816
|
-
return
|
|
8835
|
+
return MOBILE_DEVICE_REGEX.test(navigator.userAgent);
|
|
8817
8836
|
}
|
|
8818
8837
|
var KeyboardShortcut_default = /* @__PURE__ */ defineComponent({
|
|
8819
8838
|
__name: "KeyboardShortcut",
|
|
@@ -21455,9 +21474,9 @@ var le = [
|
|
|
21455
21474
|
},
|
|
21456
21475
|
emits: ["update:heights", "removeToast"],
|
|
21457
21476
|
setup(e, { emit: n }) {
|
|
21458
|
-
let r = e, i = n, m = ref(!1), g = ref(!1), _ = ref(!1), v = ref(!1), y = ref(!1), b = ref(0), C = ref(0), w = ref(r.toast.duration || r.duration || Wt), T = ref(null), E = ref(null), O = computed(() => r.index === 0), k = computed(() => r.index + 1 <= r.visibleToasts), N = computed(() => r.toast.type), B = computed(() => r.toast.dismissible !== !1), U = computed(() => r.toast.class || ""), W = computed(() => r.descriptionClass || ""),
|
|
21477
|
+
let r = e, i = n, m = ref(!1), g = ref(!1), _ = ref(!1), v = ref(!1), y = ref(!1), b = ref(0), C = ref(0), w = ref(r.toast.duration || r.duration || Wt), T = ref(null), E = ref(null), O = computed(() => r.index === 0), k = computed(() => r.index + 1 <= r.visibleToasts), N = computed(() => r.toast.type), B = computed(() => r.toast.dismissible !== !1), U = computed(() => r.toast.class || ""), W = computed(() => r.descriptionClass || ""), fx = r.toast.style || {}, K = computed(() => r.heights.findIndex((e) => e.toastId === r.toast.id) || 0), Y = computed(() => r.toast.closeButton ?? r.closeButton);
|
|
21459
21478
|
computed(() => r.toast.duration || r.duration || Wt);
|
|
21460
|
-
let X = ref(0), Z = ref(0), Q = ref(null),
|
|
21479
|
+
let X = ref(0), Z = ref(0), Q = ref(null), gx = computed(() => r.position.split("-")), yx = computed(() => gx.value[0]), bx = computed(() => gx.value[1]), xx = computed(() => typeof r.toast.title != "string"), Sx = computed(() => typeof r.toast.description != "string"), Cx = computed(() => r.heights.reduce((e, t, n) => n >= K.value ? e : e + t.height, 0)), wx = ie(), Tx = computed(() => r.toast.invert || r.invert), Ex = computed(() => N.value === "loading"), Dx = computed(() => K.value * r.gap + Cx.value || 0);
|
|
21461
21480
|
onMounted(() => {
|
|
21462
21481
|
if (!m.value) return;
|
|
21463
21482
|
let e = E.value, t = e?.style.height;
|
|
@@ -21474,43 +21493,43 @@ var le = [
|
|
|
21474
21493
|
position: r.toast.position
|
|
21475
21494
|
}, ...r.heights], i("update:heights", a);
|
|
21476
21495
|
});
|
|
21477
|
-
function
|
|
21478
|
-
g.value = !0, b.value =
|
|
21496
|
+
function Ox() {
|
|
21497
|
+
g.value = !0, b.value = Dx.value, i("update:heights", r.heights.filter((e) => e.toastId !== r.toast.id)), setTimeout(() => {
|
|
21479
21498
|
i("removeToast", r.toast);
|
|
21480
21499
|
}, ce);
|
|
21481
21500
|
}
|
|
21482
|
-
function
|
|
21501
|
+
function kx() {
|
|
21483
21502
|
var e, t;
|
|
21484
|
-
if (
|
|
21485
|
-
|
|
21503
|
+
if (Ex.value || !B.value) return {};
|
|
21504
|
+
Ox(), (t = (e = r.toast).onDismiss) == null || t.call(e, r.toast);
|
|
21486
21505
|
}
|
|
21487
|
-
function
|
|
21488
|
-
|
|
21506
|
+
function Ax(e) {
|
|
21507
|
+
Ex.value || !B.value || (T.value = /* @__PURE__ */ new Date(), b.value = Dx.value, e.target.setPointerCapture(e.pointerId), e.target.tagName !== "BUTTON" && (_.value = !0, Q.value = {
|
|
21489
21508
|
x: e.clientX,
|
|
21490
21509
|
y: e.clientY
|
|
21491
21510
|
}));
|
|
21492
21511
|
}
|
|
21493
|
-
function
|
|
21512
|
+
function jx() {
|
|
21494
21513
|
var e, t, n;
|
|
21495
21514
|
if (v.value || !B) return;
|
|
21496
21515
|
Q.value = null;
|
|
21497
21516
|
let i = Number(E.value?.style.getPropertyValue("--swipe-amount").replace("px", "") || 0), a = (/* @__PURE__ */ new Date()).getTime() - T.value?.getTime(), o = Math.abs(i) / a;
|
|
21498
21517
|
if (Math.abs(i) >= ue || o > .11) {
|
|
21499
|
-
b.value =
|
|
21518
|
+
b.value = Dx.value, (t = (e = r.toast).onDismiss) == null || t.call(e, r.toast), Ox(), v.value = !0, y.value = !1;
|
|
21500
21519
|
return;
|
|
21501
21520
|
}
|
|
21502
21521
|
(n = E.value) == null || n.style.setProperty("--swipe-amount", "0px"), _.value = !1;
|
|
21503
21522
|
}
|
|
21504
|
-
function
|
|
21523
|
+
function Mx(e) {
|
|
21505
21524
|
var t;
|
|
21506
21525
|
if (!Q.value || !B.value) return;
|
|
21507
|
-
let n = e.clientY - Q.value.y, r = window.getSelection()?.toString().length > 0, i =
|
|
21526
|
+
let n = e.clientY - Q.value.y, r = window.getSelection()?.toString().length > 0, i = yx.value === "top" ? Math.min(0, n) : Math.max(0, n);
|
|
21508
21527
|
Math.abs(i) > 0 && (y.value = !0), !r && ((t = E.value) == null || t.style.setProperty("--swipe-amount", `${i}px`));
|
|
21509
21528
|
}
|
|
21510
21529
|
return watchEffect((e) => {
|
|
21511
21530
|
if (r.toast.promise && N.value === "loading" || r.toast.duration === Infinity || r.toast.type === "loading") return;
|
|
21512
21531
|
let t;
|
|
21513
|
-
r.expanded || r.interacting || r.pauseWhenPageIsHidden &&
|
|
21532
|
+
r.expanded || r.interacting || r.pauseWhenPageIsHidden && wx ? (() => {
|
|
21514
21533
|
if (Z.value < X.value) {
|
|
21515
21534
|
let e = (/* @__PURE__ */ new Date()).getTime() - X.value;
|
|
21516
21535
|
w.value -= e;
|
|
@@ -21518,12 +21537,12 @@ var le = [
|
|
|
21518
21537
|
Z.value = (/* @__PURE__ */ new Date()).getTime();
|
|
21519
21538
|
})() : w.value !== Infinity && (X.value = (/* @__PURE__ */ new Date()).getTime(), t = setTimeout(() => {
|
|
21520
21539
|
var e, t;
|
|
21521
|
-
(t = (e = r.toast).onAutoClose) == null || t.call(e, r.toast),
|
|
21540
|
+
(t = (e = r.toast).onAutoClose) == null || t.call(e, r.toast), Ox();
|
|
21522
21541
|
}, w.value)), e(() => {
|
|
21523
21542
|
clearTimeout(t);
|
|
21524
21543
|
});
|
|
21525
21544
|
}), watch(() => r.toast.delete, () => {
|
|
21526
|
-
r.toast.delete &&
|
|
21545
|
+
r.toast.delete && Ox();
|
|
21527
21546
|
}, { deep: !0 }), onMounted(() => {
|
|
21528
21547
|
if (m.value = !0, E.value) {
|
|
21529
21548
|
let e = E.value.getBoundingClientRect().height;
|
|
@@ -21552,36 +21571,36 @@ var le = [
|
|
|
21552
21571
|
"data-promise": !!e.toast.promise,
|
|
21553
21572
|
"data-removed": g.value,
|
|
21554
21573
|
"data-visible": k.value,
|
|
21555
|
-
"data-y-position":
|
|
21556
|
-
"data-x-position":
|
|
21574
|
+
"data-y-position": yx.value,
|
|
21575
|
+
"data-x-position": bx.value,
|
|
21557
21576
|
"data-index": e.index,
|
|
21558
21577
|
"data-front": O.value,
|
|
21559
21578
|
"data-swiping": _.value,
|
|
21560
21579
|
"data-dismissible": B.value,
|
|
21561
21580
|
"data-type": N.value,
|
|
21562
|
-
"data-invert":
|
|
21581
|
+
"data-invert": Tx.value,
|
|
21563
21582
|
"data-swipe-out": v.value,
|
|
21564
21583
|
"data-expanded": !!(e.expanded || e.expandByDefault && m.value),
|
|
21565
21584
|
style: normalizeStyle({
|
|
21566
21585
|
"--index": e.index,
|
|
21567
21586
|
"--toasts-before": e.index,
|
|
21568
21587
|
"--z-index": e.toasts.length - e.index,
|
|
21569
|
-
"--offset": `${g.value ? b.value :
|
|
21588
|
+
"--offset": `${g.value ? b.value : Dx.value}px`,
|
|
21570
21589
|
"--initial-height": e.expandByDefault ? "auto" : `${C.value}px`,
|
|
21571
21590
|
...e.style,
|
|
21572
|
-
...unref(
|
|
21591
|
+
...unref(fx)
|
|
21573
21592
|
}),
|
|
21574
|
-
onPointerdown:
|
|
21575
|
-
onPointerup:
|
|
21576
|
-
onPointermove:
|
|
21593
|
+
onPointerdown: Ax,
|
|
21594
|
+
onPointerup: jx,
|
|
21595
|
+
onPointermove: Mx
|
|
21577
21596
|
}, [Y.value && !e.toast.component ? (openBlock(), createElementBlock("button", {
|
|
21578
21597
|
key: 0,
|
|
21579
21598
|
"aria-label": e.closeButtonAriaLabel || "Close toast",
|
|
21580
|
-
"data-disabled":
|
|
21599
|
+
"data-disabled": Ex.value,
|
|
21581
21600
|
"data-close-button": "true",
|
|
21582
21601
|
class: normalizeClass(e.cn(e.classes?.closeButton, e.toast?.classes?.closeButton)),
|
|
21583
|
-
onClick:
|
|
21584
|
-
}, [(a = e.icons) != null && a.close ? (openBlock(), createBlock(resolveDynamicComponent(e.icons?.close), { key: 0 })) : renderSlot(e.$slots, "close-icon", { key: 1 })], 10, de)) : createCommentVNode("", !0), e.toast.component ? (openBlock(), createBlock(resolveDynamicComponent(e.toast.component), mergeProps({ key: 1 }, e.toast.componentProps, { onCloseToast:
|
|
21602
|
+
onClick: kx
|
|
21603
|
+
}, [(a = e.icons) != null && a.close ? (openBlock(), createBlock(resolveDynamicComponent(e.icons?.close), { key: 0 })) : renderSlot(e.$slots, "close-icon", { key: 1 })], 10, de)) : createCommentVNode("", !0), e.toast.component ? (openBlock(), createBlock(resolveDynamicComponent(e.toast.component), mergeProps({ key: 1 }, e.toast.componentProps, { onCloseToast: kx }), null, 16)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
21585
21604
|
N.value !== "default" || e.toast.icon || e.toast.promise ? (openBlock(), createElementBlock("div", {
|
|
21586
21605
|
key: 0,
|
|
21587
21606
|
"data-icon": "",
|
|
@@ -21593,11 +21612,11 @@ var le = [
|
|
|
21593
21612
|
}, [createElementVNode("div", {
|
|
21594
21613
|
"data-title": "",
|
|
21595
21614
|
class: normalizeClass(e.cn(e.classes?.title, e.toast.classes?.title))
|
|
21596
|
-
}, [
|
|
21615
|
+
}, [xx.value ? (openBlock(), createBlock(resolveDynamicComponent(e.toast.title), normalizeProps(mergeProps({ key: 0 }, e.toast.componentProps)), null, 16)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(e.toast.title), 1)], 64))], 2), e.toast.description ? (openBlock(), createElementBlock("div", {
|
|
21597
21616
|
key: 0,
|
|
21598
21617
|
"data-description": "",
|
|
21599
21618
|
class: normalizeClass(e.cn(e.descriptionClass, W.value, e.classes?.description, e.toast.classes?.description))
|
|
21600
|
-
}, [
|
|
21619
|
+
}, [Sx.value ? (openBlock(), createBlock(resolveDynamicComponent(e.toast.description), normalizeProps(mergeProps({ key: 0 }, e.toast.componentProps)), null, 16)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(e.toast.description), 1)], 64))], 2)) : createCommentVNode("", !0)], 2),
|
|
21601
21620
|
e.toast.cancel ? (openBlock(), createElementBlock("button", {
|
|
21602
21621
|
key: 1,
|
|
21603
21622
|
style: normalizeStyle(e.toast.cancelButtonStyle || e.cancelButtonStyle),
|
|
@@ -21606,7 +21625,7 @@ var le = [
|
|
|
21606
21625
|
"data-cancel": "",
|
|
21607
21626
|
onClick: n[0] ||= (t) => {
|
|
21608
21627
|
var n, r;
|
|
21609
|
-
unref(ut)(e.toast.cancel) && B.value && ((r = (n = e.toast.cancel).onClick) == null || r.call(n, t),
|
|
21628
|
+
unref(ut)(e.toast.cancel) && B.value && ((r = (n = e.toast.cancel).onClick) == null || r.call(n, t), Ox());
|
|
21610
21629
|
}
|
|
21611
21630
|
}, toDisplayString(unref(ut)(e.toast.cancel) ? e.toast.cancel?.label : e.toast.cancel), 7)) : createCommentVNode("", !0),
|
|
21612
21631
|
e.toast.action ? (openBlock(), createElementBlock("button", {
|
|
@@ -21617,7 +21636,7 @@ var le = [
|
|
|
21617
21636
|
"data-action": "",
|
|
21618
21637
|
onClick: n[1] ||= (t) => {
|
|
21619
21638
|
var n, r;
|
|
21620
|
-
unref(ut)(e.toast.action) && (t.defaultPrevented || ((r = (n = e.toast.action).onClick) == null || r.call(n, t), !t.defaultPrevented &&
|
|
21639
|
+
unref(ut)(e.toast.action) && (t.defaultPrevented || ((r = (n = e.toast.action).onClick) == null || r.call(n, t), !t.defaultPrevented && Ox()));
|
|
21621
21640
|
}
|
|
21622
21641
|
}, toDisplayString(unref(ut)(e.toast.action) ? e.toast.action?.label : e.toast.action), 7)) : createCommentVNode("", !0)
|
|
21623
21642
|
], 64))], 46, le);
|