@bagelink/vue 0.0.1300 → 0.0.1303
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/AddressSearch.vue.d.ts +0 -3
- package/dist/components/AddressSearch.vue.d.ts.map +1 -1
- package/dist/components/DataPreview.vue.d.ts +2 -2
- package/dist/components/DataPreview.vue.d.ts.map +1 -1
- package/dist/components/DropDown.vue.d.ts +0 -1
- package/dist/components/DropDown.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/ColorInput.vue.d.ts +21 -0
- package/dist/components/form/inputs/ColorInput.vue.d.ts.map +1 -0
- package/dist/components/form/inputs/SelectInput.vue.d.ts +0 -6
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TelInput.vue.d.ts +1 -618
- package/dist/components/form/inputs/TelInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/index.d.ts +1 -1
- package/dist/components/form/inputs/index.d.ts.map +1 -1
- package/dist/composables/useSchemaField.d.ts.map +1 -1
- package/dist/index.cjs +301 -221
- package/dist/index.mjs +302 -222
- package/dist/style.css +32 -32
- package/dist/utils/BagelFormUtils.d.ts +5 -0
- package/dist/utils/BagelFormUtils.d.ts.map +1 -1
- package/dist/utils/timeAgo.d.ts +1 -0
- package/dist/utils/timeAgo.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/DataPreview.vue +2 -2
- package/src/components/Dropdown.vue +20 -3
- package/src/components/Spreadsheet/Index.vue +2 -2
- package/src/components/form/FieldArray.vue +1 -1
- package/src/components/form/inputs/{ColorPicker.vue → ColorInput.vue} +1 -1
- package/src/components/form/inputs/TelInput.vue +198 -172
- package/src/components/form/inputs/index.ts +1 -1
- package/src/composables/useSchemaField.ts +6 -1
- package/src/utils/BagelFormUtils.ts +17 -3
- package/src/utils/timeAgo.ts +36 -0
package/dist/index.cjs
CHANGED
|
@@ -868,7 +868,7 @@ const _hoisted_6$j = {
|
|
|
868
868
|
key: 0,
|
|
869
869
|
class: "align-items-center flex justify-content-center h-100p opacity-6"
|
|
870
870
|
};
|
|
871
|
-
const _hoisted_7$
|
|
871
|
+
const _hoisted_7$f = {
|
|
872
872
|
key: 1,
|
|
873
873
|
class: "w-100p"
|
|
874
874
|
};
|
|
@@ -898,7 +898,7 @@ const _sfc_main$1c = /* @__PURE__ */ vue.defineComponent({
|
|
|
898
898
|
vue.createElementVNode("div", _hoisted_4$r, vue.toDisplayString(__props.day.dateTimeString.substring(8, 10)), 1)
|
|
899
899
|
]),
|
|
900
900
|
vue.createElementVNode("div", _hoisted_5$n, [
|
|
901
|
-
__props.day.events.length === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$j, vue.toDisplayString(vue.unref(getLanguage)(vue.unref(languageKeys).noEvent, __props.time.CALENDAR_LOCALE)), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$
|
|
901
|
+
__props.day.events.length === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$j, vue.toDisplayString(vue.unref(getLanguage)(vue.unref(languageKeys).noEvent, __props.time.CALENDAR_LOCALE)), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$f, [
|
|
902
902
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.day.events, (dayEvent) => {
|
|
903
903
|
return vue.openBlock(), vue.createBlock(AgendaEventTile, {
|
|
904
904
|
key: `agenda_event_${dayEvent.id}`,
|
|
@@ -1612,7 +1612,7 @@ const _hoisted_6$i = {
|
|
|
1612
1612
|
key: 0,
|
|
1613
1613
|
class: "event-flyout__row is-title"
|
|
1614
1614
|
};
|
|
1615
|
-
const _hoisted_7$
|
|
1615
|
+
const _hoisted_7$e = {
|
|
1616
1616
|
key: 1,
|
|
1617
1617
|
class: "event-flyout__row is-time"
|
|
1618
1618
|
};
|
|
@@ -1836,7 +1836,7 @@ const _sfc_main$1b = /* @__PURE__ */ vue.defineComponent({
|
|
|
1836
1836
|
}, null, 4),
|
|
1837
1837
|
vue.createTextVNode(" " + vue.toDisplayString(calendarEvent.value.title), 1)
|
|
1838
1838
|
])) : vue.createCommentVNode("", true),
|
|
1839
|
-
calendarEvent.value.time ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$
|
|
1839
|
+
calendarEvent.value.time ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$e, vue.toDisplayString(getEventTime.value), 1)) : vue.createCommentVNode("", true),
|
|
1840
1840
|
calendarEvent.value.location ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$9, [
|
|
1841
1841
|
vue.createVNode(vue.unref(Icon), {
|
|
1842
1842
|
icon: icons.location
|
|
@@ -2549,7 +2549,7 @@ const _hoisted_6$h = {
|
|
|
2549
2549
|
key: 2,
|
|
2550
2550
|
class: "calendar-week__event-row is-topic"
|
|
2551
2551
|
};
|
|
2552
|
-
const _hoisted_7$
|
|
2552
|
+
const _hoisted_7$d = {
|
|
2553
2553
|
key: 3,
|
|
2554
2554
|
class: "calendar-week__event-row is-description"
|
|
2555
2555
|
};
|
|
@@ -2925,7 +2925,7 @@ const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2925
2925
|
}, null, 8, ["icon"]),
|
|
2926
2926
|
vue.createElementVNode("span", null, vue.toDisplayString(event.value.topic), 1)
|
|
2927
2927
|
])) : vue.createCommentVNode("", true),
|
|
2928
|
-
event.value.description ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$
|
|
2928
|
+
event.value.description ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$d, [
|
|
2929
2929
|
vue.createVNode(vue.unref(Icon), {
|
|
2930
2930
|
icon: icons.value.description,
|
|
2931
2931
|
class: "calendar-week__event-icon"
|
|
@@ -9337,7 +9337,7 @@ const _hoisted_4$2$1 = {
|
|
|
9337
9337
|
};
|
|
9338
9338
|
const _hoisted_5$2$1 = ["x1", "y1", "x2", "y2"];
|
|
9339
9339
|
const _hoisted_6$2$1 = ["x1", "y1", "x2", "y2"];
|
|
9340
|
-
const _hoisted_7$
|
|
9340
|
+
const _hoisted_7$c = ["x1", "y1", "x2", "y2"];
|
|
9341
9341
|
function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
9342
9342
|
return _ctx.data.length ? (vue.openBlock(), vue.createElementBlock("g", {
|
|
9343
9343
|
key: 0,
|
|
@@ -9393,7 +9393,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9393
9393
|
y1: _ctx.canvas.y,
|
|
9394
9394
|
x2: _ctx.canvas.width - 1,
|
|
9395
9395
|
y2: _ctx.canvas.height
|
|
9396
|
-
}, null, 8, _hoisted_7$
|
|
9396
|
+
}, null, 8, _hoisted_7$c)
|
|
9397
9397
|
])
|
|
9398
9398
|
], 8, _hoisted_1$4$1)) : vue.createCommentVNode("v-if", true);
|
|
9399
9399
|
}
|
|
@@ -10539,6 +10539,8 @@ function useSchemaField(optns) {
|
|
|
10539
10539
|
textarea: TextInput,
|
|
10540
10540
|
number: NumberInput,
|
|
10541
10541
|
array: _sfc_main$R,
|
|
10542
|
+
color: _sfc_main$N,
|
|
10543
|
+
tel: TelInput,
|
|
10542
10544
|
select: SelectInput,
|
|
10543
10545
|
toggle: ToggleInput,
|
|
10544
10546
|
check: CheckInput,
|
|
@@ -10764,18 +10766,19 @@ const _hoisted_1$N = { class: "data-preview" };
|
|
|
10764
10766
|
const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
|
|
10765
10767
|
__name: "DataPreview",
|
|
10766
10768
|
props: {
|
|
10769
|
+
data: {},
|
|
10767
10770
|
schema: { type: Function },
|
|
10768
10771
|
showFields: {},
|
|
10769
10772
|
useServerSort: { type: Boolean },
|
|
10770
10773
|
selectable: { type: Boolean },
|
|
10771
10774
|
onLastItemVisible: { type: Function },
|
|
10772
|
-
|
|
10775
|
+
modelValue: {},
|
|
10773
10776
|
includeUnset: { type: Boolean }
|
|
10774
10777
|
},
|
|
10775
10778
|
setup(__props) {
|
|
10776
10779
|
const props2 = __props;
|
|
10777
10780
|
const slots = vue.useSlots();
|
|
10778
|
-
const data2 = vue.computed(() => Array.isArray(props2.
|
|
10781
|
+
const data2 = vue.computed(() => Array.isArray(props2.modelValue) ? props2.modelValue : [props2.modelValue]);
|
|
10779
10782
|
const {
|
|
10780
10783
|
computedSchema,
|
|
10781
10784
|
computedData
|
|
@@ -10802,7 +10805,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
|
|
|
10802
10805
|
};
|
|
10803
10806
|
}
|
|
10804
10807
|
});
|
|
10805
|
-
const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-
|
|
10808
|
+
const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-32cd138c"]]);
|
|
10806
10809
|
function useTableSelection(options) {
|
|
10807
10810
|
const allSelectorEl = vue.ref();
|
|
10808
10811
|
const computedSelectedItems = vue.computed(() => options.selectedItems.value);
|
|
@@ -11440,7 +11443,7 @@ const _hoisted_3$s = { class: "row first-row" };
|
|
|
11440
11443
|
const _hoisted_4$i = { key: 0 };
|
|
11441
11444
|
const _hoisted_5$h = ["onClick"];
|
|
11442
11445
|
const _hoisted_6$e = { class: "flex" };
|
|
11443
|
-
const _hoisted_7$
|
|
11446
|
+
const _hoisted_7$b = ["onClick"];
|
|
11444
11447
|
const _hoisted_8$7 = { key: 0 };
|
|
11445
11448
|
const _hoisted_9$6 = ["value"];
|
|
11446
11449
|
const _hoisted_10$6 = { key: 1 };
|
|
@@ -11635,7 +11638,7 @@ const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
|
|
|
11635
11638
|
]))
|
|
11636
11639
|
]);
|
|
11637
11640
|
}), 128))
|
|
11638
|
-
], 10, _hoisted_7$
|
|
11641
|
+
], 10, _hoisted_7$b);
|
|
11639
11642
|
}), 128)),
|
|
11640
11643
|
props2.onLastItemVisible !== void 0 ? (vue.openBlock(), vue.createElementBlock("tr", {
|
|
11641
11644
|
key: 0,
|
|
@@ -14758,11 +14761,10 @@ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
|
|
|
14758
14761
|
border: { type: Boolean },
|
|
14759
14762
|
outline: { type: Boolean },
|
|
14760
14763
|
round: { type: Boolean },
|
|
14761
|
-
placement: {},
|
|
14764
|
+
placement: { default: "bottom-start" },
|
|
14762
14765
|
noAutoFocus: { type: Boolean },
|
|
14763
|
-
|
|
14764
|
-
|
|
14765
|
-
triggers: {}
|
|
14766
|
+
autoHide: { type: Boolean, default: true },
|
|
14767
|
+
triggers: { default: () => ["click"] }
|
|
14766
14768
|
}, {
|
|
14767
14769
|
"shown": {
|
|
14768
14770
|
type: Boolean,
|
|
@@ -14818,8 +14820,10 @@ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
|
|
|
14818
14820
|
icon: _ctx.icon,
|
|
14819
14821
|
value: _ctx.value,
|
|
14820
14822
|
thin: _ctx.thin,
|
|
14821
|
-
flat: _ctx.flat
|
|
14822
|
-
|
|
14823
|
+
flat: _ctx.flat,
|
|
14824
|
+
outline: _ctx.outline,
|
|
14825
|
+
round: _ctx.round
|
|
14826
|
+
}, null, 8, ["class", "iconEnd", "icon", "value", "thin", "flat", "outline", "round"])
|
|
14823
14827
|
])
|
|
14824
14828
|
]),
|
|
14825
14829
|
_: 3
|
|
@@ -15014,11 +15018,22 @@ function bglForm(idOrField, ...schema) {
|
|
|
15014
15018
|
}
|
|
15015
15019
|
function telField(id, label, options) {
|
|
15016
15020
|
return {
|
|
15017
|
-
$el:
|
|
15021
|
+
$el: "tel",
|
|
15018
15022
|
id,
|
|
15019
15023
|
label,
|
|
15020
15024
|
vIf: options == null ? void 0 : options.vIf,
|
|
15021
|
-
attrs: options
|
|
15025
|
+
attrs: options,
|
|
15026
|
+
class: options == null ? void 0 : options.class
|
|
15027
|
+
};
|
|
15028
|
+
}
|
|
15029
|
+
function colorField(id, label, options) {
|
|
15030
|
+
return {
|
|
15031
|
+
$el: "color",
|
|
15032
|
+
id,
|
|
15033
|
+
label,
|
|
15034
|
+
vIf: options == null ? void 0 : options.vIf,
|
|
15035
|
+
attrs: options,
|
|
15036
|
+
class: options == null ? void 0 : options.class
|
|
15022
15037
|
};
|
|
15023
15038
|
}
|
|
15024
15039
|
function findBglFieldById(id, _schema) {
|
|
@@ -15046,6 +15061,7 @@ const bagelFormUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
|
|
|
15046
15061
|
arrField,
|
|
15047
15062
|
bglForm,
|
|
15048
15063
|
checkField,
|
|
15064
|
+
colorField,
|
|
15049
15065
|
dateField,
|
|
15050
15066
|
findBglFieldById,
|
|
15051
15067
|
frmRow: frmRow$1,
|
|
@@ -15392,7 +15408,7 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
|
15392
15408
|
const _hoisted_1$K = { class: "label mb-05" };
|
|
15393
15409
|
const _hoisted_2$x = {
|
|
15394
15410
|
key: 0,
|
|
15395
|
-
class: "ps-025 border-start"
|
|
15411
|
+
class: "ps-025 border-start mb-05"
|
|
15396
15412
|
};
|
|
15397
15413
|
const _hoisted_3$r = { class: "bg-gray-80 -my-05 px-025 pt-065 txt-center" };
|
|
15398
15414
|
const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -15720,7 +15736,7 @@ const CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data
|
|
|
15720
15736
|
const _hoisted_1$G = ["title"];
|
|
15721
15737
|
const _hoisted_2$u = ["id", "placeholder", "required"];
|
|
15722
15738
|
const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
|
|
15723
|
-
__name: "
|
|
15739
|
+
__name: "ColorInput",
|
|
15724
15740
|
props: {
|
|
15725
15741
|
label: {},
|
|
15726
15742
|
id: {},
|
|
@@ -15743,8 +15759,7 @@ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
|
|
|
15743
15759
|
}
|
|
15744
15760
|
);
|
|
15745
15761
|
return (_ctx, _cache) => {
|
|
15746
|
-
return
|
|
15747
|
-
key: 0,
|
|
15762
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
15748
15763
|
class: vue.normalizeClass(["bagel-input", { small: _ctx.small }]),
|
|
15749
15764
|
title: _ctx.label
|
|
15750
15765
|
}, [
|
|
@@ -15761,7 +15776,7 @@ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
|
|
|
15761
15776
|
[vue.vModelText, inputVal.value]
|
|
15762
15777
|
])
|
|
15763
15778
|
])
|
|
15764
|
-
], 10, _hoisted_1$G)
|
|
15779
|
+
], 10, _hoisted_1$G);
|
|
15765
15780
|
};
|
|
15766
15781
|
}
|
|
15767
15782
|
});
|
|
@@ -15774,7 +15789,7 @@ const _hoisted_3$o = {
|
|
|
15774
15789
|
const _hoisted_4$g = { class: "calendar-section m_border-none pe-05 m_p-0" };
|
|
15775
15790
|
const _hoisted_5$f = { class: "flex space-between pb-1" };
|
|
15776
15791
|
const _hoisted_6$c = { class: "flex gap-05" };
|
|
15777
|
-
const _hoisted_7$
|
|
15792
|
+
const _hoisted_7$a = { class: "month-year" };
|
|
15778
15793
|
const _hoisted_8$6 = {
|
|
15779
15794
|
key: 0,
|
|
15780
15795
|
class: "calendar-grid grid gap-025"
|
|
@@ -15837,7 +15852,7 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
|
15837
15852
|
};
|
|
15838
15853
|
return dateObj.toLocaleString(props2.locale || void 0, options);
|
|
15839
15854
|
};
|
|
15840
|
-
const
|
|
15855
|
+
const formatDate2 = (date2) => {
|
|
15841
15856
|
if (!date2) return "";
|
|
15842
15857
|
const dateObj = typeof date2 === "string" ? new Date(date2) : date2;
|
|
15843
15858
|
return props2.enableTime ? dateObj.toISOString().slice(0, 16) : dateObj.toISOString().split("T")[0];
|
|
@@ -15861,7 +15876,7 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
|
15861
15876
|
};
|
|
15862
15877
|
return {
|
|
15863
15878
|
formatDisplayDate,
|
|
15864
|
-
formatDate,
|
|
15879
|
+
formatDate: formatDate2,
|
|
15865
15880
|
parseUserInput
|
|
15866
15881
|
};
|
|
15867
15882
|
}
|
|
@@ -15887,10 +15902,10 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
|
15887
15902
|
};
|
|
15888
15903
|
}
|
|
15889
15904
|
function useDateState() {
|
|
15890
|
-
const { formatDisplayDate, formatDate } = useFormatting();
|
|
15905
|
+
const { formatDisplayDate, formatDate: formatDate2 } = useFormatting();
|
|
15891
15906
|
const formattedDisplayValue2 = vue.computed(() => formatDisplayDate(props2.modelValue));
|
|
15892
|
-
const formattedMin2 = vue.computed(() =>
|
|
15893
|
-
const formattedMax2 = vue.computed(() =>
|
|
15907
|
+
const formattedMin2 = vue.computed(() => formatDate2(props2.min));
|
|
15908
|
+
const formattedMax2 = vue.computed(() => formatDate2(props2.max));
|
|
15894
15909
|
const selectedDate2 = vue.computed(() => {
|
|
15895
15910
|
if (!props2.modelValue) return null;
|
|
15896
15911
|
return typeof props2.modelValue === "string" ? new Date(props2.modelValue) : props2.modelValue;
|
|
@@ -16224,7 +16239,7 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
|
16224
16239
|
icon: "chevron_left",
|
|
16225
16240
|
onClick: vue.unref(previousYear)
|
|
16226
16241
|
}, null, 8, ["onClick"]),
|
|
16227
|
-
vue.createElementVNode("span", _hoisted_7$
|
|
16242
|
+
vue.createElementVNode("span", _hoisted_7$a, vue.toDisplayString(vue.unref(currentMonthValue).formatted.year), 1),
|
|
16228
16243
|
vue.createVNode(vue.unref(Btn), {
|
|
16229
16244
|
flat: "",
|
|
16230
16245
|
icon: "chevron_right",
|
|
@@ -16333,7 +16348,7 @@ const _hoisted_3$n = {
|
|
|
16333
16348
|
const _hoisted_4$f = { class: "date-picker-container" };
|
|
16334
16349
|
const _hoisted_5$e = ["value", "min", "max", "required", "disabled"];
|
|
16335
16350
|
const _hoisted_6$b = { class: "flex gap-075 p-05 m_flex-wrap calendar-container justify-content-center h-100p" };
|
|
16336
|
-
const _hoisted_7$
|
|
16351
|
+
const _hoisted_7$9 = { class: "calendar-section m_border-none pe-05 m_p-0" };
|
|
16337
16352
|
const _hoisted_8$5 = { class: "flex space-between pb-1" };
|
|
16338
16353
|
const _hoisted_9$4 = { class: "flex gap-05" };
|
|
16339
16354
|
const _hoisted_10$4 = { class: "month-year" };
|
|
@@ -16403,14 +16418,14 @@ const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
|
|
|
16403
16418
|
timeZone: props2.timezone
|
|
16404
16419
|
});
|
|
16405
16420
|
}
|
|
16406
|
-
function
|
|
16421
|
+
function formatDate2(date2) {
|
|
16407
16422
|
if (!date2) return "";
|
|
16408
16423
|
const dateObj = typeof date2 === "string" ? new Date(date2) : date2;
|
|
16409
16424
|
return props2.enableTime ? dateObj.toISOString().slice(0, 16) : dateObj.toISOString().split("T")[0];
|
|
16410
16425
|
}
|
|
16411
16426
|
const formattedDisplayValue = vue.computed(() => formatDisplayDate(props2.modelValue));
|
|
16412
|
-
const formattedMin = vue.computed(() =>
|
|
16413
|
-
const formattedMax = vue.computed(() =>
|
|
16427
|
+
const formattedMin = vue.computed(() => formatDate2(props2.min));
|
|
16428
|
+
const formattedMax = vue.computed(() => formatDate2(props2.max));
|
|
16414
16429
|
const selectedDate = vue.computed(() => {
|
|
16415
16430
|
if (!props2.modelValue) return null;
|
|
16416
16431
|
return typeof props2.modelValue === "string" ? new Date(props2.modelValue) : props2.modelValue;
|
|
@@ -16580,7 +16595,7 @@ const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
|
|
|
16580
16595
|
]),
|
|
16581
16596
|
default: vue.withCtx(() => [
|
|
16582
16597
|
vue.createElementVNode("div", _hoisted_6$b, [
|
|
16583
|
-
vue.createElementVNode("div", _hoisted_7$
|
|
16598
|
+
vue.createElementVNode("div", _hoisted_7$9, [
|
|
16584
16599
|
vue.createElementVNode("div", _hoisted_8$5, [
|
|
16585
16600
|
vue.unref(currentView) === "days" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
16586
16601
|
vue.createVNode(vue.unref(Btn), {
|
|
@@ -16783,7 +16798,7 @@ const _hoisted_3$l = { class: "m-05 flex opacity-7 z-99" };
|
|
|
16783
16798
|
const _hoisted_4$d = { class: "ellipsis-1 word-break-all h-20 m-0 color-black" };
|
|
16784
16799
|
const _hoisted_5$d = { class: "flex gap-025 rounded pe-1 ps-05 py-025 bg-gray-80 -my-1" };
|
|
16785
16800
|
const _hoisted_6$a = { class: "ellipsis-1 word-break-all h-20 m-0 color-black txt16" };
|
|
16786
|
-
const _hoisted_7$
|
|
16801
|
+
const _hoisted_7$8 = {
|
|
16787
16802
|
key: 1,
|
|
16788
16803
|
class: "txt-gray txt-12"
|
|
16789
16804
|
};
|
|
@@ -17066,7 +17081,7 @@ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
|
|
|
17066
17081
|
])
|
|
17067
17082
|
]);
|
|
17068
17083
|
}), 128)),
|
|
17069
|
-
!storageFiles.value.length && !fileQueue.value.length ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7$
|
|
17084
|
+
!storageFiles.value.length && !fileQueue.value.length ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7$8, vue.toDisplayString(_ctx.noFilePlaceholder || "No file selected"), 1)) : vue.createCommentVNode("", true)
|
|
17070
17085
|
]),
|
|
17071
17086
|
_: 1
|
|
17072
17087
|
})) : (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -17665,7 +17680,7 @@ const _hoisted_6$9 = {
|
|
|
17665
17680
|
key: 0,
|
|
17666
17681
|
class: "m-0 m_txt-14"
|
|
17667
17682
|
};
|
|
17668
|
-
const _hoisted_7$
|
|
17683
|
+
const _hoisted_7$7 = {
|
|
17669
17684
|
key: 1,
|
|
17670
17685
|
class: "txt-gray txt-12 m-0"
|
|
17671
17686
|
};
|
|
@@ -17740,7 +17755,7 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
|
17740
17755
|
}, null, 8, _hoisted_4$b)) : vue.createCommentVNode("", true),
|
|
17741
17756
|
vue.createElementVNode("div", _hoisted_5$b, [
|
|
17742
17757
|
opt.label ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_6$9, vue.toDisplayString(opt.label), 1)) : vue.createCommentVNode("", true),
|
|
17743
|
-
opt.subLabel ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_7$
|
|
17758
|
+
opt.subLabel ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_7$7, vue.toDisplayString(opt.subLabel), 1)) : vue.createCommentVNode("", true)
|
|
17744
17759
|
]),
|
|
17745
17760
|
vue.renderSlot(_ctx.$slots, "radioItem", vue.mergeProps({ ref_for: true }, opt), void 0, true)
|
|
17746
17761
|
]),
|
|
@@ -17841,7 +17856,7 @@ const _hoisted_3$g = { class: "range-slider relative w-100" };
|
|
|
17841
17856
|
const _hoisted_4$9 = ["id", "value", "min", "max", "step", "required", "disabled", "aria-label"];
|
|
17842
17857
|
const _hoisted_5$9 = ["value", "min", "max", "step", "required", "disabled"];
|
|
17843
17858
|
const _hoisted_6$8 = { class: "track absolute pointer-events-none overflow-hidden round" };
|
|
17844
|
-
const _hoisted_7$
|
|
17859
|
+
const _hoisted_7$6 = { class: "txt-center txt-14 user-select-none range-slider-txt flex space-between opacity-4 mx-05" };
|
|
17845
17860
|
const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
17846
17861
|
__name: "RangeInput",
|
|
17847
17862
|
props: {
|
|
@@ -17982,7 +17997,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
|
17982
17997
|
], true)
|
|
17983
17998
|
], 4)) : vue.createCommentVNode("", true)
|
|
17984
17999
|
]),
|
|
17985
|
-
vue.createElementVNode("p", _hoisted_7$
|
|
18000
|
+
vue.createElementVNode("p", _hoisted_7$6, [
|
|
17986
18001
|
vue.renderSlot(_ctx.$slots, "min", {
|
|
17987
18002
|
max: vue.unref(formatValue)(vue.unref(max2)),
|
|
17988
18003
|
min: vue.unref(formatValue)(vue.unref(min2)),
|
|
@@ -19676,7 +19691,7 @@ const _hoisted_4$8 = {
|
|
|
19676
19691
|
};
|
|
19677
19692
|
const _hoisted_5$8 = ["value"];
|
|
19678
19693
|
const _hoisted_6$7 = ["aria-selected", "onClick", "onKeydown"];
|
|
19679
|
-
const _hoisted_7$
|
|
19694
|
+
const _hoisted_7$5 = { class: "block" };
|
|
19680
19695
|
const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
19681
19696
|
__name: "SelectInput",
|
|
19682
19697
|
props: {
|
|
@@ -19969,7 +19984,7 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
|
19969
19984
|
size: 1.1
|
|
19970
19985
|
})) : vue.createCommentVNode("", true)
|
|
19971
19986
|
], 64)) : vue.createCommentVNode("", true),
|
|
19972
|
-
vue.createElementVNode("span", _hoisted_7$
|
|
19987
|
+
vue.createElementVNode("span", _hoisted_7$5, vue.toDisplayString(getLabel(option2)), 1)
|
|
19973
19988
|
], 42, _hoisted_6$7);
|
|
19974
19989
|
}), 128))
|
|
19975
19990
|
], 2),
|
|
@@ -27867,11 +27882,12 @@ function parsePhoneNumber() {
|
|
|
27867
27882
|
return withMetadataArgument(parsePhoneNumber$1, arguments);
|
|
27868
27883
|
}
|
|
27869
27884
|
const _hoisted_1$o = ["aria-expanded"];
|
|
27870
|
-
const _hoisted_2$e = { class: "
|
|
27871
|
-
const _hoisted_3$b =
|
|
27872
|
-
const _hoisted_4$6 =
|
|
27873
|
-
const _hoisted_5$6 = {
|
|
27874
|
-
const _hoisted_6$5 =
|
|
27885
|
+
const _hoisted_2$e = { class: "flex gap-05" };
|
|
27886
|
+
const _hoisted_3$b = { class: "p-075 tel-countryp-dropdown" };
|
|
27887
|
+
const _hoisted_4$6 = ["aria-selected", "onClick", "onMousemove"];
|
|
27888
|
+
const _hoisted_5$6 = { class: "tel-country" };
|
|
27889
|
+
const _hoisted_6$5 = { key: 1 };
|
|
27890
|
+
const _hoisted_7$4 = ["id", "required", "placeholder", "disabled", "autocomplete", "pattern", "minlength", "maxlength", "name", "readonly", "tabindex", "aria-describedby"];
|
|
27875
27891
|
const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
27876
27892
|
__name: "TelInput",
|
|
27877
27893
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
@@ -27895,8 +27911,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
|
27895
27911
|
mode: { default: "INTERNATIONAL" },
|
|
27896
27912
|
onlyCountries: { default: () => [] },
|
|
27897
27913
|
preferredCountries: { default: () => [] },
|
|
27898
|
-
parseArg: {}
|
|
27899
|
-
debounceDelay: { default: 300 }
|
|
27914
|
+
parseArg: {}
|
|
27900
27915
|
}, {
|
|
27901
27916
|
"modelValue": {
|
|
27902
27917
|
default: ""
|
|
@@ -27917,13 +27932,8 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
|
27917
27932
|
setup(__props, { emit: __emit }) {
|
|
27918
27933
|
const props2 = __props;
|
|
27919
27934
|
const emit2 = __emit;
|
|
27920
|
-
|
|
27921
|
-
|
|
27922
|
-
if (apiData) return JSON.parse(apiData);
|
|
27923
|
-
const { data: data2 } = await axios$1.get("https://ipapi.co/json/");
|
|
27924
|
-
sessionStorage.setItem("ipapi", JSON.stringify(data2));
|
|
27925
|
-
return data2;
|
|
27926
|
-
}
|
|
27935
|
+
const open = vue.ref(false);
|
|
27936
|
+
const dropdownOpenDirection = vue.ref("below");
|
|
27927
27937
|
const defaultDropdownOptions = {
|
|
27928
27938
|
hide: false,
|
|
27929
27939
|
disabled: false,
|
|
@@ -27954,52 +27964,169 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
|
27954
27964
|
...defaultInputOptions,
|
|
27955
27965
|
...props2.inputOptions
|
|
27956
27966
|
}));
|
|
27957
|
-
|
|
27958
|
-
|
|
27959
|
-
|
|
27960
|
-
|
|
27961
|
-
|
|
27962
|
-
|
|
27963
|
-
|
|
27964
|
-
|
|
27965
|
-
|
|
27966
|
-
|
|
27967
|
-
|
|
27968
|
-
)
|
|
27969
|
-
);
|
|
27970
|
-
const isPreferred = (country) => props2.preferredCountries.includes(country == null ? void 0 : country.iso2);
|
|
27971
|
-
const filteredCountries = vue.computed(() => {
|
|
27972
|
-
if (props2.onlyCountries.length > 0) {
|
|
27973
|
-
return props2.allCountries.filter(
|
|
27974
|
-
({ iso2 }) => props2.onlyCountries.some((c2) => c2.toUpperCase() === iso2)
|
|
27967
|
+
function useCountrySelection(props22, emit22) {
|
|
27968
|
+
const activeCountryCode2 = vue.ref();
|
|
27969
|
+
const selectedIndex2 = vue.ref();
|
|
27970
|
+
const searchQuery2 = vue.ref("");
|
|
27971
|
+
const activeCountry = vue.computed(() => {
|
|
27972
|
+
var _a;
|
|
27973
|
+
return (_a = props22.allCountries) == null ? void 0 : _a.find(
|
|
27974
|
+
(country) => {
|
|
27975
|
+
var _a2;
|
|
27976
|
+
return country.iso2 === ((_a2 = activeCountryCode2.value) == null ? void 0 : _a2.toUpperCase());
|
|
27977
|
+
}
|
|
27975
27978
|
);
|
|
27979
|
+
});
|
|
27980
|
+
const filteredCountries = vue.computed(() => {
|
|
27981
|
+
const countries = props22.allCountries || [];
|
|
27982
|
+
const onlyCountries = props22.onlyCountries || [];
|
|
27983
|
+
const excludeCountries = props22.excludeCountries || [];
|
|
27984
|
+
if (onlyCountries.length > 0) {
|
|
27985
|
+
return countries.filter(({ iso2 }) => onlyCountries.some((c2) => c2.toUpperCase() === iso2));
|
|
27986
|
+
}
|
|
27987
|
+
if (excludeCountries.length > 0) {
|
|
27988
|
+
return countries.filter(
|
|
27989
|
+
({ iso2 }) => !excludeCountries.includes(iso2.toUpperCase()) && !excludeCountries.includes(iso2.toLowerCase())
|
|
27990
|
+
);
|
|
27991
|
+
}
|
|
27992
|
+
return countries;
|
|
27993
|
+
});
|
|
27994
|
+
const sortedCountries2 = vue.computed(() => {
|
|
27995
|
+
const preferredCountries = getCountries(props22.preferredCountries || []);
|
|
27996
|
+
const countriesList = [...preferredCountries, ...filteredCountries.value];
|
|
27997
|
+
const cleanInput = searchQuery2.value.replaceAll(
|
|
27998
|
+
/[~`!#$%&*()+={};:'"<>.,\\/@-]/g,
|
|
27999
|
+
""
|
|
28000
|
+
).toLowerCase();
|
|
28001
|
+
return countriesList.filter(
|
|
28002
|
+
(c2) => new RegExp(cleanInput, "i").test(c2.name || "") || new RegExp(cleanInput, "i").test(c2.iso2 || "") || new RegExp(cleanInput, "i").test(c2.dialCode || "")
|
|
28003
|
+
).filter(Boolean);
|
|
28004
|
+
});
|
|
28005
|
+
const findCountry = (iso) => filteredCountries.value.find(
|
|
28006
|
+
(country) => country.iso2 === iso.toUpperCase()
|
|
28007
|
+
);
|
|
28008
|
+
const findCountryByDialCode = (dialCode) => filteredCountries.value.find((country) => Number(country.dialCode) === dialCode);
|
|
28009
|
+
function getCountries(list) {
|
|
28010
|
+
const countryList = [];
|
|
28011
|
+
list.forEach((countryCode) => {
|
|
28012
|
+
const country = findCountry(countryCode);
|
|
28013
|
+
if (country) countryList.push(country);
|
|
28014
|
+
});
|
|
28015
|
+
return countryList;
|
|
27976
28016
|
}
|
|
27977
|
-
|
|
27978
|
-
|
|
27979
|
-
(
|
|
27980
|
-
|
|
28017
|
+
async function initializeCountry2() {
|
|
28018
|
+
if (props22.defaultCountry) {
|
|
28019
|
+
if (typeof props22.defaultCountry === "string") {
|
|
28020
|
+
chooseCountry2(props22.defaultCountry);
|
|
28021
|
+
return;
|
|
28022
|
+
}
|
|
28023
|
+
if (typeof props22.defaultCountry === "number") {
|
|
28024
|
+
const country = findCountryByDialCode(props22.defaultCountry);
|
|
28025
|
+
if (country) {
|
|
28026
|
+
chooseCountry2(country.iso2);
|
|
28027
|
+
return;
|
|
28028
|
+
}
|
|
28029
|
+
}
|
|
28030
|
+
}
|
|
28031
|
+
const fallbackCountry = sortedCountries2.value[0];
|
|
28032
|
+
if (props22.autoDefaultCountry) {
|
|
28033
|
+
try {
|
|
28034
|
+
const res = (await getIp()).country;
|
|
28035
|
+
chooseCountry2(res || activeCountryCode2.value);
|
|
28036
|
+
} catch (error) {
|
|
28037
|
+
console.warn(error);
|
|
28038
|
+
chooseCountry2(fallbackCountry.iso2);
|
|
28039
|
+
}
|
|
28040
|
+
} else {
|
|
28041
|
+
chooseCountry2(fallbackCountry.iso2);
|
|
28042
|
+
}
|
|
27981
28043
|
}
|
|
27982
|
-
|
|
27983
|
-
|
|
27984
|
-
|
|
27985
|
-
|
|
27986
|
-
|
|
27987
|
-
|
|
27988
|
-
|
|
27989
|
-
|
|
27990
|
-
|
|
28044
|
+
function chooseCountry2(country) {
|
|
28045
|
+
if (!country) return;
|
|
28046
|
+
const parsedCountry = findCountry(country);
|
|
28047
|
+
if (!parsedCountry) return;
|
|
28048
|
+
activeCountryCode2.value = parsedCountry.iso2;
|
|
28049
|
+
emit22("country-changed", parsedCountry);
|
|
28050
|
+
open.value = false;
|
|
28051
|
+
}
|
|
28052
|
+
vue.watch(
|
|
28053
|
+
() => activeCountry.value,
|
|
28054
|
+
(value, oldValue) => {
|
|
28055
|
+
if (!value && (oldValue == null ? void 0 : oldValue.iso2)) {
|
|
28056
|
+
activeCountryCode2.value = oldValue.iso2;
|
|
28057
|
+
return;
|
|
28058
|
+
}
|
|
28059
|
+
if (value == null ? void 0 : value.iso2) emit22("country-changed", value);
|
|
28060
|
+
}
|
|
27991
28061
|
);
|
|
27992
|
-
return
|
|
27993
|
-
|
|
27994
|
-
|
|
27995
|
-
|
|
27996
|
-
|
|
27997
|
-
|
|
27998
|
-
|
|
27999
|
-
|
|
28062
|
+
return {
|
|
28063
|
+
activeCountryCode: activeCountryCode2,
|
|
28064
|
+
activeCountry,
|
|
28065
|
+
selectedIndex: selectedIndex2,
|
|
28066
|
+
searchQuery: searchQuery2,
|
|
28067
|
+
sortedCountries: sortedCountries2,
|
|
28068
|
+
chooseCountry: chooseCountry2,
|
|
28069
|
+
initializeCountry: initializeCountry2,
|
|
28070
|
+
findCountry,
|
|
28071
|
+
findCountryByDialCode
|
|
28072
|
+
};
|
|
28073
|
+
}
|
|
28074
|
+
function usePhoneNumberFormatting(props22, activeCountryCode2) {
|
|
28075
|
+
const parseArgs = vue.computed(() => ({
|
|
28076
|
+
...props22.parseArg,
|
|
28077
|
+
defaultCountry: activeCountryCode2.value
|
|
28078
|
+
}));
|
|
28079
|
+
function formatPhone2(val) {
|
|
28080
|
+
var _a, _b, _c;
|
|
28081
|
+
let phoneNumber = parsePhoneNumber(val, parseArgs.value);
|
|
28082
|
+
if (!phoneNumber && val.startsWith("+")) {
|
|
28083
|
+
const currentCountry = (_a = props22.allCountries) == null ? void 0 : _a.find((c2) => c2.iso2 === activeCountryCode2.value);
|
|
28084
|
+
if (currentCountry) {
|
|
28085
|
+
const { dialCode } = currentCountry;
|
|
28086
|
+
const withoutDialCode = val.replace(new RegExp(`^\\+${dialCode}`), "");
|
|
28087
|
+
phoneNumber = parsePhoneNumber(withoutDialCode, parseArgs.value);
|
|
28088
|
+
}
|
|
28089
|
+
}
|
|
28090
|
+
if (!phoneNumber) {
|
|
28091
|
+
const dialCode = ((_c = (_b = props22.allCountries) == null ? void 0 : _b.find(
|
|
28092
|
+
(c2) => c2.iso2 === activeCountryCode2.value
|
|
28093
|
+
)) == null ? void 0 : _c.dialCode) || "";
|
|
28094
|
+
if (props22.mode === "INTERNATIONAL") return `+${dialCode}`;
|
|
28095
|
+
return dialCode;
|
|
28096
|
+
}
|
|
28097
|
+
const formattedNumber = phoneNumber.format(props22.mode || "INTERNATIONAL");
|
|
28098
|
+
if (props22.mode === "INTERNATIONAL") {
|
|
28099
|
+
const countryCode = phoneNumber.countryCallingCode;
|
|
28100
|
+
const { nationalNumber } = phoneNumber;
|
|
28101
|
+
return `+${countryCode}${nationalNumber}`;
|
|
28102
|
+
}
|
|
28103
|
+
return formattedNumber.replaceAll(" ", "") || "";
|
|
28104
|
+
}
|
|
28105
|
+
return {
|
|
28106
|
+
formatPhone: formatPhone2,
|
|
28107
|
+
parseArgs
|
|
28108
|
+
};
|
|
28109
|
+
}
|
|
28000
28110
|
const debouncedEmit = useDebounceFn((maybeFormatted) => {
|
|
28001
28111
|
emit2("debounce", maybeFormatted);
|
|
28002
|
-
}
|
|
28112
|
+
});
|
|
28113
|
+
const {
|
|
28114
|
+
activeCountryCode,
|
|
28115
|
+
selectedIndex,
|
|
28116
|
+
searchQuery,
|
|
28117
|
+
sortedCountries,
|
|
28118
|
+
chooseCountry,
|
|
28119
|
+
initializeCountry
|
|
28120
|
+
} = useCountrySelection(props2, emit2);
|
|
28121
|
+
const { formatPhone } = usePhoneNumberFormatting(props2, activeCountryCode);
|
|
28122
|
+
const isPreferred = (country) => props2.preferredCountries.includes(country == null ? void 0 : country.iso2) || false;
|
|
28123
|
+
function reset() {
|
|
28124
|
+
if (!sortedCountries.value || !activeCountryCode.value) return;
|
|
28125
|
+
selectedIndex.value = sortedCountries.value.findIndex(
|
|
28126
|
+
(c2) => c2.iso2 === activeCountryCode.value
|
|
28127
|
+
);
|
|
28128
|
+
open.value = false;
|
|
28129
|
+
}
|
|
28003
28130
|
const phone = vue.useModel(__props, "modelValue", {
|
|
28004
28131
|
set: (value) => {
|
|
28005
28132
|
let maybeFormatted = value;
|
|
@@ -28016,99 +28143,18 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
|
28016
28143
|
},
|
|
28017
28144
|
get: (value) => value
|
|
28018
28145
|
});
|
|
28019
|
-
function formatPhone(val) {
|
|
28020
|
-
var _a;
|
|
28021
|
-
const phoneNumber = parsePhoneNumber(val, parseArgs.value);
|
|
28022
|
-
if (!phoneNumber) {
|
|
28023
|
-
const dialCode = ((_a = sortedCountries.value.find((c2) => c2.iso2 === activeCountryCode.value)) == null ? void 0 : _a.dialCode) || "";
|
|
28024
|
-
if (props2.mode === "INTERNATIONAL") return `+${dialCode}`;
|
|
28025
|
-
return dialCode;
|
|
28026
|
-
}
|
|
28027
|
-
return phoneNumber.format(props2.mode).replaceAll(" ", "") || "";
|
|
28028
|
-
}
|
|
28029
|
-
vue.watch(
|
|
28030
|
-
() => activeCountry.value,
|
|
28031
|
-
(value, oldValue) => {
|
|
28032
|
-
if (!value && (oldValue == null ? void 0 : oldValue.iso2)) {
|
|
28033
|
-
activeCountryCode.value = oldValue.iso2;
|
|
28034
|
-
return;
|
|
28035
|
-
}
|
|
28036
|
-
if (value == null ? void 0 : value.iso2) emit2("country-changed", value);
|
|
28037
|
-
}
|
|
28038
|
-
);
|
|
28039
|
-
async function initializeCountry() {
|
|
28040
|
-
if (props2.defaultCountry) {
|
|
28041
|
-
if (typeof props2.defaultCountry === "string") {
|
|
28042
|
-
chooseCountry(props2.defaultCountry);
|
|
28043
|
-
return;
|
|
28044
|
-
}
|
|
28045
|
-
if (typeof props2.defaultCountry === "number") {
|
|
28046
|
-
const country = findCountryByDialCode(props2.defaultCountry);
|
|
28047
|
-
if (country) {
|
|
28048
|
-
chooseCountry(country.iso2);
|
|
28049
|
-
return;
|
|
28050
|
-
}
|
|
28051
|
-
}
|
|
28052
|
-
}
|
|
28053
|
-
const fallbackCountry = sortedCountries.value[0];
|
|
28054
|
-
if (props2.autoDefaultCountry) {
|
|
28055
|
-
try {
|
|
28056
|
-
const res = (await getIp()).country;
|
|
28057
|
-
chooseCountry(res || activeCountryCode.value);
|
|
28058
|
-
} catch (error) {
|
|
28059
|
-
console.warn(error);
|
|
28060
|
-
chooseCountry(fallbackCountry.iso2);
|
|
28061
|
-
}
|
|
28062
|
-
} else {
|
|
28063
|
-
chooseCountry(fallbackCountry.iso2);
|
|
28064
|
-
}
|
|
28065
|
-
}
|
|
28066
|
-
vue.onMounted(initializeCountry);
|
|
28067
|
-
const findCountry = (iso) => filteredCountries.value.find((country) => country.iso2 === iso.toUpperCase());
|
|
28068
|
-
function getCountries(list) {
|
|
28069
|
-
const countryList = [];
|
|
28070
|
-
list.forEach((countryCode) => {
|
|
28071
|
-
const country = findCountry(countryCode);
|
|
28072
|
-
if (country) countryList.push(country);
|
|
28073
|
-
});
|
|
28074
|
-
return countryList;
|
|
28075
|
-
}
|
|
28076
|
-
function findCountryByDialCode(dialCode) {
|
|
28077
|
-
return filteredCountries.value.find((country) => Number(country.dialCode) === dialCode);
|
|
28078
|
-
}
|
|
28079
|
-
const phoneDropdown = vue.ref();
|
|
28080
|
-
function chooseCountry(country) {
|
|
28081
|
-
var _a, _b;
|
|
28082
|
-
if (!country) return;
|
|
28083
|
-
const parsedCountry = findCountry(country);
|
|
28084
|
-
if (!parsedCountry) return;
|
|
28085
|
-
activeCountryCode.value = parsedCountry.iso2;
|
|
28086
|
-
if (((_a = props2.inputOptions) == null ? void 0 : _a.showDialCode) && parsedCountry) {
|
|
28087
|
-
phone.value = `+ ${parsedCountry.dialCode}`;
|
|
28088
|
-
activeCountryCode.value = parsedCountry.iso2 || "";
|
|
28089
|
-
return;
|
|
28090
|
-
}
|
|
28091
|
-
activeCountryCode.value = parsedCountry.iso2 || "";
|
|
28092
|
-
(_b = phoneDropdown.value) == null ? void 0 : _b.hide();
|
|
28093
|
-
}
|
|
28094
28146
|
function onBlur() {
|
|
28095
28147
|
emit2("blur");
|
|
28096
28148
|
}
|
|
28097
28149
|
function onFocus() {
|
|
28098
28150
|
emit2("focus");
|
|
28099
28151
|
}
|
|
28100
|
-
function onEnter(
|
|
28152
|
+
function onEnter() {
|
|
28101
28153
|
emit2("enter");
|
|
28102
28154
|
}
|
|
28103
28155
|
function onSpace() {
|
|
28104
28156
|
emit2("space");
|
|
28105
28157
|
}
|
|
28106
|
-
function reset() {
|
|
28107
|
-
selectedIndex.value = sortedCountries.value.findIndex(
|
|
28108
|
-
(c2) => c2.iso2 === activeCountryCode.value
|
|
28109
|
-
);
|
|
28110
|
-
open.value = false;
|
|
28111
|
-
}
|
|
28112
28158
|
function handleInput(e) {
|
|
28113
28159
|
const keyVal = e.key ?? "";
|
|
28114
28160
|
if (keyVal.length > 1 || e.metaKey) return;
|
|
@@ -28116,6 +28162,14 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
|
28116
28162
|
if (!hasBadChars) return;
|
|
28117
28163
|
e.preventDefault();
|
|
28118
28164
|
}
|
|
28165
|
+
async function getIp() {
|
|
28166
|
+
const apiData = sessionStorage.getItem("ipapi");
|
|
28167
|
+
if (apiData) return JSON.parse(apiData);
|
|
28168
|
+
const { data: data2 } = await axios$1.get("https://ipapi.co/json/");
|
|
28169
|
+
sessionStorage.setItem("ipapi", JSON.stringify(data2));
|
|
28170
|
+
return data2;
|
|
28171
|
+
}
|
|
28172
|
+
vue.onMounted(initializeCountry);
|
|
28119
28173
|
return (_ctx, _cache) => {
|
|
28120
28174
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
28121
28175
|
class: vue.normalizeClass(["bagel-input", { disabled: _ctx.disabled, [props2.class || ""]: true }])
|
|
@@ -28128,89 +28182,83 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
|
28128
28182
|
tabindex: "-1",
|
|
28129
28183
|
"aria-label": "Country Code Selector",
|
|
28130
28184
|
"aria-haspopup": "listbox",
|
|
28131
|
-
"aria-expanded":
|
|
28185
|
+
"aria-expanded": open.value,
|
|
28132
28186
|
onKeydown: [
|
|
28133
28187
|
vue.withKeys(reset, ["esc"]),
|
|
28134
28188
|
vue.withKeys(reset, ["tab"])
|
|
28135
28189
|
]
|
|
28136
28190
|
}, [
|
|
28137
|
-
|
|
28138
|
-
|
|
28139
|
-
|
|
28140
|
-
ref: phoneDropdown,
|
|
28191
|
+
vue.createVNode(vue.unref(_sfc_main$V), {
|
|
28192
|
+
shown: open.value,
|
|
28193
|
+
"onUpdate:shown": _cache[1] || (_cache[1] = ($event) => open.value = $event),
|
|
28141
28194
|
placement: "bottom-start",
|
|
28142
|
-
disabled: computedDropDownOptions.
|
|
28143
|
-
onHide: _cache[2] || (_cache[2] = ($event) => vue.isRef(open) ? open.value = false : open = false)
|
|
28195
|
+
disabled: vue.unref(computedDropDownOptions).disabled
|
|
28144
28196
|
}, {
|
|
28145
28197
|
trigger: vue.withCtx(() => [
|
|
28146
|
-
vue.createElementVNode("span",
|
|
28147
|
-
class: "flex gap-05",
|
|
28148
|
-
onClick: _cache[0] || (_cache[0] = ($event) => vue.isRef(open) ? open.value = true : open = true)
|
|
28149
|
-
}, [
|
|
28198
|
+
vue.createElementVNode("span", _hoisted_2$e, [
|
|
28150
28199
|
vue.createVNode(vue.unref(Icon), {
|
|
28151
|
-
icon:
|
|
28200
|
+
icon: open.value ? "collapse_all" : "expand_all"
|
|
28152
28201
|
}, null, 8, ["icon"]),
|
|
28153
|
-
computedDropDownOptions.
|
|
28202
|
+
vue.unref(computedDropDownOptions).showFlags && vue.unref(activeCountryCode) ? (vue.openBlock(), vue.createBlock(vue.unref(Flag), {
|
|
28154
28203
|
key: 0,
|
|
28155
28204
|
country: vue.unref(activeCountryCode)
|
|
28156
28205
|
}, null, 8, ["country"])) : vue.createCommentVNode("", true)
|
|
28157
28206
|
])
|
|
28158
28207
|
]),
|
|
28159
28208
|
default: vue.withCtx(() => [
|
|
28160
|
-
vue.createElementVNode("div",
|
|
28209
|
+
vue.createElementVNode("div", _hoisted_3$b, [
|
|
28161
28210
|
_ctx.searchable ? (vue.openBlock(), vue.createBlock(vue.unref(TextInput), {
|
|
28162
28211
|
key: 0,
|
|
28163
|
-
modelValue: searchQuery
|
|
28164
|
-
"onUpdate:modelValue": _cache[
|
|
28212
|
+
modelValue: vue.unref(searchQuery),
|
|
28213
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(searchQuery) ? searchQuery.value = $event : null),
|
|
28165
28214
|
"aria-label": "Search by country name or country code",
|
|
28166
28215
|
placeholder: "Search",
|
|
28167
28216
|
icon: "search"
|
|
28168
28217
|
}, null, 8, ["modelValue"])) : vue.createCommentVNode("", true),
|
|
28169
28218
|
vue.createElementVNode("ul", {
|
|
28170
|
-
class: vue.normalizeClass(["overflow-y p-0", dropdownOpenDirection.value]),
|
|
28171
|
-
style: { "max-height": "400px" },
|
|
28219
|
+
class: vue.normalizeClass(["overflow-y p-0 max-h-300px", dropdownOpenDirection.value]),
|
|
28172
28220
|
role: "listbox"
|
|
28173
28221
|
}, [
|
|
28174
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(sortedCountries
|
|
28222
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(sortedCountries), (pb, index2) => {
|
|
28175
28223
|
return vue.openBlock(), vue.createElementBlock("li", {
|
|
28176
28224
|
key: pb.iso2 + isPreferred(pb),
|
|
28177
28225
|
role: "option",
|
|
28178
28226
|
class: "flex gap-075",
|
|
28179
28227
|
tabindex: "-1",
|
|
28180
28228
|
"aria-selected": vue.unref(activeCountryCode) === pb.iso2 && !isPreferred(pb),
|
|
28181
|
-
onClick: ($event) => chooseCountry(pb.iso2),
|
|
28182
|
-
onMousemove: ($event) =>
|
|
28229
|
+
onClick: ($event) => vue.unref(chooseCountry)(pb.iso2),
|
|
28230
|
+
onMousemove: ($event) => selectedIndex.value = index2
|
|
28183
28231
|
}, [
|
|
28184
|
-
computedDropDownOptions.
|
|
28232
|
+
vue.unref(computedDropDownOptions).showFlags ? (vue.openBlock(), vue.createBlock(vue.unref(Flag), {
|
|
28185
28233
|
key: 0,
|
|
28186
28234
|
country: pb.iso2
|
|
28187
28235
|
}, null, 8, ["country"])) : vue.createCommentVNode("", true),
|
|
28188
|
-
vue.createElementVNode("p",
|
|
28189
|
-
computedDropDownOptions.
|
|
28190
|
-
], 40,
|
|
28236
|
+
vue.createElementVNode("p", _hoisted_5$6, vue.toDisplayString(pb.name), 1),
|
|
28237
|
+
vue.unref(computedDropDownOptions).showDialCodeInList ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$5, " +" + vue.toDisplayString(pb.dialCode), 1)) : vue.createCommentVNode("", true)
|
|
28238
|
+
], 40, _hoisted_4$6);
|
|
28191
28239
|
}), 128))
|
|
28192
28240
|
], 2)
|
|
28193
28241
|
])
|
|
28194
28242
|
]),
|
|
28195
28243
|
_: 1
|
|
28196
|
-
}, 8, ["
|
|
28244
|
+
}, 8, ["shown", "disabled"]),
|
|
28197
28245
|
vue.withDirectives(vue.createElementVNode("input", {
|
|
28198
28246
|
id: _ctx.id,
|
|
28199
|
-
"onUpdate:modelValue": _cache[
|
|
28247
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => phone.value = $event),
|
|
28200
28248
|
required: _ctx.required,
|
|
28201
28249
|
placeholder: props2.placeholder || "Enter a phone number",
|
|
28202
28250
|
disabled: _ctx.disabled,
|
|
28203
28251
|
type: "tel",
|
|
28204
28252
|
autocomplete: _ctx.autocomplete,
|
|
28205
28253
|
class: "vti__input",
|
|
28206
|
-
pattern: computedInputOptions.
|
|
28207
|
-
minlength: computedInputOptions.
|
|
28208
|
-
maxlength: computedInputOptions.
|
|
28209
|
-
name: computedInputOptions.
|
|
28210
|
-
readonly: computedInputOptions.
|
|
28211
|
-
tabindex: computedInputOptions.
|
|
28212
|
-
"aria-describedby": computedInputOptions
|
|
28213
|
-
style: vue.normalizeStyle(computedInputOptions.
|
|
28254
|
+
pattern: vue.unref(computedInputOptions).pattern,
|
|
28255
|
+
minlength: vue.unref(computedInputOptions).minlength,
|
|
28256
|
+
maxlength: vue.unref(computedInputOptions).maxlength,
|
|
28257
|
+
name: vue.unref(computedInputOptions).name,
|
|
28258
|
+
readonly: vue.unref(computedInputOptions).readonly,
|
|
28259
|
+
tabindex: vue.unref(computedInputOptions).tabindex,
|
|
28260
|
+
"aria-describedby": vue.unref(computedInputOptions)["aria-describedby"],
|
|
28261
|
+
style: vue.normalizeStyle(vue.unref(computedInputOptions).style),
|
|
28214
28262
|
onBlur,
|
|
28215
28263
|
onFocus,
|
|
28216
28264
|
onKeyup: [
|
|
@@ -28218,7 +28266,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
|
28218
28266
|
vue.withKeys(onSpace, ["space"])
|
|
28219
28267
|
],
|
|
28220
28268
|
onKeydown: handleInput
|
|
28221
|
-
}, null, 44,
|
|
28269
|
+
}, null, 44, _hoisted_7$4), [
|
|
28222
28270
|
[vue.vModelText, phone.value]
|
|
28223
28271
|
])
|
|
28224
28272
|
], 40, _hoisted_1$o)
|
|
@@ -28227,7 +28275,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
|
28227
28275
|
};
|
|
28228
28276
|
}
|
|
28229
28277
|
});
|
|
28230
|
-
const TelInput = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-
|
|
28278
|
+
const TelInput = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-a77caf64"]]);
|
|
28231
28279
|
const _hoisted_1$n = ["title"];
|
|
28232
28280
|
const _hoisted_2$d = ["for"];
|
|
28233
28281
|
const _hoisted_3$a = ["id", "title", "autocomplete", "type", "placeholder", "disabled", "required", "pattern"];
|
|
@@ -35431,7 +35479,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
35431
35479
|
};
|
|
35432
35480
|
}
|
|
35433
35481
|
});
|
|
35434
|
-
const Index = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
35482
|
+
const Index = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-f204ab99"]]);
|
|
35435
35483
|
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
35436
35484
|
__name: "Title",
|
|
35437
35485
|
props: {
|
|
@@ -37269,6 +37317,37 @@ function timeAgo(date2, lang = "en") {
|
|
|
37269
37317
|
}
|
|
37270
37318
|
return selectedLang.justNow;
|
|
37271
37319
|
}
|
|
37320
|
+
const formatMap = {
|
|
37321
|
+
dd: { type: "day", format: "2-digit" },
|
|
37322
|
+
ddd: { type: "weekday", format: "short" },
|
|
37323
|
+
dddd: { type: "weekday", format: "long" },
|
|
37324
|
+
mm: { type: "month", format: "2-digit" },
|
|
37325
|
+
mmm: { type: "month", format: "short" },
|
|
37326
|
+
mmmm: { type: "month", format: "long" },
|
|
37327
|
+
yy: { type: "year", format: "2-digit" },
|
|
37328
|
+
yyyy: { type: "year", format: "numeric" },
|
|
37329
|
+
HH: { type: "hour", format: "2-digit" },
|
|
37330
|
+
hh: { type: "hour", format: "2-digit" },
|
|
37331
|
+
MM: { type: "minute", format: "2-digit" },
|
|
37332
|
+
ss: { type: "second", format: "2-digit" },
|
|
37333
|
+
ampm: { type: "dayPeriod", format: "short" }
|
|
37334
|
+
};
|
|
37335
|
+
function formatDate(date2, format2 = "dd.mm.yy") {
|
|
37336
|
+
if (!date2) return "";
|
|
37337
|
+
try {
|
|
37338
|
+
const formatParts = format2.split(/[.\s:]/);
|
|
37339
|
+
const formatObject = {};
|
|
37340
|
+
for (const part of formatParts) {
|
|
37341
|
+
const formatInfo = formatMap[part];
|
|
37342
|
+
if (!formatInfo) continue;
|
|
37343
|
+
formatObject[formatInfo.type] = formatInfo.format;
|
|
37344
|
+
}
|
|
37345
|
+
const d2 = typeof date2 === "string" ? new Date(date2) : date2;
|
|
37346
|
+
return d2.toLocaleDateString("he-IL", formatObject);
|
|
37347
|
+
} catch (error) {
|
|
37348
|
+
return "";
|
|
37349
|
+
}
|
|
37350
|
+
}
|
|
37272
37351
|
exports.Accordion = _sfc_main$1m;
|
|
37273
37352
|
exports.AccordionItem = AccordionItem;
|
|
37274
37353
|
exports.AddressSearch = _sfc_main$1k;
|
|
@@ -37287,7 +37366,7 @@ exports.Carousel = Carousel;
|
|
|
37287
37366
|
exports.CheckInput = CheckInput;
|
|
37288
37367
|
exports.Checkbox = Checkbox;
|
|
37289
37368
|
exports.CodeEditor = CodeEditor;
|
|
37290
|
-
exports.
|
|
37369
|
+
exports.ColorInput = _sfc_main$N;
|
|
37291
37370
|
exports.DataPreview = DataPreview;
|
|
37292
37371
|
exports.DataTable = DataTable;
|
|
37293
37372
|
exports.DateInput = DateInput;
|
|
@@ -37358,6 +37437,7 @@ exports.classify = classify;
|
|
|
37358
37437
|
exports.copyText = copyText;
|
|
37359
37438
|
exports.debounce = debounce;
|
|
37360
37439
|
exports.denullify = denullify;
|
|
37440
|
+
exports.formatDate = formatDate;
|
|
37361
37441
|
exports.formatString = formatString;
|
|
37362
37442
|
exports.getFallbackSchema = getFallbackSchema;
|
|
37363
37443
|
exports.getNestedValue = getNestedValue;
|