fds-vue-core 7.1.0 → 7.1.2
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/fds-vue-core.cjs.js +52 -5
- package/dist/fds-vue-core.cjs.js.map +1 -1
- package/dist/fds-vue-core.es.js +52 -5
- package/dist/fds-vue-core.es.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/FdsSearchSelectPro/FdsSearchSelectPro.vue +47 -2
- package/src/components/FdsWeekCalendar/WeekDay.vue +16 -1
- package/src/components/FdsWizard/FdsWizard.vue +1 -1
package/dist/fds-vue-core.cjs.js
CHANGED
|
@@ -11606,6 +11606,9 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
11606
11606
|
syncSelectedItemsWithItems();
|
|
11607
11607
|
}
|
|
11608
11608
|
filterAndPaginate();
|
|
11609
|
+
if (!selectedItem.value) {
|
|
11610
|
+
resolveInitialSingleSelection();
|
|
11611
|
+
}
|
|
11609
11612
|
},
|
|
11610
11613
|
{ immediate: true }
|
|
11611
11614
|
);
|
|
@@ -11743,11 +11746,39 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
11743
11746
|
}
|
|
11744
11747
|
return result;
|
|
11745
11748
|
};
|
|
11746
|
-
|
|
11749
|
+
function selectItem(item) {
|
|
11747
11750
|
selectedItem.value = item;
|
|
11748
11751
|
setValidSelectedState();
|
|
11749
11752
|
emit("searchSelected", item);
|
|
11750
|
-
}
|
|
11753
|
+
}
|
|
11754
|
+
function getCandidateMatchValues(item) {
|
|
11755
|
+
if (isDividerItem(item) && !props.dividerSelectable) return [];
|
|
11756
|
+
if (searchFields.value.length > 0) {
|
|
11757
|
+
return searchFields.value.map((key) => String(item[key] ?? "").trim()).filter((value) => value.length > 0);
|
|
11758
|
+
}
|
|
11759
|
+
return [String(item.label ?? item.name ?? "").trim()].filter((value) => value.length > 0);
|
|
11760
|
+
}
|
|
11761
|
+
function resolveInitialSingleSelection() {
|
|
11762
|
+
if (isMultiple.value || !props.initialValue) return;
|
|
11763
|
+
const normalizeForInitialMatch = (value) => {
|
|
11764
|
+
const trimmed = value.trim();
|
|
11765
|
+
if (!trimmed) return "";
|
|
11766
|
+
if (!isPidString(trimmed)) {
|
|
11767
|
+
return trimmed.replace(/-$/, "").toLowerCase();
|
|
11768
|
+
}
|
|
11769
|
+
const digits = trimmed.replace(/\D/g, "");
|
|
11770
|
+
return (digits.length > 8 ? `${digits.substring(0, 8)}-${digits.substring(8)}` : digits).toLowerCase();
|
|
11771
|
+
};
|
|
11772
|
+
const normalizedInitialValue = normalizeForInitialMatch(props.initialValue);
|
|
11773
|
+
if (!normalizedInitialValue) return;
|
|
11774
|
+
const initialMatch = sourceItems.value.find(
|
|
11775
|
+
(item) => getCandidateMatchValues(item).some((value) => normalizeForInitialMatch(value) === normalizedInitialValue)
|
|
11776
|
+
);
|
|
11777
|
+
if (!initialMatch) return;
|
|
11778
|
+
const firstField = searchFields.value[0];
|
|
11779
|
+
searchTerm.value = (firstField ? String(initialMatch[firstField] ?? "") : props.initialValue).trim();
|
|
11780
|
+
selectItem(initialMatch);
|
|
11781
|
+
}
|
|
11751
11782
|
const getHierarchyLevel = (item) => {
|
|
11752
11783
|
const level = Number(item[props.levelField] ?? 0);
|
|
11753
11784
|
return Number.isFinite(level) && level >= 0 ? level : 0;
|
|
@@ -11957,7 +11988,10 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
11957
11988
|
vue.onMounted(() => {
|
|
11958
11989
|
if (props.initialValue) {
|
|
11959
11990
|
searchTerm.value = props.initialValue;
|
|
11960
|
-
|
|
11991
|
+
resolveInitialSingleSelection();
|
|
11992
|
+
if (!selectedItem.value) {
|
|
11993
|
+
setValidSelectedState();
|
|
11994
|
+
}
|
|
11961
11995
|
}
|
|
11962
11996
|
window.addEventListener("mouseup", onClickOutside);
|
|
11963
11997
|
vue.nextTick(() => {
|
|
@@ -14772,7 +14806,7 @@ const checkIfDateIsBeforeToday = (date) => {
|
|
|
14772
14806
|
return isAfter(startOfToday, startOfDate);
|
|
14773
14807
|
};
|
|
14774
14808
|
const checkIfDateIsEnabled = (date, enabledDates) => enabledDates.some((enabledDate) => isSameDay(enabledDate, date));
|
|
14775
|
-
const _hoisted_1$6 = ["disabled"];
|
|
14809
|
+
const _hoisted_1$6 = ["disabled", "aria-label"];
|
|
14776
14810
|
const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
14777
14811
|
__name: "WeekDay",
|
|
14778
14812
|
props: {
|
|
@@ -14810,11 +14844,24 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
|
14810
14844
|
const value = new Intl.DateTimeFormat(locale.value, { weekday: "short" }).format(props.date);
|
|
14811
14845
|
return value.charAt(0).toUpperCase() + value.slice(1).replace(".", "");
|
|
14812
14846
|
});
|
|
14847
|
+
const dateAriaLabel = vue.computed(() => {
|
|
14848
|
+
const spokenDate = new Intl.DateTimeFormat(locale.value, {
|
|
14849
|
+
day: "numeric",
|
|
14850
|
+
month: "long",
|
|
14851
|
+
weekday: "long"
|
|
14852
|
+
}).format(props.date);
|
|
14853
|
+
const normalizedDate = spokenDate.charAt(0).toUpperCase() + spokenDate.slice(1);
|
|
14854
|
+
if (props.isToday) {
|
|
14855
|
+
return `${t("FdsWeekCalendar.today")}. ${normalizedDate}.`;
|
|
14856
|
+
}
|
|
14857
|
+
return `${normalizedDate}.`;
|
|
14858
|
+
});
|
|
14813
14859
|
return (_ctx, _cache) => {
|
|
14814
14860
|
return vue.openBlock(), vue.createElementBlock("button", {
|
|
14815
14861
|
type: "button",
|
|
14816
14862
|
class: vue.normalizeClass(classes.value),
|
|
14817
14863
|
disabled: __props.disabled,
|
|
14864
|
+
"aria-label": dateAriaLabel.value,
|
|
14818
14865
|
onClick
|
|
14819
14866
|
}, [
|
|
14820
14867
|
vue.createElementVNode("span", {
|
|
@@ -15504,7 +15551,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
15504
15551
|
}, [
|
|
15505
15552
|
vue.createElementVNode("button", {
|
|
15506
15553
|
type: "button",
|
|
15507
|
-
class: vue.normalizeClass(["relative flex flex-col items-center", { "cursor-not-allowed": !canGoToStep(currentStepIndex.value, entry.index) }]),
|
|
15554
|
+
class: vue.normalizeClass(["relative flex flex-col items-center focus-visible:outline-2 focus-visible:outline-dashed focus-visible:outline-offset-4 focus-visible:outline-blue-500", { "cursor-not-allowed": !canGoToStep(currentStepIndex.value, entry.index) }]),
|
|
15508
15555
|
onClick: ($event) => __props.disableStepJump ? null : goToStep(entry.index),
|
|
15509
15556
|
disabled: !canGoToStep(currentStepIndex.value, entry.index)
|
|
15510
15557
|
}, [
|